/* ==========================================================================
   DENCIA HOME OF BEAUTY - MAIN STYLESHEET
   ========================================================================== */

/* --- 1. COLOR PALETTE & VARIABLES --- */
:root {
    /* Main Colors */
    --plum-primary: #8B4A7C;       /* Main brand color */
    --plum-dark: #6B3560;          /* Darker plum for footer and contrast */
    --plum-light: #A86B9B;         /* Lighter plum for hover states */
    
    /* Secondary Colors */
    --white: #FFFFFF;
    --off-white: #F9F9F9;          /* For subtle section backgrounds */
    --sky-blue: #87CEEB;           /* Accent color for freshness and calm */
    --sky-blue-light: #E8F4F8;     /* Very light sky blue for section backgrounds */
    
    /* Accent Color */
    --gold-accent: #D4AF37;        /* Luxurious gold for borders and highlights */
    
    /* Text Colors */
    --text-dark: #333333;
    --text-light: #666666;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- 2. GLOBAL RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--plum-primary);
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 3. GLOBAL BUTTON STYLES --- */
.btn-primary {
    display: inline-block;
    background: var(--gold-accent);
    color: var(--plum-dark);
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--white);
    color: var(--plum-primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-secondary {
    display: inline-block;
    border: 2px solid var(--plum-primary);
    color: var(--plum-primary);
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    background: transparent;
}

.btn-secondary:hover {
    background: var(--plum-primary);
    color: var(--white);
}

/* --- 4. HEADER STYLES --- */
.main-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--plum-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav a {
    color: var(--plum-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--sky-blue);
    border-bottom: 2px solid var(--gold-accent);
}

.btn-call {
    background-color: var(--plum-primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-call:hover {
    background-color: var(--sky-blue);
    color: var(--plum-dark);
}

/* Mobile Menu Toggle (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1001; /* Ensures it stays clickable and above the dropdown */
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--plum-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- 5. FOOTER STYLES --- */
.main-footer {
    background-color: var(--plum-dark);
    color: var(--white);
    padding: 60px 0 20px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 0 20px;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-col h3 {
    color: var(--gold-accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--white);
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-col a:hover {
    color: var(--sky-blue);
    padding-left: 5px;
    opacity: 1;
}

.footer-col address, .footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 15px;
    font-style: normal;
}

.footer-phone a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sky-blue);
}

.footer-phone a:hover {
    color: var(--gold-accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* --- 6. HOME PAGE SECTIONS --- */

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    background: rgba(107, 53, 96, 0.75); /* Plum overlay */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Welcome Section */
.welcome-section {
    padding: 80px 0;
    text-align: center;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--gold-accent);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.welcome-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: var(--off-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(107, 53, 96, 0.1);
}

.service-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-content {
    padding: 30px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Why Choose Us / Features */
.why-choose-us {
    padding: 80px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
    text-align: center;
}

.feature-box {
    padding: 30px;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--sky-blue);
    margin-bottom: 20px;
}

.feature-box h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--plum-primary);
}

.feature-box p {
    color: var(--text-light);
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: var(--sky-blue-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--plum-primary);
}

.testimonial-card .quote {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.8;
}

.testimonial-card .client-name {
    color: var(--plum-primary);
    font-weight: 700;
    font-family: var(--font-body);
}

/* Bottom CTA Banner */
.bottom-cta {
    background: var(--plum-primary);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.bottom-cta h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.bottom-cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.bottom-cta .btn-primary {
    background: var(--gold-accent);
    color: var(--plum-dark);
}

.bottom-cta .btn-primary:hover {
    background: var(--sky-blue);
    color: var(--plum-dark);
}

/* --- 7. SUB-PAGES (Hair, Nails, Massages) --- */

/* Page Header (For inner pages) */
.page-header {
    background: var(--plum-dark);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--sky-blue);
}

/* Price List Styling */
.price-list-section {
    padding: 60px 0;
}

.price-category {
    margin-bottom: 60px;
}

.price-category h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.price-category h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gold-accent);
}

.price-list {
    max-width: 800px;
    margin: 0 auto;
}

.price-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
}

.price-list li span:first-child {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.price-list li span:last-child {
    font-weight: 700;
    color: var(--plum-primary);
    font-size: 1.1rem;
}

/* Special Promo Box */
.special-promo {
    background: var(--sky-blue-light);
    border: 1px solid var(--sky-blue);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    max-width: 800px;
    margin: 30px auto;
    color: var(--plum-dark);
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- 8. CONTACT PAGE --- */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-box {
    background: var(--plum-dark);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
}

.contact-info-box h2 {
    color: var(--gold-accent);
    margin-bottom: 30px;
}

.contact-info-box p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.contact-info-box a {
    color: var(--sky-blue);
}

.contact-info-box a:hover {
    color: var(--gold-accent);
}

.contact-form-box {
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-form-box h2 {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--plum-primary);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--plum-primary);
    box-shadow: 0 0 5px rgba(139, 74, 124, 0.2);
}

.contact-form-box .btn-primary {
    width: 100%;
    cursor: pointer;
}

.map-container {
    margin-top: 50px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* --- 9. RESPONSIVE DESIGN (TABLET & MOBILE) --- */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .services-grid, 
    .features-grid, 
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 10. FLOATING BUTTONS --- */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999; /* Ensures they stay on top of everything */
}

/* Base styles for both buttons */
.whatsapp-float, 
.back-to-top {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* WhatsApp Button Styling */
.whatsapp-float {
    background-color: #25D366; /* Official WhatsApp Green */
    color: var(--white);
}

.whatsapp-float:hover {
    background-color: #128C7E; /* Darker green on hover */
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* Back to Top Button Styling */
.back-to-top {
    background-color: var(--plum-primary);
    color: var(--white);
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

/* This class is added via JavaScript when the user scrolls down */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--sky-blue);
    color: var(--plum-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(135, 206, 235, 0.4);
}

/* SVG Icon Sizing */
.whatsapp-float svg, 
.back-to-top svg {
    width: 28px;
    height: 28px;
}

/* --- 11. GALLERY PAGE STYLES --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    height: 350px; /* Fixed height for uniform grid */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.gallery-item:hover img {
    transform: scale(1.08);
}

/* Elegant Overlay on Hover */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px 20px;
    background: linear-gradient(to top, rgba(107, 53, 96, 0.9), transparent);
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--gold-accent);
    font-weight: 600;
}

/* --- HEADER LOGO UPDATES --- */
.logo-link {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo image and text */
}

.header-logo {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--plum-primary);
    font-weight: 600;
    white-space: nowrap;
}

/* --- MOBILE MENU HAMBURGER ANIMATION --- */
/* Transform Hamburger to 'X' when active */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- RESPONSIVE DESIGN UPDATES (MOBILE) --- */
@media (max-width: 992px) {
    /* Adjust logo text size on tablets */
    .logo-text {
        font-size: 1.3rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    
    /* --- Header Layout --- */
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    /* --- Logo Section --- */
    .logo-link {
        gap: 8px; /* Reduce space between logo and text */
    }

    .header-logo {
        height: 40px; /* Slightly smaller logo for mobile */
    }

    /* Show and resize the logo text on mobile */
    .logo-text {
        display: block; /* Change from 'none' to 'block' */
        font-size: 1.1rem; /* Scale down so it fits */
        white-space: normal; /* Allow it to wrap if very small screen */
        line-height: 1.2;
    }
    
    /* --- Mobile Navigation Dropdown --- */
    .main-nav {
        display: none; /* Hidden by default */
        position: absolute; /* Take it out of the header flow */
        top: 100%; /* Position it directly below the header */
        left: 0;
        width: 100%;
        background-color: var(--white); /* CRITICAL: Solid background to cover content below */
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); /* Premium shadow */
        padding: 20px 0;
        z-index: 999; /* Ensure it sits above the hero section */
        border-top: 1px solid #eee;
    }
    
    .main-nav.active {
        display: block; /* Shown when toggled by JS */
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-bottom: 10px;
    }

    .main-nav a {
        font-size: 1.1rem; /* Slightly larger text for easier tapping */
    }
    
    /* --- Mobile Menu Toggle --- */
    .mobile-menu-toggle {
        display: flex; /* Show the hamburger button */
    }
    
    /* --- Hide Desktop Elements --- */
    .header-cta {
        display: none; /* Hide desktop call button on mobile */
    }

    /* --- Other Mobile Adjustments --- */
    .services-grid, 
    .features-grid, 
    .testimonials-grid, 
    .footer-container,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        height: 60vh;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    /* Price List */
    .price-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .price-list li span:last-child {
        color: var(--plum-dark);
        font-weight: 800;
    }
}



/* ============================================================
   DENCIA MOBILE NAVIGATION - FINAL OVERRIDE
   ============================================================ */

@media (max-width: 768px) {

    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #FFFFFF;
    }

    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .logo-link {
        flex: 1;
        min-width: 0;
    }

    .logo-text {
        white-space: normal;
        overflow-wrap: break-word;
    }

    .mobile-menu-toggle {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 8px;
        background: transparent;
        border: 0;
        cursor: pointer;
        position: relative;
        z-index: 1002;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        border-radius: 3px;
        background: #8B4A7C;
        transition: transform .3s ease, opacity .3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        background: #FFFFFF;
        padding: 15px 20px 25px;
        box-shadow: 0 12px 25px rgba(0,0,0,.15);
        border-top: 2px solid #D4AF37;
        z-index: 1001;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #F0E7EE;
    }

    .main-nav a {
        display: block;
        padding: 15px;
        color: #8B4A7C;
        font-weight: 600;
        font-size: 15px;
        text-align: left;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        color: #6B3560;
        background: #F9F5F8;
    }

    .header-cta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle span {
        transition: none;
    }
}


    .services-grid, 
    .features-grid, 
    .testimonials-grid, 
    .footer-container,
    .contact-grid,
    .gallery-grid { /* <-- Added gallery-grid here */
        grid-template-columns: 1fr;
    }