/*
Theme Name: Prepdek Theme
Theme URI: https://prepdek.com
Author: Prepdek
Author URI: https://prepdek.com
Description: A custom WordPress theme for Prepdek with modern design and full functionality.
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prepdek-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, right-sidebar, flexible-header, accessibility-ready

Prepdek Theme is a custom WordPress theme built for Prepdek.
*/

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background:
        radial-gradient(1000px 600px at 20% 10%, rgba(138,180,255,0.25), transparent 60%),
        radial-gradient(900px 700px at 90% 20%, rgba(124,247,199,0.20), transparent 55%),
        radial-gradient(800px 600px at 40% 90%, rgba(255,122,122,0.10), transparent 60%),
        var(--bg);
    min-height: 100vh;
    padding: 0;
}

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
    --bg: #0b1020;
    --card: rgba(255,255,255,0.08);
    --card2: rgba(255,255,255,0.10);
    --text: #f3f5ff;
    --muted: rgba(243,245,255,0.75);
    --accent: #7cf7c7;
    --accent2: #5fb3f1;
    --danger: #ff7a7a;
    --shadow: 0 18px 50px rgba(0,0,0,0.35);
    --radius: 18px;
}

/* ==========================================================================
   ATOMIC ELEMENTS
   Reusable components used across the site
   ========================================================================== */

/* Typography */
h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2.2rem);
    letter-spacing: 0.2px;
}

.subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.35;
    max-width: 62ch;
}

.demo-intro {
    padding: 28px 16px 10px;
    font-size: 0.95rem;
    text-align: center;
    color:var(--accent);
    position: absolute;
    top:0;
    left:0;
    z-index:10;
    background: var(--bg);
    width: 100%;
    height:95px;
    border-bottom: 1px solid var(--muted);
}

.demo-intro-arrow {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    color: rgba(124, 247, 199, 0.6);
}

.demo-intro-arrow svg {
    display: block;
}

.demo-iframe-wrap {
    overflow: hidden;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.demo-iframe {
    width: 102%;
    height: 706px;
    /* transform: scale(0.85); */
    transform-origin: top center;
    border: 0;
}

@media (max-width: 768px) {
    .demo-iframe-wrap {
        height:1000px;
    }
    .demo-iframe {
        height: 1000px;
    }
}

@media (max-width: 619px) {
    .demo-iframe-wrap {
        height:1050px;
    }
    .demo-iframe {
        height: 1050px;
    }
}

.pd-kicker {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .85rem;
    opacity: .85;
    color: var(--accent);
}

.pd-lead {
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    line-height: 1.5;
    max-width: 70ch;
}

.pd-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 10px 0 12px;
    line-height: 1.05;
}

.pd-small {
    font-size: .95rem;
}

.pd-micro {
    font-size: .92rem;
    line-height: 1.6;
}

.pd-muted {
    opacity: .85;
}

.pd-muted2 {
    color: rgba(255,255,255,0.70);
}

/* Buttons */
.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 650;
}

.pd-btn--primary {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-weight: 600;
    transition: background 120ms ease;
    border: 1px solid var(--text);
}

.pd-btn--primary:hover {
    background: var(--text);
    border: 1px solid var(--accent);
}

.pd-btn--secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--accent2);
    transition: background 120ms ease, border-color 120ms ease;
}

.pd-btn--secondary:hover {
    background: var(--accent2);
    border: 1px solid var(--bg);
    color: var(--bg);
}

button {
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease;
    user-select: none;
}

button:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.14);
}

button:active {
    transform: translateY(0px);
}

button.primary {
    border-color: rgba(124,247,199,0.35);
    box-shadow: 0 12px 30px rgba(124,247,199,0.08);
}

button.danger {
    border-color: rgba(255,122,122,0.35);
}

/* Badges & Pills */
.pd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.pd-badge {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .92rem;
}

.pillbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.pill {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.92rem;
    user-select: none;
}

@media (max-width: 768px) {
    .pill {
        padding:8px 8px;
        font-size: .8rem;
    }
}

.pill b {
    color: var(--accent);
    font-weight: 700;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    font-size: .88rem;
    color: rgba(255,255,255,0.88);
    white-space: nowrap;
}

.pd-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(124,247,199,0.75);
}

.pd-chip .dot.inprocess {
    background: rgba(255,212,121,0.85);
    padding:4px;
}
.deck-lib-link {
    color: var(--accent);
}
.deck-lib-link:hover {
    text-decoration: underline;
}
.pd-chip--locked .dot {
    background: rgba(255,212,121,0.85);
}

/* Tags */
.tagrow {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.tag {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.18);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

.tag .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent2);
    display: inline-block;
}

/* Cards & Surfaces */
.pd-card {
    border-radius: 18px;
    padding: 18px;
}

.pd-surface {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
}

.gray-section {
    background: var(--card);
}

/* Form Elements */
select,
button,
input[type="search"] {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    outline: none;
    font-size: 0.95rem;
}

input[type="search"] {
    min-width: min(420px, 86vw);
}

/* Lists */
.pd-list {
    margin: 12px 0;
    padding-left: 18px;
}

.pd-list li {
    margin: 8px 0;
}

.pd-helpList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 1rem 0;
    padding: 0 0 0 1rem;
}

/* Actions & Controls */
.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.pd-actionsRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width:280px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.controls .left,
.controls .right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.stats {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.hide-desktop {
    display: none;
}

.pd-extra-padding {
    padding: 0 10%;
}

/* ==========================================================================
   GLOBAL LAYOUT ELEMENTS
   Site-wide structure and layout components
   ========================================================================== */

/* Container */
.container {
    max-width: 1200px;
    /* margin: 0 auto; */
    padding: 0 20px;
}

.pd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px;
}

.pd-section {
    padding: 64px 0;
}

.pd-divider {
    height: 1px;
    opacity: .18;
    margin: 0;
}

/* Grid System */
.pd-grid {
    display: grid;
    gap: 22px;
}

.pd-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

main {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Header */
.header-container {
    max-width: 1200px;
    padding: 0 18px;
    margin: 0 auto;
}
header {
    margin: 0 auto 18px;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    background-color: var(--bg);
}

.site-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: .5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--text);
}

.archive-header {
    background: transparent;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    width: 220px;
}

/* Deck header: simplified, logo only, centered */
.site-header.deck-header {
    padding: 1rem 0;
}

.site-header.deck-header .header-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.deck-header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.deck-branding {
    display: flex;
    justify-content: center;
    align-items: center;
}

.deck-header {
    max-width: 100%;
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

/* Navigation */
#top-menu {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: right;
}

#top-menu a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    transition: color 120ms ease;
    background-color: transparent;
    border: none;
    padding: 4px 6px;
    margin-bottom: 6px;
}

#top-menu a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: .5rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    text-decoration: none;
    color: var(--bg);
    background-color: var(--accent);
    font-weight: 500;
    transition: color 0.3s;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--accent);
    display: block;
}

.main-navigation a:hover {
    background-color: var(--text);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.menu-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger animation when menu is open */
.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
.site-main {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Posts */
.post {
    margin-bottom: 3rem;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.post-title a {
    text-decoration: none;
    color: #333;
}

.post-title a:hover {
    color: #0073aa;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-content {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 4px;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}
.site-footer .container {
    max-width: 1200px;
    padding: 0 18px;
    margin: 0 auto;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

#footer-menu {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 1rem 0;
    list-style: none;
    justify-content: center;
}

#footer-menu a {
    text-decoration: none;
    color: var(--accent);
    font-size: 0.95rem;
    transition: color 120ms ease;
}

#footer-menu a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ==========================================================================
   DECK/FLASHCARD COMPONENTS
   Used by PrepDek Deck Builder plugin
   ========================================================================== */

/* Flashcard Grid */
.grid {
    /* display: grid;
    grid-template-columns: repeat( auto-fit, minmax(350px, 1fr) ); */
    gap: 16px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}
.deck-main {
    max-width:1200px;
}
.deck-main main {
    max-width:1200px;
}
.cardwrap {
    perspective: 1100px;
    min-height: 170px;
    width: calc(33.333% - 12px);
    display: flex;
}

@media (max-width: 1200px) {
    .cardwrap {
        width: calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .cardwrap {
        width: 100%;
    }
    .my-decks-wrap {
        padding: 0 4px;
    }
}

.card {
    position: relative;
    width: 100%;
    min-height: 170px;
    transform-style: preserve-3d;
    transition: transform 520ms cubic-bezier(.2,.7,.2,1);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    outline: none;
}

.card:focus-visible {
    box-shadow: 0 0 0 3px rgba(138,180,255,0.55), var(--shadow);
}

.card.flipped {
    transform: rotateY(180deg);
}

.face {
    position: absolute;
    inset: 0;
    padding: 14px 14px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.face.back {
    transform: rotateY(180deg);
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.07));
}

.prompt {
    font-size: 1.05rem;
    line-height: 1.25;
    margin: 2px 0 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.prepdek-deck p.hint {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.35;
}

.hint.is-hidden {
    display: none;
}

.answer {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.35;
    color: rgba(255,255,255,0.92);
}

.mini {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255,255,255,0.70);
    font-size: 0.82rem;
}

.kbd {
    padding: 3px 7px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.86);
    font-variant-numeric: tabular-nums;
}

/* Green glow animation for learned cards */
.prepdek-learned-glow {
    animation: prepdek-learned-glow 0.5s ease-out;
}

@keyframes prepdek-learned-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(76, 175, 80, 0.6), 0 0 40px 12px rgba(76, 175, 80, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.prepdek-learned-glow .card {
    animation: prepdek-learned-card-glow 0.5s ease-out;
}

@keyframes prepdek-learned-card-glow {
    0% {
        box-shadow: var(--shadow), 0 0 0 0 rgba(76, 175, 80, 0);
    }
    50% {
        box-shadow: var(--shadow), 0 0 15px 5px rgba(76, 175, 80, 0.7), 0 0 30px 10px rgba(76, 175, 80, 0.5);
    }
    100% {
        box-shadow: var(--shadow), 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Quiz Mode */
.quizbox {
    display: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quizbox.active {
    display: block;
}

.quizhead {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.quiztitle {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.qprompt {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 4px 0 8px;
    line-height: 1.25;
}

.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px 0 0;
}

.opt {
    text-align: left;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.opt:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
}

.opt.correct {
    border-color: rgba(124,247,199,0.55);
    background: rgba(124,247,199,0.12);
}

.opt.wrong {
    border-color: rgba(255,122,122,0.55);
    background: rgba(255,122,122,0.12);
}

.feedback {
    margin-top: 10px;
    color: rgba(255,255,255,0.86);
    line-height: 1.35;
}

.footer {
    max-width: 1000px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

/* ==========================================================================
   PAGE TEMPLATE SPECIFIC STYLES
   Styles only used on specific page templates
   ========================================================================== */

/* Front Page Template */
.front-page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.front-page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.front-page-hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* FAQ Page Template */
.pd-faq {
    background: var(--card);
}

.pd-faqGroup .pd-faq {
    background: transparent;
}

.pd-faq details {
    border-radius: 16px;
    padding: 14px 16px;
}

.pd-faq summary {
    cursor: pointer;
    font-weight: 700;
}

.pd-faq details > div {
    margin-top: 10px;
    line-height: 1.55;
}

.pd-faqNav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
}

.pd-faqNav .pd-surface {
    text-decoration: none;
    color: var(--bg);
    background: var(--accent2);
    border-radius: 14px;
    padding: 12px 16px;
    transition: background 120ms ease, color 120ms ease;
    border: 2px solid #fff;
}

.pd-faqNav .pd-surface:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--accent2);
}

/* Pricing Page Template */
.pd-pricing-grid {
    display: grid;
}

@media (max-width: 768px) {
    .pd-pricing-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
}
.pd-pricing .pd-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pd-pricing-card {
    display: flex;
    flex-direction: column;
}

.pd-pricing-card .pd-btn {
    margin-top: auto;
}

/* Pricing page: "What you get with each option" detail cards */
.pd-pricing-detail-section {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.pd-pricing-detail-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pd-pricing-detail-card {
    padding: 24px;
    border-radius: 18px;
    display: flex;
    flex-direction: row;
    gap:1rem;
}

.pd-pricing-detail-card div {
    width: 50%;
}

.pd-pricing-detail-placeholder {
    min-height: 180px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-pricing-detail-placeholder-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}


.pd-price {
    font-size: 2rem;
    font-weight: 900;
    margin: 8px 0 2px;
}

.pd-steps {
    counter-reset: step;
}

.pd-step {
    position: relative;
    padding-left: 48px;
}

.pd-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: var(--accent2);
    margin: 4px 0 0 4px;
    color: var(--bg);
}

/* Demo Page Template */
.pd-demoFrame {
    border-radius: 18px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.14);
    position: relative;
    max-width: 551px;
    width:550px;
    margin-left:auto;
    box-shadow: 0 0 40px rgba(124, 247, 199, 0.08), 0 0 80px rgba(124, 247, 199, 0.04);
}

/* @media (max-width: 1150px) {
    .pd-demoFrame {
        width:450px;
        max-width: 451px;
        min-width: 440px;

    }
} */

@media (max-width: 1150px) {
    .pd-demoFrame {
        width:100%;
        max-width: 100%;
        min-width: 100%;

    }
}

.pd-demoTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
}

.pd-demoBody {
    padding: 16px;
}

/* My Decks Page Template */
.pd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pd-table th,
.pd-table td {
    text-align: left;
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    vertical-align: middle;
}

.pd-table th {
    font-size: .9rem;
    color: rgba(255,255,255,0.75);
    font-weight: 800;
}

.pd-table a {
    text-decoration: none;
}

.pd-table a:hover {
    text-decoration: underline;
}

.pd-table a.pd-btn:hover {
    text-decoration: none;
}

.pd-tableWrap {
    overflow: auto;
    border-radius: 16px;
}

.pd-tdLabel {
    font-weight: 800;
    color: rgba(255,255,255,0.70);
    padding-right: 10px;
    min-width: 110px;
}

/* Password Edit Form */
.pd-pwEditForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Form Elements */
.pd-form {
    width: 100%;
}

.pd-form-group {
    margin-bottom: 20px;
}

.create-a-deck-section {
    max-width: 700px;
    margin:0 auto;
}

.pd-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.pd-input {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    width: 100%;
    font-size: 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pd-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,0.12);
}

.pd-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pd-input--danger {
    border-color: var(--danger);
    background: rgba(255, 122, 122, 0.08);
}

.pd-input--danger:focus {
    border-color: var(--danger);
}

.pd-input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.pd-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pd-alert--success {
    background: rgba(124, 247, 199, 0.1);
    border-left: 3px solid var(--accent);
    color: var(--text);
}

.pd-alert--error {
    background: rgba(255, 122, 122, 0.1);
    border-left: 3px solid var(--danger);
    color: var(--text);
}

.pd-iconBtn {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 120ms ease, transform 120ms ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pd-iconBtn:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

.pd-iconBtn:active {
    transform: translateY(0);
}

/* ==========================================================================
   POST CONTENT
   ========================================================================== */

.post-content p {
    margin: 1rem 0;
    font-size:1rem;
    line-height:170%;
}
.post-content h2 {
    margin: 3rem 0 1rem 0;
}
.post-content h3 {
    margin: 2rem 0 1rem 0;
}
.post-content h4 {
    margin: 1rem 0;
}
.post-content ul,
.post-content ol {
    margin: 1rem 0 2rem 0;
    padding-left: 1.5rem;
}
.post-content ul li,
.post-content ol li {
    margin: 1rem 0;
}
.post-content ul li::marker,
.post-content ol li::marker {
    color: var(--accent2);
}
.post-content blockquote {
    margin: 1rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent2);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 1rem;
}

.post-content blockquote p {
    margin: 0;
}
.post-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 120ms ease;
    cursor: pointer;
}
.post-content a:hover {
    color: var(--accent2);
    text-decoration: underline;
}
.post-content hr {
    margin: 3rem 0;
    border: 1px solid var(--accent2);
    opacity: .18;
}
.posted-on {
    color: var(--accent);
    font-size: 0.8rem;
}
.post-thumbnail {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 3rem;
    height: 400px;
}
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
}
.nav-links a {
    color: var(--accent);
    text-decoration: none;
    transition: color 120ms ease;
    cursor: pointer;
}
.nav-links a:hover {
    color: var(--accent2);
    text-decoration: underline;
}
.cat-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin:2rem 0;
}
.cat-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 120ms ease;
    cursor: pointer;
    background: var(--bg);
    border-radius: 12px;
    padding: 4px 8px;   
    border: 1px solid var(--accent);
}
.cat-links a:hover {
    background: var(--accent2);
    color: var(--bg);
}
/* ==========================================================================
   GRAVITY FORMS OVERIDE STYLES
   ========================================================================== */

/* checkout */
form.prepdekform::after {
    display:block;
    content: 'By clicking “Submit,” you agree to receive emails from PrepDek.';
    color: var(--accent2);
    font-size: 0.8rem;
    margin-top: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.8;
}
.u-lh.u-fs-sm.u-fw-medium.u-color-primary.u-mh-2 {
    color: var(--accent2) !important;
}
.gform_description {
    margin-bottom: 2rem;
}
.gfield_description {
    color: var(--accent2) !important;
}
.gform_body .gfield_label,
.gform_body label {
    color: var(--text) !important;
}
.gfield_required {
    color: var(--danger) !important;
}
.gform_button  {
    background: var(--accent) !important;
    color: var(--bg) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: background 120ms ease !important;
    cursor: pointer !important;
    user-select: none !important;
    appearance: none !important;
}
.gform_button:hover {
    background: var(--text) !important;
    border: 1px solid var(--accent) !important;
    transform: none !important;
}
.gform-theme--framework input[type=radio]:where(:not(.gform-theme__disable):not(.gform-theme__disable *):not(.gform-theme__disable-framework):not(.gform-theme__disable-framework *))::before {
    background: var(--accent2) !important;
}
.gform-theme--framework input[type]:where(:not(.gform-text-input-reset):not([type=hidden])):where(:not(.gform-theme__disable):not(.gform-theme__disable *):not(.gform-theme__disable-framework):not(.gform-theme__disable-framework *)):focus {
    border-color: var(--accent2) !important;
    outline-color: var(--accent2) !important;
}

/* Password Protected Page */
.post-password-form input {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--accent2);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    transition: background 120ms ease;
    cursor: pointer;
    user-select: none;
    appearance: none;
}
.post-password-form input[type="submit"] {
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}
.post-password-form input[type="submit"]:hover {
    background: var(--text);
    border: 1px solid var(--accent);
    transform: none;
}

/* My Decks Page */
.pd-table a.pd-btn:hover {
    text-decoration: none;
}

.pd-table a.pd-btn:focus {
    outline: 2px solid var(--accent2);
    font-size: 0.95rem;
}
.pd-deck-lib-title-td .created-date,
.pd-deck-lib-title-td .deck-subject {
    font-size:.75rem;
    display:block;
    margin-bottom:8px;
    color: var(--muted);
}
.pd-deck-lib-title-td .deck-subject {
    border-left: 1px solid var(--muted);
    padding-left:8px;
}
.pd-deck-lib-title-td .deck-lib-title {
    font-weight:900;
}
.pd-deck-lib-title-td .deck-lib-link {
    font-size:.85rem;
}
.pd-deck-lib-title-td .deck-lib-link:hover {
    text-decoration: underline;
}
.pd-deck-lib-details {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.my-decks-search-bar {
    display: flex; 
    justify-content: flex-end;
}
.my-decks-card {
    padding:18px 8px;
}

.checkoutprice input {
    color: var(--accent) !important;
    font-size:2rem !important;
}

/* ==========================================================================
.gform_body input,
.gform_body textarea {
    background: var(--card);
    border: 1px solid var(--accent2);
    color: var(--text);
    padding: 1rem;
    border-radius: 12px;
}

   ========================================================================== */

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .hide-desktop {
        display: block;
    }

    #top-menu {
        display: none;
    }
    .site-logo {
        width: 160px;
    }

    .my-decks-search-bar {
        display: flex; 
        justify-content: center;
    }
    .my-decks-section {
        padding-top:0 !important;
    }

    #deck-search {
        max-width: 100% !important;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg);
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        padding: 80px 24px 24px;
    }

    .main-navigation.menu-open {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        width: 100%;
        padding: 18px 20px;
        border-radius: 0;
        border: none;
        background: transparent;
        color: var(--text);
        text-align: left;
        font-size: 1.1rem;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .main-navigation a:hover,
    .main-navigation a:focus {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--accent);
    }

    /* Overlay when menu is open */
    .main-navigation::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .main-navigation.menu-open::before {
        opacity: 1;
        pointer-events: all;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .header-content {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .front-page-hero h1 {
        font-size: 2rem;
    }
}

/* Tablet and below */
@media (max-width: 900px) {
    .pd-2col,
    .pd-3col {
        grid-template-columns: 1fr;
    }

    .pd-section {
        padding: 52px 0;
    }
}

/* Mobile: Table to card layout */
@media (max-width: 720px) {
    .pd-table thead {
        display: none;
    }

    .pd-table,
    .pd-table tbody,
    .pd-table tr,
    .pd-table td {
        display: block;
        width: 100%;
    }

    .pd-table tr {
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.04);
        border-radius: 16px;
        margin-bottom: 32px;
        margin-top: 32px;
        overflow: hidden;
    }

    .pd-table td {
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        display: flex;
        justify-content: space-between;
        gap: 12px;
        flex-direction: column;
    }
    .pd-table td.pd-deck-lib-title-td {
        flex-direction: column;
    }

    .pd-table td:last-child {
        border-bottom: none;
    }

    .pd-actionsRow {
        justify-content: flex-start;
    }
    .pd-section {
        padding: 32px 0;
    }
    
}

/* ==========================================================================
   DECK CREATION LOADING ANIMATION
   ========================================================================== */

.pd-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 16, 32, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pd-loading-overlay.pd-loading-active {
    opacity: 1;
    visibility: visible;
}

.pd-loading-container {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.pd-loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.pd-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: pd-spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.pd-spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: var(--accent);
}

.pd-spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: var(--accent2);
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.pd-spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: var(--accent);
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

.pd-spinner-ring:nth-child(4) {
    animation-delay: 0s;
    border-top-color: var(--accent2);
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
}

@keyframes pd-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.pd-loading-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px;
    letter-spacing: 0.5px;
}

.pd-loading-message {
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 30px;
}

.pd-loading-message strong {
    color: var(--accent);
    font-weight: 600;
}

.pd-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pd-loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    animation: pd-dot-bounce 1.4s ease-in-out infinite both;
}

.pd-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.pd-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.pd-loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes pd-dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pd-loading-container {
        padding: 30px 20px;
    }

    .pd-loading-spinner {
        width: 100px;
        height: 100px;
        margin-bottom: 25px;
    }

    .pd-loading-title {
        font-size: 24px;
    }

    .pd-loading-message {
        font-size: 14px;
    }
}
