/* =====================
   CSS Variables / Design Tokens
   ===================== */
:root {
    --navy: #10243E;
    --primary: #E58F72;
    --primary-dark: #C8694E;
    --green: #44BB74;
    --teal: #5DD4C0;
    --background: #FEF4E1;
    --text: #10243E;
    --text-secondary: #5A6A7A;
    --text-muted: rgba(16, 36, 62, 0.45);
    --font-heading: 'Itim', cursive;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 2px 8px rgba(16, 36, 62, 0.06);
    --shadow-md: 0 8px 32px rgba(16, 36, 62, 0.12);
    --shadow-lg: 0 20px 60px rgba(16, 36, 62, 0.18);
    --shadow-coral: 0 8px 32px rgba(229, 143, 114, 0.35);
    --focus-outline: 3px solid var(--primary);
}

/* =====================
   Keyframe Animations
   ===================== */
@keyframes hero-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes highlight-reveal {
    from { background-size: 0% 40%; }
    to { background-size: 100% 40%; }
}

@keyframes draw-line {
    from { stroke-dashoffset: 200; }
    to { stroke-dashoffset: 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 143, 114, 0.4); }
    50% { box-shadow: 0 0 24px 8px rgba(229, 143, 114, 0.2); }
}

/* =====================
   Animation Helper Classes
   ===================== */
.hero-gradient-bg {
    background: linear-gradient(135deg, #10243E 0%, #1a3a5c 25%, #10243E 50%, #1a3352 75%, #10243E 100%);
    background-size: 300% 300%;
    animation: hero-gradient 12s ease infinite;
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

.highlight-animated {
    background-image: linear-gradient(135deg, var(--primary), #F5B89A);
    background-repeat: no-repeat;
    background-position: 0 85%;
    background-size: 100% 40%;
    animation: highlight-reveal 1s ease-out 0.5s both;
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.draw-line-animated {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.draw-line-animated.active {
    animation: draw-line 1.2s ease-out forwards;
}

/* =====================
   Hamburger Menu Animation
   ===================== */
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =====================
   Mobile Nav Overlay
   ===================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100dvh;
    width: min(320px, 100%);
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: right 0.3s ease;
    z-index: 99;
    box-shadow: -8px 0 40px rgba(16, 36, 62, 0.15);
}

.mobile-nav.active {
    right: 0;
}

/* =====================
   Ghost Koenig Editor Classes
   ===================== */
.kg-width-wide {
    width: 85vw;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.kg-gallery-row {
    display: flex;
    gap: 0.5rem;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* =====================
   Post Body Typography
   (Ghost-rendered HTML has no Tailwind classes)
   ===================== */
.post-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.post-body h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--text);
    margin: 2.5rem 0 1rem;
}

.post-body h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text);
    margin: 2rem 0 0.75rem;
}

.post-body p {
    margin-bottom: 1.4rem;
}

.post-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(229, 143, 114, 0.4);
    text-underline-offset: 3px;
}

.post-body a:hover {
    text-decoration-color: var(--primary);
}

.post-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

.post-body ul,
.post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text);
}

.post-body pre {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 2rem 0;
}

/* =====================
   Pagination (Ghost {{pagination}} helper)
   ===================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
}

.pagination a {
    color: #E58F72;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    border: 2px solid #E58F72;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #E58F72;
    color: white;
}

/* =====================
   FAQ Accordion
   ===================== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer.open {
    max-height: 500px;
}

.faq-toggle-icon {
    transition: transform 0.3s ease;
}

.faq-toggle-icon.open {
    transform: rotate(180deg);
}

/* =====================
   Accessibility
   ===================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --primary: #C8694E;
        --text: #000000;
        --text-secondary: #1A2A3A;
    }
}

@media print {
    .hero-gradient-bg,
    .float-animation,
    .pulse-glow {
        animation: none;
    }

    body { background: white; color: black; }
    a[href]::after { content: " (" attr(href) ")"; }
}
