/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Color Variables */
:root {
    --primary-turq: #76c9da;
    --accent-slate: #45667b;
    --accent-green: #86a758;
    --bg-beige: #F2EFE9;
    --text-dark: #000000;
    --button-colors: #465075;
    --hero-text: #000000; /* <--- CHANGE THIS for Body Text Color */
    --white: whitesmoke;
    --headings-color: #000000; /* <--- ADD THIS for Headings Color */
    --footer-bg: #70c9d9
}

body {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 400;
    background-color: #f9f9f9;
    color: var(--text-dark); /* This uses the variable above */
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 500; /* Medium for bold titles */
    color: var(--headings-color); /* <--- ADD THIS to apply the color */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}




.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Top Bar */
.top-bar {
    background-color: darkgray;
    color: var(--white);
    font-size: 1rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: center;
}

.top-links a {
    margin-left: 15px;
    color: #ddd;
}

.top-links a:hover {
    color: var(--white);
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid #eee;
}

/* --------------------
   Utilities
---------------------*/
.text-muted { color: var(--text-dark); opacity: 0.7; }
.small { font-size: 0.85rem; }
.v-divider { width: 1px; background: var(--accent-slate); opacity: 0.2; margin: 0 5px; }
.btn-with-icon { display: flex; align-items: center; gap: 5px; }
.btn { background: var(--accent-slate); color: var(--white); border: none; }
.btn:hover { background: var(--button-colors); }
.btn-danger { background: var(--accent-slate); color: var(--white); border: none; }

/* --------------------
   Login Page
---------------------*/
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-beige);
    margin: 0;
}

.login-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 350px;
}

.login-card h2 { margin-top: 0; color: var(--headings-color); }
.login-card .form-group { margin-bottom: 1rem; }
.login-card label { display: block; margin-bottom: 0.5rem; color: var(--text-dark); opacity: 0.7; }
.login-card input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.login-card button {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-slate);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
.login-card button:hover { background: var(--button-colors); }

/* --------------------
   Guides Page
---------------------*/
.layout-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.guides-sidebar {
    flex: 0 0 300px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}
.guides-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #f0f0f0; /* neutral separator */
    padding-bottom: 0.5rem;
}

.guide-list-item {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.guide-list-item:hover {
    background-color: rgba(69,102,123,0.08); /* light accent */
    color: var(--accent-slate);
}
.guide-list-item.active {
    background-color: rgba(69,102,123,0.15);
    color: var(--accent-slate);
    font-weight: 600;
}

.guide-content-area {
    flex: 1;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 3rem;
    min-width: 0;
}

.guide-content-header h1 {
    margin-top: 0;
    color: var(--headings-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}
.guide-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.guide-body h1, .guide-body h2, .guide-body h3 { margin-top: 2rem; }
.guide-body p { line-height: 1.8; color: var(--text-dark); font-size: 1.05rem; }
.loading { text-align: center; color: var(--text-dark); opacity: 0.6; padding: 2rem; }

@media (max-width: 768px) {
    .layout-wrapper { flex-direction: column; }
    .guides-sidebar { width: 100%; position: static; max-height: none; }
}

/* --------------------
   Guides Editor
---------------------*/
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
}
.sidebar h3 { margin-top: 0; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}
.sidebar li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.delete-btn {
    background: rgba(69,102,123,0.1);
    color: var(--accent-slate);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}
.delete-btn:hover { background: rgba(69,102,123,0.2); }

.editor-layout {
    flex-grow: 1;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}
.title-input {
    width: 100%;
    padding: 15px;
    font-size: 2rem;
    font-weight: bold;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-dark);
}
.title-input::placeholder { color: var(--text-dark); opacity: 0.5; }

.toolbar {
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    position: sticky;
    top: 20px;
    z-index: 10;
}
.toolbar button {
    background: var(--white);
    border: 1px solid #e5e7eb;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.toolbar button:hover { background: rgba(69,102,123,0.08); }

.actions { display: flex; gap: 10px; justify-content: flex-end; }
.actions.space-between { justify-content: space-between; }

.logout-btn { background-color: var(--accent-slate); color: var(--white); border: none; padding: 12px 16px; border-radius: 6px; cursor: pointer; }
.logout-btn:hover { background: var(--button-colors); }

.editor-pane {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.guide-body-editor {
    min-height: 400px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    background: var(--white);
}

/* --------------------
   Index page tweaks
---------------------*/
.success-icon { font-size: 4rem; color: var(--primary-turq); margin-bottom: 1rem; }

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative; /* Added for absolute positioning of mobile menu */
}

.logo {
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

/* Navigation */
nav {

}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
nav ul li a {
    display: block;
    padding: 15px 25px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 1.25rem;
}

nav ul li a:hover {
    color: var(--primary-turq);
    background-color: #fafafa;
}

/* Hero Section */
.hero {
    background-color: #f5f5f5;
    padding: 60px 0;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 50%;
    text-align: left;
}

.hero-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--hero-text);
    font-weight: 800;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--text-dark);
    max-width: 90%;
}

.hero-image-container {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: flex-end;
}

.hero-image-container img {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    background: var(--accent-slate);
    color: var(--white);
    border-radius: 10px;
    transition: transform 0.3s, background 0.3s;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-slate);
    transform: translateY(-2px);
}


.btn-docs {
    display: inline-block;
    padding: 12px 15px;
    font-size: 1.4rem;
    color: var(--text-dark);
    border-radius: 10px;
    transition: background 0.3s;
    font-weight: 600;
}



.btn:hover {
    background: var(--accent-slate);
}


/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: var(--white);
    text-align: center;
}

.features-section h2 {
    margin-bottom: 50px;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

.carousel-item {
    flex: 0 0 calc(33.333% - 13.333px); /* 3 items on desktop */
    min-width: 0;
}

.feature-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 0; /* Changed padding to 0 for larger images */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.feature-card-content {
    padding: 20px;
}

.feature-img-container {
    height: 400px; /* Increased height for desktop */
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    background: var(--accent-slate);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s, transform 0.3s;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--button-colors);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.carousel-loading {
    width: 100%;
    padding: 50px;
    text-align: center;
    font-size: 1.2rem;
}



@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(50% - 10px); /* 2 items on tablets */
    }
    .feature-img-container {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 100%; /* 1 item on mobile */
    }
    .feature-img-container {
        height: 250px;
    }
    .carousel-container {
        gap: 10px;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Pillars Section */
.pillars-section {
    background-color: var(--bg-beige);
    padding: 80px 0;
    text-align: center;
}

.pillars-section h2 {
    margin-bottom: 60px;
    color: #222;
    font-size: 2.2rem;
    font-weight: 700;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 40px;
    align-items: start; /* Align items to top */
}

.pillar-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; /* Make cards same height */
}

.pillar-icon {
    margin-bottom: 25px;
    color: var(--primary-turq);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pillar-icon img {
    max-height: 100%;
    width: auto;
}


.pillar-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
}

.pillar-card p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Responsive Pillars */
@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: #aaa;
    padding: 10px 0 0;
    margin-top: 0; /* Removed margin since pillars section has bg color */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 5px;
}



.footer-col h4 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.newsletter-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.newsletter-col h5 {
    color: var(--white);
    margin-bottom: 5px;
}

.newsletter-form {
    display: flex;
    align-items: center;
}

.newsletter-logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

.newsletter-logos img {
    height: 45px;
    vertical-align: middle;
}

.newsletter-form input[type="email"] {
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    margin-right: 0.5rem;
    flex: 1;
    font-family: 'Baloo 2', cursive; /* Applied Baloo 2 font */
}

.newsletter-form button {
    padding: 0.75rem 1rem;
    background-color: #f2d74e;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    transition: background-color 0.3s;
    font-family: 'Baloo 2', cursive; /* Applied Baloo 2 font */
}

.newsletter-form button:hover {
    background-color: #e0c43c;
}


.footer-col input {
    padding: 8px;
    border: none;
    border-radius: 4px;
    margin-right: 5px;
}

.footer-col button {
    padding: 8px 15px;
    background: var(--accent-slate);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copyright {
    text-align: center;
    margin-top: 10px;
    color: var(--white);
    font-size: 0.9rem;
}



/* Image Overlay / Lightbox Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    text-align: center;
}

#overlay-img-container {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#overlay-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 2001;
}


       /* Cookie Consent Banner */
   .cookie-banner {
       position: fixed;
       bottom: 0;
       left: 0;
       width: 100%;
       background-color: darkgray;
       color: #fff;
       padding: 15px 20px;
       display: flex;
       justify-content: center;
       align-items: center;
       gap: 20px;
       box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
       z-index: 10000;
       transform: translateY(100%);
       transition: transform 0.3s ease-in-out;
   }

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cookie-btn {
    background-color: var(--accent-slate);
    color: whitesmoke;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.cookie-btn:hover {
    background-color: var(--accent-green);
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}
/* Subscription Success Overlay */
#subscription-success-overlay {
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 3000;
}

#subscription-success-overlay .overlay-content {
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#subscription-success-overlay h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Baloo 2', cursive;
}

#subscription-success-overlay p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

#subscription-success-overlay .close-success-btn {
    background: white;
    color: #2c3e50;
    border: none;
    padding: 10px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

#subscription-success-overlay .close-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Confetti Styles */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    left: 50%;
    top: 50%;
    pointer-events: none;
    z-index: 3001; /* Ensure on top of modal content if needed, or behind */
    animation: confetti-explode var(--duration) ease-out forwards;
}

@keyframes confetti-explode {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(var(--rot));
        opacity: 0;
    }
}


/* Responsive Styles */
@media (max-width: 768px) {
    /* Stack header elements vertically - DISABLED for new menu approach, we want row for logo + burger */
    /* .header-content {
        flex-direction: column;
        text-align: center;
    } */

    /* Show Hamburger */
    .hamburger-menu {
        display: block;
    }

    /* Hero Mobile Styles */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
        padding: 0 10px;
        order: 1;
    }

    .hero-image-container {
        max-width: 100%;
        justify-content: center;
        margin-top: 30px;
        order: 2;
    }


    /* Mobile Nav Styles */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        z-index: 1000;
    }

    /* When active class is added via JS */
    .nav-menu.active {
        max-height: 300px; /* Adjust based on content height */
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    nav ul li {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    /* Add spacing between logo and nav */
    /* Removed .logo margin-bottom as it breaks alignment with burger */

    /* Make the pillars/columns stack instead of 3-in-a-row */
    .pillars-grid {
        grid-template-columns: 1fr;
    }

    /* Stack footer columns */
    .footer-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    /* Adjust Hero text size for mobile */
    .hero h2 {
        font-size: 2.2rem;
    }
}

