/* ==========================================================
   BRIGHTBOOK - BOOKKEEPING & FINANCIAL SERVICES SRI LANKA
   Premium Financial Aesthetics & Glassmorphism Design System
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Abhaya+Libre:wght@500;700&display=swap');

:root {
    /* Curated Light Mode Financial Color Palette - Golden Cream Orange Theme */
    --bg-main: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #fffbeb;
    
    --accent-emerald: #d97706;
    --accent-emerald-glow: rgba(217, 119, 6, 0.2);
    --accent-teal: #ea580c;
    --accent-gold: #b45309;
    --accent-gold-glow: rgba(245, 158, 11, 0.25);
    
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --bs-secondary-color: #1e293b;
    --text-muted: #475569;
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(217, 119, 6, 0.4);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-sinhala: 'Abhaya Libre', serif, sans-serif;
    
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.text-secondary {
    color: #1e293b !important;
}

a {
    color: var(--accent-emerald);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-gold);
}

/* Glassmorphism Navbar - Blue Shade of Logo */
.navbar-glass {
    background: rgba(15, 30, 50, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(10, 25, 47, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: var(--transition-smooth);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.65rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 1.25rem !important;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-teal));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #000;
    box-shadow: 0 0 15px var(--accent-emerald-glow);
}

.brand-highlight {
    color: var(--accent-emerald);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(245, 158, 11, 0.15);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 0 5rem;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, rgba(6, 13, 26, 0) 50%),
                radial-gradient(circle at 20% 80%, rgba(234, 88, 12, 0.12) 0%, rgba(6, 13, 26, 0) 50%);
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #d97706;
    color: #9a3412;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: #081220;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}

.text-gradient {
    background: linear-gradient(135deg, #9a3412 0%, #ea580c 50%, #c2410c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #0f172a;
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Custom Buttons */
.btn-emerald {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-teal));
    color: #ffffff;
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.25);
    transition: var(--transition-smooth);
}

.btn-emerald:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.35);
    color: #ffffff;
}

.btn-outline-gold {
    background: transparent;
    color: var(--accent-emerald);
    border: 2px solid var(--accent-emerald);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.btn-outline-gold:hover {
    background: var(--accent-emerald);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px var(--accent-gold-glow);
}

/* Glass Cards & Micro-Animations */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-emerald), var(--accent-gold));
    opacity: 0;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.glass-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.glass-card:hover .service-icon {
    background: var(--accent-emerald);
    color: #000;
    transform: rotate(6deg) scale(1.1);
}

/* Interactive Estimator Widget */
.estimator-box {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-card));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

@media (max-width: 768px) {
    .estimator-box {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 576px) {
    .estimator-box {
        padding: 0.85rem !important;
        border-radius: 12px !important;
    }
}

.estimator-box::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-emerald), transparent, var(--accent-gold));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.4;
}

.range-slider {
    width: 100%;
    accent-color: var(--accent-emerald);
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

.price-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-emerald);
    text-shadow: 0 0 20px var(--accent-emerald-glow);
}

/* Contact Info Section */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 1.2rem;
    transition: var(--transition-smooth);
}

.contact-item:hover {
    border-color: var(--accent-gold);
    transform: translateX(6px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Forms Input Styling */
.form-control, .form-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}

.form-control:focus, .form-select:focus {
    background: #ffffff;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
    color: #0f172a;
}

.form-control::placeholder {
    color: #64748b;
}

/* Footer Styling - Blue Shade of Logo */
.footer-glass {
    background: #0d1a2d !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-link {
    color: #cbd5e1 !important;
    display: block;
    margin-bottom: 0.6rem;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: #fbbf24 !important;
    transform: translateX(4px);
}

/* Stats Counter */
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .price-display {
        font-size: 2.2rem;
    }
}

/* ==========================================================
   LIGHT MODE GOLDEN CREAM ORANGE THEME OVERRIDES
   ========================================================== */

/* Override Bootstrap Dark/Light utilities for seamless Light Theme */
.bg-dark {
    background-color: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

.text-white, .text-light {
    color: #0f172a !important;
}

.border-secondary {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: #cbd5e1 !important;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.15);
}

/* Navbar toggler on blue slate background */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.navbar-toggler-icon {
    filter: none !important;
}

/* Accordion in light mode */
.accordion-item, .accordion-button {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}
.accordion-button:not(.collapsed) {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.1);
}

/* Social buttons and text in footer blue shade */
.footer-glass h1, .footer-glass h2, .footer-glass h3, .footer-glass h4, .footer-glass h5, .footer-glass h6 {
    color: #ffffff !important;
}
.footer-glass .text-secondary, .footer-glass .text-muted, .footer-glass p, .footer-glass span, .footer-glass li {
    color: #cbd5e1 !important;
}
.footer-glass .text-white {
    color: #ffffff !important;
}
.footer-glass .bg-dark {
    background-color: #142844 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
.footer-glass .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}
.footer-glass .btn-outline-light:hover {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #000000 !important;
}

/* Top bar slate blue */
.top-bar-slate {
    background-color: #081220 !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.top-bar-slate a, .top-bar-slate span {
    color: #cbd5e1 !important;
}

/* Override Success / Info / Warning utilities for Light Mode Golden Cream Orange */
.text-success {
    color: #d97706 !important; /* Deep Golden Orange */
}
.bg-success {
    background-color: #f59e0b !important;
}
.border-success {
    border-color: #f59e0b !important;
}
.btn-success {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.text-info {
    color: #b45309 !important; /* Rich amber */
}
.text-warning {
    color: #ea580c !important; /* Vibrant orange */
}
.bg-primary {
    background: linear-gradient(135deg, #0f172a, #1e3a5f) !important;
    color: #ffffff !important;
}

/* ==========================================================
   PRELOADER & WHATSAPP FLOATING WIDGET
   ========================================================== */
#brightbook-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#brightbook-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.whatsapp-float-btn {
    background-color: #25D366 !important;
    color: #ffffff !important;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.8) !important;
    color: #ffffff !important;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

#whatsapp-widget:hover .whatsapp-tooltip {
    transform: translateY(-50%) scale(1.05);
    transition: all 0.3s ease;
}

/* ==========================================================
   GLOBAL OVERFLOW & HORIZONTAL SCROLL PREVENTION
   ========================================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Prevent Bootstrap row negative margins from pushing outside viewport */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* Ensure media, maps, and embeds scale responsively without overflow */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Ensure responsive tables scroll internally instead of overflowing screen */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Ensure containers and sections clip horizontal overflow cleanly */
section, header, footer, .top-bar-slate, .navbar-glass, .hero-section, .container, .container-fluid {
    max-width: 100% !important;
}

/* Prevent fixed/absolute widgets from extending off-screen */
#whatsapp-widget {
    max-width: calc(100vw - 1.5rem);
}

/* ==========================================================
   RESPONSIVE WHATSAPP CTA BUTTON SIZING
   ========================================================== */
.btn-wa-cta {
    font-size: 1.15rem !important;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .btn-wa-cta {
        font-size: 0.95rem !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .btn-wa-cta {
        font-size: 0.82rem !important;
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
        line-height: 1.35 !important;
        white-space: normal;
    }
    .btn-wa-cta i {
        font-size: 1.15rem !important;
    }
}

/* ==========================================================
   MAXIMIZE ESTIMATOR SECTION CHILDREN WIDTH ON MOBILE VIEWS
   ========================================================== */
@media (max-width: 768px) {
    #estimator-section .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    #estimator-section .container {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }
    #estimator-section .col-lg-6,
    #estimator-section .col-md-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
