/* --- CSS VARIABLES (Brand Colors) --- */
:root {
    --koolios-coral: #D26D63;       /* Dark Coral */
    --koolios-pink: #E88F83;        /* Medium Pink */
    --koolios-blush: #F4CAC7;       /* Light Background */
    --koolios-green: #d26c63c3;     /* Fresh Green (Grass) */
    --text-dark: #2C3E50;
    --white: #ffffff;
    
    --font-heading: 'Fredoka One', cursive;
    --font-body: 'Quicksand', sans-serif;
}

/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--koolios-blush);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(210, 109, 99, 0.2);
    border-bottom: 3px solid var(--koolios-pink);
}

.nav-logo img {
    height: 60px; 
    animation: bounce 2s infinite;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 700;
    color: var(--koolios-coral);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--koolios-green);
}

.nav-links a.active-page {
    color: var(--koolios-green);
    border-bottom: 2px solid var(--koolios-green);
}

/* --- HAMBURGER MENU (Hidden on Desktop) --- */
.hamburger {
    display: none; /* Hidden by default */
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--koolios-coral);
    margin: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--koolios-coral);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 0 #b0554d;
    display: inline-block; /* Fix for mobile layout */
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--koolios-green);
    box-shadow: 0 4px 0 #5c8a2e;
}

/* --- HERO SECTION (Homepage) --- */
.hero {
    position: relative;
    min-height: 90vh; /* Changed from height to min-height for mobile content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.4)), url('images/anothericecream.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 80px;
}

.hero-text {
    max-width: 600px;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    color: var(--koolios-coral);
    text-shadow: 3px 3px 0px var(--white);
    margin-bottom: 20px;
    line-height: 1.1;
    animation: slideInLeft 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #444;
    animation: fadeIn 2s ease-out;
}

.hero-image {
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.hero-image img {
    max-width: 500px;
    drop-shadow: 0 20px 30px rgba(0,0,0,0.2);
}

/* SVG Wave Divider */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.custom-shape-divider-bottom .shape-fill {
    fill: var(--white);
}

/* --- ABOUT TEASER --- */
.about-section {
    background-color: var(--white);
    padding: 80px 10%;
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img-container {
    flex: 1;
    position: relative;
}

.about-img-container img {
    border-radius: 20px;
    box-shadow: 15px 15px 0 var(--koolios-pink);
    transition: transform 0.3s;
}

.about-img-container:hover img {
    transform: scale(1.02);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 3rem;
    color: var(--koolios-coral);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* --- GENERAL PAGE HEADERS --- */
.page-header {
    background-color: var(--koolios-coral);
    color: white;
    text-align: center;
    padding: 120px 5% 40px 5%; 
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

/* --- FILTER BUTTONS --- */
.menu-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 5%;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--koolios-coral);
    color: var(--koolios-coral);
    padding: 10px 25px;
    border-radius: 25px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--koolios-coral);
    color: white;
}

/* --- MENU GRID STYLES --- */
.menu-section {
    padding-bottom: 80px;
}

.menu-preview {
    padding: 80px 5%;
    text-align: center;
}

.section-title {
    font-size: 3.5rem;
    color: var(--white);
    text-shadow: 2px 2px 0 var(--koolios-coral);
    margin-bottom: 50px;
}

.grid-container, .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* --- MENU GRID STYLES (Updated) --- */
.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: default; /* CHANGED: changed from pointer to default */
}

/* CHANGED: Subtle lift only, looks less like a clickable button */
.card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-img {
    height: 250px;
    overflow: hidden;
    background-color: #ffe4e1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card.transparent-img .card-img img { object-fit: contain; width: 90%; }

/* Keep the image zoom so it feels premium, but not clickable */
.card:hover .card-img img { transform: scale(1.05); }

.card-info {
    padding: 20px;
    background: var(--white);
    border-top: 5px solid var(--koolios-green);
    text-align: center; /* Center text to look more like a label */
}

.card-info h3 { 
    font-size: 1.8rem; 
    color: var(--koolios-coral); 
    margin-bottom: 10px; 
}

.menu-item {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s, opacity 0.5s;
    border: 1px solid white;
}

.menu-item:hover {
    transform: translateY(-5px);
    border-color: var(--koolios-blush);
}

.menu-item.hide { display: none; }

.menu-img-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden; 
    margin: 0 auto 20px auto;
    border: 6px solid var(--koolios-green);
    position: relative;
    background-color: #f0f0f0; 
}

.menu-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center; 
    transform: scale(1); 
    transition: transform 0.5s;
}

.menu-item:hover .menu-img-circle img {
    transform: scale(1.1); 
}

.menu-content h3 {
    color: var(--koolios-coral);
    font-size: 1.5rem;
    margin-bottom: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ingredients {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* --- PATIO BANNER --- */
.patio-banner {
    height: 400px;
    background: url('images/aboutus1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.patio-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
}

.patio-text {
    position: relative;
    color: white;
    text-align: center;
    border: 4px solid white;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    width: 90%; /* Prevent hitting edges on mobile */
    max-width: 600px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--koolios-coral);
    color: white;
    padding: 50px 5%;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.social-icons a {
    font-size: 1.5rem;
    margin: 0 15px;
    color: white;
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: var(--koolios-green);
}

/* --- ANIMATIONS --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    position: relative;
    transform: translateY(100px);
    opacity: 0;
    transition: 1s all ease;
}
.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

.reveal-left, .reveal-right {
    opacity: 0;
    transition: all 1.2s ease-out;
}
.reveal-left { transform: translateX(-100px); }
.reveal-right { transform: translateX(100px); }
.reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- SUB-PAGE HEADER (Graphic Style) --- */
.page-header-styled {
    position: relative;
    background: linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.5)), url('images/anothericecream.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 180px 5% 120px;
    text-align: center;
    margin-bottom: 0; 
}

.page-header-styled h1 {
    font-size: 4rem;
    color: var(--koolios-coral);
    text-shadow: 3px 3px 0px var(--white);
    margin-bottom: 10px;
    animation: slideInLeft 1s ease-out;
}

.page-header-styled p {
    font-size: 1.5rem;
    color: #444;
    font-weight: 600;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeIn 2s ease-out;
}

.page-header-styled .custom-shape-divider-bottom {
    bottom: -1px;
}

/* --- CREATIVE FOOTER STYLES --- */
.creative-footer {
    position: relative;
    background-color: var(--koolios-coral);
    color: white;
    padding-top: 100px;
    margin-top: 50px;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.footer-wave .shape-fill {
    fill: var(--white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 60px;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 280px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.tagline {
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 25px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--koolios-green);
    background: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.hours-col h3, .social-col h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--koolios-green);
    display: inline-block;
    padding-bottom: 5px;
}

.hours-list {
    list-style: none;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.3);
}

.hours-list li:last-child { border-bottom: none; }

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icons a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--koolios-coral);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.social-icons a:hover {
    transform: translateY(-5px) rotate(10deg);
    background: var(--koolios-green);
    color: white;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- RESPONSIVE MEDIA QUERIES (GENERAL) --- */
/* --- MOBILE RESPONSIVENESS & ANIMATION FIX --- */
/* --- MOBILE RESPONSIVENESS & ANIMATION FIX --- */
@media (max-width: 900px) {

    /* 1. Show the Hamburger Icon & Menu Styles */
    .hamburger { display: block; z-index: 1001; }

    .nav-links {
        position: fixed; right: 0; top: 0; height: 100vh; width: 100%;
        background-color: var(--white);
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        transform: translateX(100%); transition: transform 0.4s ease-in-out;
        z-index: 1000; box-shadow: none;
    }

    .nav-links.nav-active { transform: translateX(0%); }

    .nav-links li { opacity: 0; animation: navLinkFade 0.5s ease forwards 0.3s; margin: 20px 0; }
    .nav-links a { font-size: 1.5rem; }

    .hamburger.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    /* 2. General Layout Adjustments */
    .hero, .patio-banner, .page-header-styled { background-attachment: scroll; background-position: center; }
    .hero { flex-direction: column; text-align: center; height: auto; padding: 120px 5% 50px 5%; }
    .hero h1 { font-size: 2.5rem; }
    .hero-image { margin-top: 30px; width: 100%; }
    .hero-image img { width: 80%; margin: 0 auto; }
    .about-section { flex-direction: column; padding: 50px 5%; }
    .footer-content { flex-direction: column; text-align: center; }
    .contact-info p, .social-icons, .hours-list li { justify-content: center; }
    .page-header-styled { padding: 140px 5% 80px; }
    .page-header-styled h1 { font-size: 2.8rem; }

    /* 3. SCROLL STACK MOBILE RESET (Animation Enabled) */
    
    /* Disable the tall scroll track */
    .scroll-stack-track { height: auto; padding: 60px 5%; overflow: visible; }
    
    /* Unstick the container and ensure overflow is visible */
    .sticky-view { 
        position: relative; top: auto; height: auto; display: block; 
        overflow: visible; /* Fixes potential clipping */
    }

    /* Allow wrapper to expand normally */
    .cards-wrapper { height: auto !important; max-width: 100%; margin-top: 40px; }
    
    /* Card Styles: Reset position but prepare for Animation */
    .stack-card {
        position: relative; top: auto; left: auto;
        width: 100%; height: auto; margin-bottom: 40px;
        display: block;
        
        /* Start State: Invisible and slightly down */
        opacity: 0;
        transform: translateY(50px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    /* End State: Triggered by JS adding the 'active' class */
    /* !important forces this to override any JS inline styles */
    .stack-card.active {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .stack-card:last-child { margin-bottom: 0; }

    /* Mobile Layout Inside Card */
    .stack-card-content { flex-direction: column-reverse; gap: 25px; text-align: center; }
    .stack-text { text-align: center; }
    .step-badge { margin: 0 auto 15px auto; }
    .stack-image { width: 100%; height: 250px; }
    .ingredient-list { justify-content: center; }
    .stack-header h2 { font-size: 2rem; }
}

@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- PINNED SCROLL STACK STYLES --- */

/* 1. The Track */
.scroll-stack-track {
    height: 450vh; 
    position: relative;
    background-color: #fff5f5; 
}

/* 2. The Sticky View */
.sticky-view {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stack-header {
    text-align: center;
    margin-bottom: 30px;
    z-index: 10;
    transition: opacity 0.3s;
}
.stack-header h2 { font-size: 3rem; color: var(--koolios-coral); }

/* 3. The Cards Wrapper */
.cards-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    /* Height is set inline in HTML, but can be overridden here */
}

/* 4. The Cards */
.stack-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: white;
    border-radius: 40px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 3px solid white;
    
    /* Initial State for JS */
    transform: translateY(120%) scale(0.9); 
    opacity: 0;
    transition: transform 0.1s linear, opacity 0.1s linear;
    
    display: flex;
    justify-content: center;
}

.stack-card::before {
    content: '';
    position: absolute;
    top: 20px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 6px;
    background-color: var(--card-color, #ccc);
    border-radius: 10px; opacity: 0.5;
}

.stack-card-content {
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.stack-text { flex: 1; text-align: left; }

/* Ensure image stays contained */
.stack-image { 
    flex: 1; 
    height: 100%; 
    min-height: 250px;
    border-radius: 30px; 
    overflow: hidden; 
    box-shadow: 10px 10px 0 var(--koolios-blush);
}
.stack-image img { width: 100%; height: 100%; object-fit: cover; }

.stack-text h3 { font-size: 2rem; color: var(--koolios-coral); margin-bottom: 10px; }
.step-badge {
    background: var(--card-color);
    color: white; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: bold; margin-bottom: 15px;
}

.ingredient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Slightly tighter gap */
}

/* Updated Tag Style for Better Fit */
.tag {
    background-color: #fdf2f1;
    color: #555;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--koolios-blush);
}

.tag.highlight {
    background-color: var(--koolios-pink);
    color: white;
    border-color: var(--koolios-pink);
}


/* --- MOBILE RESET FOR SCROLL STACK (IMPORTANT FIX) --- */
/* When screen is tablet or smaller, disable the fancy scroll and just show list */
@media (max-width: 900px) {
    
    /* 1. Disable the tall scroll track */
    .scroll-stack-track {
        height: auto;
        padding: 60px 5%;
        overflow: visible;
    }
    
    /* 2. Unstick the container */
    .sticky-view {
        position: relative;
        top: auto;
        height: auto;
        display: block;
    }

    /* 3. Allow wrapper to expand normally */
    .cards-wrapper {
        height: auto !important; /* Override inline height */
        max-width: 100%;
        margin-top: 40px;
    }
    
    /* 4. Reset Card Positions (Make them a normal vertical list) */
    .stack-card {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-bottom: 40px;
        
        /* IMPORTANT: Override any JS inline styles */
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
        display: block;
    }

    .stack-card:last-child {
        margin-bottom: 0;
    }

    /* 5. Mobile Layout Inside Card */
    .stack-card-content {
        flex-direction: column-reverse; /* Image on top */
        gap: 25px;
        text-align: center;
    }

    .stack-text { 
        text-align: center; 
    }
    
    .step-badge {
        margin: 0 auto 15px auto;
    }

    .stack-image {
        width: 100%;
        height: 250px; /* Fixed height for mobile image */
    }

    .ingredient-list {
        justify-content: center;
    }
    
    .stack-header h2 {
        font-size: 2rem;
    }
}


