/* Premium Optical Store Theme - Black & Blue Dark Mode */
:root {
    --primary-color: #60a5fa;    /* Brighter Blue — WCAG AA contrast on dark bg */
    --secondary-color: #22d3ee;  /* Brighter Cyan — WCAG AA contrast on dark bg */
    --accent-color: #a78bfa;     /* Brighter Purple Accent */
    --background-color: #050505; /* True Black Body */
    --text-color: #f5f5f5;       /* White text for maximum contrast */
    --card-bg: rgba(20, 20, 20, 0.85); /* Glass card bg — slightly more opaque for contrast */
    --nav-bg: rgba(5, 5, 5, 0.95); 
}

/* Base & Typography — fonts loaded via preload in _Layout.cshtml */

html, body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
}

/* Glassmorphism Navbar */
header .navbar {
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* subtle bottom border */
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color) !important;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin: 0 10px;
    position: relative;
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color) !important;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-primary:not(:disabled):not(.disabled):hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.6);
}

.btn-outline-primary {
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    background-color: transparent;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

/* Cards & Hover Effects */
.card {
    border-radius: 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-title {
    color: var(--text-color) !important;
}

.card-text {
    color: #d1d5db !important;
}

.card-footer {
    color: #d1d5db !important;
}

/* Override Bootstrap link-primary for WCAG AA on dark backgrounds */
.link-primary {
    color: var(--secondary-color) !important;
    text-decoration: underline !important;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.3);
}

/* Hero Elements / Utility */
.display-3, .display-4, .display-5 {
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.text-gold {
    color: var(--secondary-color) !important;
}

/* Footer styling */
footer {
    background-color: #050505; /* Deep black footer */
    border-top: 1px solid rgba(93, 173, 226, 0.2) !important;
}

footer h5, footer strong, footer a {
    color: var(--primary-color) !important;
}

footer p, footer address {
    color: rgba(255, 255, 255, 0.6);
}

/* Dark Mode Overrides for Bootstrap Utilities */
.bg-white, .bg-light {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* Override Bootstrap text-primary for WCAG AA contrast on dark backgrounds */
.text-primary { color: var(--primary-color) !important; }
.text-dark { color: var(--primary-color) !important; }
.text-muted { color: #d1d5db !important; }

.form-control, .form-select {
    background-color: #1f1f1f;
    border-color: #333;
    color: #fff;
}
.form-control:focus, .form-select:focus {
    background-color: #2a2a2a;
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(93, 173, 226, 0.25);
}

/* Smooth enter animations — opacity-only to avoid CLS.
   transform: translateY is removed because it can contribute to visual shift metrics. */
.fade-in-up {
    animation: fadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

/* Hero variant: starts fully visible so LCP text paints immediately */
.fade-in-up-hero {
    opacity: 1;
}

/* Hero image — responsive sizing for mobile & desktop */
.hero-img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .hero-img {
        max-height: 420px;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Misc Utilities */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

/* Dark‑mode accordion overrides */
.accordion-button {
    color: #fff !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important;
}

.accordion-body {
    color: #d1d5db !important;
}

/* Ensure form labels are readable on dark bg */
.form-label {
    color: #d1d5db !important;
}

/* Ensure border‑top separator is visible */
.border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Navbar shrink on scroll — subtle UX polish */
.navbar-scrolled {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4) !important;
}

.navbar-scrolled .navbar-brand {
    font-size: 1.5rem;
}

/* Active nav-link indicator */
.nav-link.active {
    color: var(--secondary-color) !important;
}
.nav-link.active::after {
    width: 100%;
}

/* ── Social icon hover via CSS (replaces inline JS handlers) ── */
.social-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.social-icon:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 4px 15px rgba(96,165,250,0.3);
}
.social-icon-lg {
    width: 45px;
    height: 45px;
}

/* ── Brand card hover via CSS (replaces inline JS handlers) ── */
.brand-hover-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    aspect-ratio: 16/10;
    cursor: pointer;
    border: 1px solid rgba(96,165,250,0.06);
    transition: all 0.5s cubic-bezier(0.165,0.84,0.44,1);
}
.brand-hover-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 45px rgba(96,165,250,0.25);
    transform: translateY(-6px);
}
.brand-hover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165,0.84,0.44,1);
}
.brand-hover-card:hover img {
    transform: scale(1.06);
}

/* ── Pulsing WhatsApp FAB animation ── */
.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: whatsappPulse 2s ease-in-out infinite;
}
.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37,211,102,0.7);
    animation: none;
}
@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.8), 0 0 0 10px rgba(37,211,102,0.15); }
}

/* ── Back-to-top button ── */
.back-to-top {
    position: fixed;
    bottom: 94px;
    right: 28px;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(96,165,250,0.15);
    border: 1px solid rgba(96,165,250,0.3);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: rgba(96,165,250,0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(96,165,250,0.3);
}

/* ── WhatsApp CTA button hover via CSS ── */
.btn-whatsapp {
    border-color: #25D366 !important;
    color: #25D366 !important;
    background-color: transparent;
}
.btn-whatsapp:hover {
    background-color: #25D366 !important;
    color: #fff !important;
    border-color: #25D366 !important;
}

/* ── Glassmorphism info card (contact, CTA) ── */
.glass-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
}

/* ── Section heading decoration ── */
.section-divider {
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0.5rem auto 0;
    border: none;
}
.section-divider-gradient {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    margin: 0.5rem auto 0;
    border: none;
}

/* ── Star rating color ── */
.stars-gold {
    color: #fbbf24;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

/* ── Review card avatar gradient ── */
.review-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #000;
    font-size: 1rem;
}

/* ── Amenity card ── */
.amenity-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.amenity-card:hover {
    border-color: rgba(96,165,250,0.2);
    transform: translateY(-3px);
}

/* Mobile collapse fix — hide menu on non-show but keep it available */
@media (max-width: 991.98px) {
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    .navbar-collapse.show {
        display: block !important;
    }
}

/* ── Mobile spacing & responsive fixes ── */
@media (max-width: 767.98px) {
    /* Reduce hero heading on small screens */
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }

    /* Tighter section padding on mobile */
    .pt-5 { padding-top: 2rem !important; }
    .mt-5 { margin-top: 2rem !important; }

    /* Ensure btn-lg isn't too wide on mobile — allow wrapping */
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Reduce card padding on small screens */
    .card .card-body { padding: 1rem; }
    .card.p-4 { padding: 1rem !important; }

    /* Footer column spacing */
    footer .col-md-4 { margin-bottom: 1.5rem; }
    footer .text-md-end { text-align: left !important; }

    /* Social icons slightly smaller on mobile */
    .social-icon { width: 36px; height: 36px; }
    .social-icon-lg { width: 40px; height: 40px; }

    /* Back-to-top button position */
    .back-to-top { bottom: 90px; right: 20px; }
    .whatsapp-fab { bottom: 20px; right: 20px; width: 54px; height: 54px; }
}

/* Responsive navbar logo: larger and always visible */
.navbar-logo {
    height: 64px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    background: #050505;
    border-radius: 10px;
    padding: 4px 8px;
    display: block;
}
@media (max-width: 575.98px) {
    .navbar-logo {
        height: 48px;
        max-width: 120px;
        padding: 2px 4px;
    }
}