/* --- Google Fonts (FIXED) --- */
@import url('https://googleapis.com');

/* --- Root Variables --- */
:root {
    --primary-blue: #6c88c8;       
    --accent-purple: #9b59b6;     
    --accent-purple-hover: #8e44ad;
    --kindness-peach: #fff5f0;    
    --text-light: #ffffff;
    --text-dark: #4a4a4a;
    --border-light: #e8eef3;
    --skeleton-grey: #f0f0f0;
    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Quicksand', sans-serif;
}

/* --- Global Pretty Font --- */
* {
    font-family: var(--font-body);
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: #fdfdfd;
    overflow-x: hidden;
}

/* --- Header Section --- */
header {
    text-align: center;
    padding: 60px 0 0 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #8da9e6 100%);
    color: var(--text-light);
}

.logo {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.motto {
    font-style: italic;
    font-size: 1.2rem;
    margin: 15px 20px 30px;
    color: rgba(255, 255, 255, 0.95);
}





/* --- Modern Pill Search Bar --- */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 40px;
    max-width: 700px;
    margin: 0 auto;
}

/* Inner wrapper to keep the pill shape together */
.search-container .pill-wrapper {
    display: flex;
    background: white;
    border-radius: 50px; /* Perfect pill shape */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden; /* Clips children to the pill shape */
    width: 100%;
    max-width: 600px;
}

.search-container input {
    flex: 1; /* Takes up most space */
    padding: 16px 25px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

#searchScope {
    padding: 0 15px;
    border: none;
    border-left: 1px solid #eee; /* Subtle separator */
    background-color: #f8faff; /* Very soft blue hint */
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.search-container button {
    padding: 0 35px;
    background: var(--accent-purple);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s, transform 0.2s;
    font-family: inherit;
}

.search-container button:hover {
    background: var(--accent-purple-hover);
}

/* --- No Results Visual --- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.no-results h2 {
    color: var(--primary-blue);
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.no-results p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.no-results-btn {
    padding: 14px 30px;
    background: var(--kindness-peach);
    color: var(--primary-blue);
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.05);
}

.no-results-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* --- Improved Mobile Responsiveness --- */
@media (max-width: 650px) {
    .search-container {
        padding: 0 20px 40px;
    }
    
    .search-container .pill-wrapper {
        flex-direction: column;
        border-radius: 20px; /* Less rounded for stack */
    }

    .search-container input, 
    #searchScope, 
    .search-container button {
        width: 100%;
        padding: 15px;
        border-left: none;
        border-bottom: 1px solid #eee;
        border-radius: 0;
    }

    .search-container button {
        border-bottom: none;
        background: var(--accent-purple);
    }
}



/* --- Navbar Container --- */
.navbar {
    background: var(--kindness-peach);
    border-top: 4px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

/* --- Navbar Layout --- */
.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; /* Main nav items stay side-by-side */
}

/* Main Nav Items */
.navbar li {
    position: relative; 
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* --- Dropdown Menus (General) --- */
.dropdown {
    position: absolute;
    background: white;
    min-width: 200px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1100;
    list-style: none;
    
    /* Ensure items inside ALWAYS stack one below the other */
    display: flex;
    flex-direction: column; 
}

/* Level 2: Sits vertically below the main Nav bar */
.navbar > ul > li > .dropdown {
    top: 100%;
    left: 0;
    transform: translateY(10px);
}

/* Level 3+: Pops out to the right of the parent item */
.dropdown li > .dropdown {
    top: 0;
    left: 100%; /* Moves it to the right of the current list */
    margin-left: 2px;
    transform: translateX(10px); /* Slides in from the side */
}

/* Show on Hover */
.navbar li:hover > .dropdown,
.dropdown li:hover > .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translate(0, 0); /* Removes the 10px offset on hover */
}

/* Dropdown Sub-Items Styling */
.dropdown li {
    padding: 12px 20px;
    color: var(--text-dark);
    text-transform: none; 
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Anchor for Level 3 */
}

.dropdown li:hover {
    background: var(--kindness-peach);
    color: var(--primary-blue);
}

/* --- Navigation Arrows --- */
/* Main nav items get a down arrow */
.navbar li.has-dropdown > span::after {
    content: ' ▾';
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 5px;
}

/* Items inside dropdowns that have sub-menus get a right arrow */
.dropdown li.has-dropdown > span::after {
    content: ' ▸';
    font-size: 0.7rem;
    opacity: 0.5;
}


/* --- Grid System --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 50px 20px;
    max-width: 1200px;
    margin: auto;
}

.grid-item {
    height: 450px;
    width: 100%;
    perspective: 1500px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.grid-item.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    background: #fafafa;
    overflow: hidden;
}

.item-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.item-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s;
}

.item-image-wrapper img.loaded {
    opacity: 1;
}

.item-title {
    height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kindness-peach);
    color: var(--primary-blue);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.card-back {
    transform: rotateY(180deg);
    padding: 20px;
    background: #fff;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) transparent;
}

/* Custom Scrollbar for Chrome/Safari */
.card-back::-webkit-scrollbar { width: 6px; }
.card-back::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 10px; }

.flip-back-btn {
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
}

/* --- Skeleton & Footer --- */
.skeleton {
    background-color: var(--skeleton-grey);
    background-image: linear-gradient(90deg, var(--skeleton-grey) 0px, #f8f8f8 40px, var(--skeleton-grey) 80px);
    background-size: 600px;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -150px; }
    100% { background-position: 450px; }
}

footer {
    padding: 60px 20px;
    text-align: center;
    background: var(--primary-blue);
    color: var(--text-light);
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}

/* --- Static Page Containers (About/Legal/Contact) --- */
.page-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px;
    background: #fff;
    border: 3px solid var(--kindness-peach);
    border-radius: 40px;
    box-shadow: 0 15px 40px rgba(108,136,200,0.05);
}

.page-container h2 { font-family: var(--font-heading); font-size: 3.5rem; color: var(--primary-blue); text-align: center; margin-bottom: 10px; }
.legal-text h3, .about-section h3 { color: var(--primary-blue); font-size: 1.6rem; margin-top: 35px; border-bottom: 2px solid var(--kindness-peach); display: inline-block; }
.legal-text p { line-height: 1.8; margin-bottom: 20px; }

/* --- Contact Form --- */
.input-group { margin-bottom: 25px; text-align: left; }
.input-group label { display: block; font-weight: 700; color: var(--primary-blue); margin-bottom: 8px; }
.input-group input, .input-group textarea { width: 100%; padding: 15px; border: 2px solid var(--kindness-peach); border-radius: 15px; outline: none; }



/* =========================================
   9. ADS (Integrated with your Grid)
   ========================================= */

/* The ad container matches your .grid-item dimensions */
.ad-tile {
    max-width: 100% !important;
    overflow: hidden !important;
    height: 450px; /* Matches your .grid-item height */
    display: flex !important;
    flex-direction: column;
    background: #fff;
    border-radius: 20px; /* Matches your .card-front corners */
    border: 1px solid var(--border-light);
    padding: 10px;
    justify-content: center;
    align-items: center;
}

/* Force Google Adsense to respect the tile boundaries */
.ad-tile ins, 
.ad-tile iframe {
    max-width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Ensure ads look clean on mobile */
@media (max-width: 600px) {
    .ad-tile {
        height: 350px; /* Slightly shorter for mobile scroll */
    }
}






/* =========================================
   10. SECONDARY HEADER
   ========================================= */


/* Container for the secondary header to differentiate from homepage */
.secondary-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee; /* Optional line for separation */
}

/* Centering the button container */
.subpage-nav {
    display: flex;
    justify-content: center; /* Horizontally centers the button */
    margin-top: 15px;
}

/* The actual "Back to Home" button style */
.btn-home {
    display: inline-block;
    padding: 10px 25px;
    background-color: #8e44ad; /* Your accent purple */
    color: white !important;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-home:hover {
    background-color: #7d3c98;
    transform: translateY(-2px); /* Slight lift effect on hover */
}

/* Styling for the footer button to match */
.footer-links .btn-home-footer {
    font-weight: bold;
    color: #8e44ad;
    margin-right: 15px;
    text-decoration: none;
}






/* =========================================
   11. LEGAL & ABOUT PAGE STYLING (YOUR SECTION)
   ========================================= */

/* The main white box for your content */
.page-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 60px;
    background: #ffffff;
    border: 3px solid var(--kindness-peach);
    border-radius: 40px;
    box-shadow: 0 15px 40px rgba(108, 136, 200, 0.05);
}

/* Typography for legal/about content */
.legal-text, .about-section {
    line-height: 1.8; /* Extra space between lines for easy reading */
    color: var(--text-dark);
}

.legal-text h1, .about-section h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 20px;
}

.legal-text h2, .about-section h2 {
    color: var(--accent-purple);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal-text h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-top: 25px;
    border-bottom: 2px solid var(--kindness-peach);
    display: inline-block;
}

.legal-text p, .legal-text li {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Styling lists (like in Privacy Policy) */
.legal-text ul {
    padding-left: 20px;
    list-style-type: circle;
}

.legal-text ul li {
    margin-bottom: 10px;
}

/* Responsive adjustment for legal pages */
@media (max-width: 600px) {
    .page-container {
        margin: 20px 15px;
        padding: 30px 20px;
        border-radius: 25px;
    }
    
    .legal-text h1 {
        font-size: 3rem;
    }
}

/* =========================================
   ADDITIONAL CONSISTENCY UPDATES
   ========================================= */

/* 1. Values Grid (For About Us) */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px;
}

.value-card {
    background: var(--kindness-peach);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-light);
}


.value-card strong {
    display: block;
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* 2. Form Styling (For Contact Us) */
.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--kindness-peach);
    border-radius: 15px;
    font-family: var(--font-body);
    outline: none;
    font-size: 1rem;
}

.input-group input:focus, 
.input-group textarea:focus {
    border-color: var(--primary-blue);
}

/* 3. Navigation Buttons (For Headers and Footers) */
.subpage-nav {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.btn-home {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-purple);
    color: white !important;
    text-decoration: none;
    border-radius: 35px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(155, 89, 182, 0.2);
}

.btn-home:hover {
    background-color: var(--accent-purple-hover);
    transform: scale(1.05);
}


/* =========================================
   COOKIE SYSTEM (Cleaned & Optimized)
   ========================================= */

/* Use the ID that actually exists in your HTML */
#lv-notice { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: var(--kindness-peach); 
    border-top: 4px solid var(--accent-purple-hover); 
    padding: 20px 60px;
    z-index: 9999; 
    display: none; /* Controlled by .show-flex in JS */
    justify-content: center; 
    align-items: center; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1); 
}

#lv-modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(40,55,90,0.5); 
    backdrop-filter: blur(8px); 
    z-index: 10000; 
    display: none; /* Controlled by .show-flex in JS */
    justify-content: center; 
    align-items: center; 
}

/* THE FIX: This class must be at the bottom to ensure it overrides 'display: none' */
#lv-notice.show-flex, 
#lv-modal.show-flex {
    display: flex !important;
}

/* Content Layout */
.cookie-content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    max-width: 1200px; 
    gap: 40px;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 15px; 
    white-space: nowrap; 
}

/* Modal Specifics */
.modal-content { 
    background: #fff; 
    padding: 40px; 
    border-radius: 35px; 
    max-width: 550px; 
    width: 90%; 
    text-align: center; 
    border: 2px solid var(--kindness-peach); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.setting-item { 
    background: #fdfdfd; 
    border: 2px solid var(--kindness-peach); 
    padding: 20px; 
    border-radius: 20px; 
    margin-bottom: 15px; 
    text-align: left; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-btns { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-top: 30px; 
}

/* --- Interactive Elements --- */
.btn-accept, .btn-reject { 
    background: var(--primary-blue); 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 30px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s ease; 
}

.btn-accept:hover, .btn-reject:hover { 
    background: var(--accent-purple-hover); 
    transform: translateY(-2px); 
}

.btn-settings { 
    background: transparent; 
    color: var(--primary-blue); 
    text-decoration: underline; 
    border: none; 
    cursor: pointer; 
    padding: 10px; 
    font-weight: 600; 
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) { 
    #lv-notice { padding: 20px; }
    .cookie-content { flex-direction: column; text-align: center; gap: 20px; }
    .cookie-buttons { flex-direction: column; width: 100%; }
    .cookie-buttons button { width: 100%; } 
    .modal-btns { grid-template-columns: 1fr; }
}