/* Color Palette:
   --color-red: #A32929; (Deep Red/Burgundy)
   --color-brown: #5D3A2F; (Rich Brown)
   --color-golden: #FFD700; (Gold)
   --color-white: #ffffff;
   --color-light-brown: #f5f5f5;
   --color-whatsapp: #25D366;
*/

/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: var(--color-white);
    scroll-behavior: smooth; 
}

:root {
    --color-red: #A32929; 
    --color-brown: #5D3A2F;
    --color-golden: #FFD700;
    --color-golden-light: #FFEB84; 
    --color-white: #ffffff;
    --color-light-brown: #f5f5f5;
    --color-whatsapp: #25D366;
}

/* Typography & Utility Classes (Unchanged) */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--color-brown);
    font-weight: 700;
    line-height: 1.2;
}

h2.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-red);
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-golden);
    margin: 10px auto 0;
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-button {
    background-color: var(--color-red);
    color: var(--color-white);
    border: 2px solid var(--color-red);
}

.primary-button:hover {
    background-color: var(--color-brown);
    border-color: var(--color-brown);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.dark-bg {
    background-color: var(--color-brown);
    color: var(--color-white);
}

.dark-bg h2, .dark-bg h3 {
    color: var(--color-golden-light);
}

/* --- Header / Navigation --- */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1rem;
}

.logo {
    height: 60px; 
    width: auto;
    max-height: 80px;
}

#navbar a {
    color: var(--color-brown);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    transition: color 0.3s, border-bottom 0.3s;
}

#navbar a:hover {
    color: var(--color-red);
    border-bottom: 2px solid var(--color-golden);
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-brown);
    display: none; /* Hide on desktop */
}

/* --- Home Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Using the hero.webp image provided by the user */
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), 
        url('assets/hero.jpg') no-repeat center center/cover;
    background-attachment: fixed; 
    padding-top: 80px; 
}

.hero-content {
    color: var(--color-white);
    max-width: 800px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* --- General Section Styling --- */
.section {
    padding: 5rem 0;
    min-height: 80vh;
    overflow: hidden; 
}

/* --- Cakes Section --- */
.cakes-section {
    background-color: var(--color-light-brown);
}

.cake-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cake-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cake-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cake-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card-info {
    padding: 15px;
    text-align: center;
}

.card-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-brown);
}

.card-info .price {
    color: var(--color-red);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.order-button {
    background-color: var(--color-golden);
    color: var(--color-brown);
    width: 100%;
    border-radius: 4px;
    padding: 10px;
}

.order-button:hover {
    background-color: var(--color-golden-light);
}

/* --- Gallery Section (FIXED: Image Display) --- */
.gallery-section {
    background-color: var(--color-brown);
    padding: 5rem 0; 
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /* Aspect Ratio Box Setup: */
    position: relative;
    padding-top: 100%; /* Creates a square aspect ratio (adjust to 75% for 4:3) */
}

.gallery-item img {
    /* Absolute position to fit Aspect Ratio Box */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* FIX: Use 'contain' to ensure the whole image is visible (no cropping) */
    object-fit: contain; 
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease; 
    background-color: rgba(255, 255, 255, 0.1); /* Subtle white background for contain gap */
}

.gallery-item:hover img {
    transform: scale(1.05); /* Gentle Zoom Effect */
    opacity: 0.85; /* Gentle Fade Effect */
}

/* --- Contact Section --- */
.contact-section {
    background-color: var(--color-white);
}

.contact-flex {
    display: flex;
    gap: 40px;
}

.contact-info-col, .contact-form-col {
    flex: 1;
}

.contact-title {
    margin-bottom: 2rem;
    text-align: left;
}

.contact-info-col p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.contact-info-col a {
    color: var(--color-brown);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info-col a:hover {
    color: var(--color-red);
}

.icon-red {
    color: var(--color-red);
    width: 25px;
    text-align: center;
}

/* Contact Form */
.contact-form {
    background-color: var(--color-light-brown);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-brown);
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-golden);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.contact-form .primary-button {
    width: 100%;
    margin-top: 10px;
}

/* Google Map */
.map-container {
    height: 300px;
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--color-golden);
    animation: glow 1.5s infinite alternate;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes glow {
    from { box-shadow: 0 0 5px var(--color-golden), 0 0 10px var(--color-whatsapp); }
    to { box-shadow: 0 0 10px var(--color-golden), 0 0 20px var(--color-whatsapp); }
}

/* --- Footer --- */
footer {
    background: linear-gradient(to right, var(--color-red), var(--color-golden), var(--color-brown));
    color: var(--color-white);
    padding: 20px 0;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copyright-text {
    font-size: 0.9rem;
    font-weight: 400;
}

.social-icons a {
    color: var(--color-white);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--color-red);
}

/* --- Animations (Fade-In) --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-down.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utility for animation delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* --- Lightbox Styles (New Feature) --- */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

#lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* Image Animation */
#lightbox img.lightbox-image {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4); /* golden glow */
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

#lightbox.active img.lightbox-image {
    transform: scale(1);
    opacity: 1;
}

/* Close Button */
#lightbox .close-lightbox {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 2rem;
    color: #FFD700; /* golden */
    cursor: pointer;
    transition: color 0.2s;
    font-weight: bold;
}

#lightbox .close-lightbox:hover {
    color: #fff;
}

/* Controls (Arrows) */
.lightbox-controls {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-controls span {
    font-size: 2.3rem;
    color: #FFD700;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.lightbox-controls span:hover {
    color: #fff;
    transform: scale(1.2);
}

/* --- Mobile Responsiveness (Media Queries - FIXED) --- */
@media (max-width: 992px) {
    /* Tablet/Smaller Desktop */
    .cake-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-flex {
        flex-direction: column;
    }
    .contact-title {
        text-align: center;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    /* Mobile */
    
    /* --- NAVIGATION / HEADER FIXES (Ensures menu is hidden by default) --- */
    .nav-content {
        align-items: center;
    }
    #navbar {
        position: absolute;
        top: 80px; /* Adjusted to be slightly lower than logo height */
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--color-white);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        
        /* KEY FIX: Translate outside of view when inactive */
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        visibility: hidden;
        pointer-events: none;
        z-index: 900;
    }

    #navbar.active {
        /* Bring the menu into view */
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }
    
    .menu-toggle {
        display: block; /* Show menu icon */
    }

    /* --- SECTION LAYOUT FIXES --- */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .section {
        padding: 4rem 0;
    }

    .cake-grid {
        grid-template-columns: 1fr; 
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column for mobile gallery */
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        line-height: 50px;
        bottom: 20px;
        right: 20px;
    }
}