/* Global Fixes for Bhenito Website - Applied to ALL Pages */

/* Fonts (sitewide): Inter for body, Playfair for headings */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700&family=Lato:wght@300;400;700;900&display=swap');

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Headings: premium serif hierarchy everywhere (marketing site) */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.02em;
}

/* Moving ticker/banner (homepage) */
.moving-ticker {
    background: #0b0f1a;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    color: rgba(255, 255, 255, 0.92);
}

.moving-ticker a {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
}

.moving-ticker a:hover {
    text-decoration: underline;
}

.moving-ticker-track {
    display: flex;
    gap: 2.5rem;
    white-space: nowrap;
    animation: tickerScroll 22s linear infinite;
    padding: 0.55rem 0;
}

.moving-ticker:hover .moving-ticker-track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .moving-ticker-track {
        animation: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .moving-ticker-track > * {
        scroll-snap-align: start;
    }
}

/* Fix Font Awesome CDN Issues */
.fas, .far, .fab, .fa {
    font-display: swap;
}

/* Global Navigation Fixes */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand img {
    max-height: 50px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

/* Ensure no bullets show in navbar lists on any environment */
.navbar-nav,
.navbar-nav li,
.navbar .dropdown-menu,
.navbar .dropdown-menu li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Improve navbar layout and spacing */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-menu {
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4AF37;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Global Button Fixes */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    color: #000;
}

.btn-outline-light {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.btn-outline-light:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
}

/* Global Card Fixes */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.15);
}

/* Global Form Fixes */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Global Image Fixes */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Global Section Fixes */
section {
    padding: 4rem 0;
}

/* Global Hero Section Fixes */
.hero-section {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23D4AF37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Global Footer Fixes */
.footer {
    background: #000;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: #D4AF37;
    margin-bottom: 1rem;
}

.footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #D4AF37;
}

/* Global WhatsApp Button Fixes */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.whatsapp-float a {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25d366, #1db954);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

/* Global Animation Fixes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Global Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Global Error States */
.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Global Success States */
.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Global Accessibility Fixes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Global Focus States (keyboard-friendly) */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid #D4AF37;
    outline-offset: 2px;
}

/* Skip link (added by mobile-enhancements.js on some pages) */
.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #D4AF37;
    color: #000;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-140%);
    transition: transform 0.2s ease;
    z-index: 10000;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

/* Global Print Styles */
@media print {
    .navbar,
    .whatsapp-float,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Global High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #ffffff;
        --text-color: #000000;
    }
}

/* Global Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff;
        border-top: 1px solid #eee;
        padding: 0.5rem 0.75rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }

    /* Override tiny nav text from legacy style.css on mobile */
    .navbar-nav .nav-link {
        font-size: 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .navbar .btn,
    .navbar .btn-primary,
    .navbar .btn-outline-light {
        min-height: 44px;
    }

    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin: 0;
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .dropdown-item {
        border-radius: 8px;
        background: #f8f9fa;
        margin-bottom: 0.25rem;
    }
}

/* Mobile-first readability + touch targets */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    /* Prevent iOS zoom on form focus */
    input, select, textarea, .form-control {
        font-size: 16px;
    }

    /* Better tap targets everywhere */
    .btn,
    button,
    [role="button"],
    .dropdown-item,
    a.nav-link {
        min-height: 44px;
    }

    /* Responsive type scale (works even on pages without brand-typography.css) */
    h1, .display-1, .display-2, .display-3, .display-4 {
        font-size: clamp(2rem, 7vw, 3rem);
        line-height: 1.15;
    }

    h2 {
        font-size: clamp(1.5rem, 5.5vw, 2.25rem);
        line-height: 1.2;
    }

    h3 {
        font-size: clamp(1.25rem, 4.5vw, 1.75rem);
        line-height: 1.25;
    }

    /* Parallax/fixed backgrounds are janky on mobile Safari */
    .hero-section {
        background-attachment: scroll !important;
    }
}

/* Touch devices: remove hover “jumping” that feels broken on mobile */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .card:hover,
    .navbar-brand:hover img,
    .nav-link:hover::after {
        transform: none !important;
    }
}

/* Fix 100vh clipping on mobile browsers (address bar issues).
   Works with Bootstrap utility classes and common hero patterns. */
@supports (height: 100svh) {
    .vh-100 { height: 100svh !important; }
    .min-vh-100 { min-height: 100svh !important; }
    .hero-section { min-height: 100svh; }
}

@supports (height: 100dvh) {
    .vh-100 { height: 100dvh !important; }
    .min-vh-100 { min-height: 100dvh !important; }
    .hero-section { min-height: 100dvh; }
}
