/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --gold: #D4AF37;
    --gold-dark: #B8941F;
    --gold-light: rgba(212, 175, 55, 0.15);
    --black: #0a0a0a;
    --dark-gray: #1a1a1a;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-main: #4a4a4a;
    --text-light: #777777;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--black);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. TYPOGRAPHY & BASE STYLES
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--black);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-light);
}

.gold-text {
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.gold-line {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto;
}

/* =========================================
   3. NAVIGATION (Tightened & Refined)
   ========================================= */
.navbar {
    background: var(--black);
    padding: 0.6rem 0; /* Reduced for a sleeker, compact look */
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar.scrolled {
    padding: 0.4rem 0; /* Even tighter when scrolling */
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--gold) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1; /* Prevents extra vertical space */
}

/* Strictly constrain the Navbar logo */
.navbar-brand img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
    display: block; /* Removes any inline-image bottom spacing */
    margin: 0;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    margin-left: 1.5rem;
    transition: var(--transition);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--gold);
    transition: width 0.3s ease-in-out;
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 80%;
}

/* =========================================
   4. BUTTONS & MICRO-INTERACTIONS
   ========================================= */
.btn {
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.8rem 2rem;
    border-radius: 2px;
    transition: var(--transition);
}

.btn-gold {
    background: var(--gold);
    color: var(--black);
    border: 2px solid var(--gold);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.btn-black {
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
    font-weight: 600;
}

.btn-black:hover {
    background: transparent;
    color: var(--black);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* =========================================
   5. HERO SECTION (Adjusted to clear navbar)
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, rgba(10,10,10,0.92) 0%, rgba(26,26,26,0.85) 100%), 
                url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 100px; /* Increased to safely clear the fixed navbar */
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    color: rgba(255,255,255,0.8);
    max-width: 90%;
}

.hero-image img {
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* =========================================
   6. LAYOUT & SPACING
   ========================================= */
.section-padding {
    padding: 6rem 0;
}

@media (min-width: 992px) {
    .section-padding {
        padding: 8rem 0;
    }
}

/* =========================================
   7. COMPONENTS (CARDS, STATS, TEAM)
   ========================================= */
.service-card, .mission-vision-card, .contact-info-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 4px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.service-card:hover, .mission-vision-card:hover, .contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--gold-light);
}

.service-icon, .mission-vision-card .icon, .contact-info-card .icon {
    width: 80px;
    height: 80px;
    background: var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--gold);
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.1);
}

/* Stats Section */
.stats-section {
    background: var(--dark-gray);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    opacity: 0.05;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Team Cards */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.team-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.team-card:hover img {
    transform: scale(1.05);
}

.team-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, transparent 100%);
    padding: 3rem 1.5rem 1.5rem;
    color: var(--white);
}

.team-overlay h4 { 
    font-size: 1.5rem; 
    margin-bottom: 0.3rem; 
    color: var(--white);
}
.team-overlay p { 
    color: var(--gold); 
    font-size: 0.9rem; 
    margin-bottom: 0; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   8. INNER PAGE SPECIFICS
   ========================================= */
.page-header {
    background: linear-gradient(135deg, rgba(10,10,10,0.95) 0%, rgba(26,26,26,0.9) 100%), 
                url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 14rem 0 8rem;
    color: var(--white);
    text-align: center;
}

.page-header h1 { 
    font-size: 3.5rem; 
    color: var(--white);
    margin-bottom: 1rem; 
}

.breadcrumb {
    justify-content: center;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item a { color: var(--gold); text-decoration: none; transition: var(--transition); }
.breadcrumb-item a:hover { color: var(--white); }
.breadcrumb-item.active { color: rgba(255,255,255,0.6); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.3); }

/* Services Page Specifics */
.service-item {
    transition: var(--transition);
}
.service-item:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

/* Team Page Specifics */
.team-member {
    transition: var(--transition);
}
.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12) !important;
}
.team-member-content h3 { font-size: 2rem; margin-bottom: 0.5rem; }
.team-member-content .position { color: var(--gold); font-weight: 600; margin-bottom: 1.5rem; }
.specialization ul li { margin-bottom: 0.5rem; }

/* Why Choose Us Feature Items */
.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}
.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
    color: var(--black);
}
.feature-content h5 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-content p { margin-bottom: 0; }

/* =========================================
   9. FORMS & CONTACT
   ========================================= */
.contact-form {
    background: var(--white);
    padding: 4rem;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.form-label { 
    font-weight: 500; 
    color: var(--black); 
    margin-bottom: 0.5rem; 
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem 1.2rem;
    transition: var(--transition);
    font-size: 1rem;
    background-color: #fafafa;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem var(--gold-light);
    background-color: var(--white);
}

.office-hours ul li span:first-child { font-weight: 500; }

/* =========================================
   10. FOOTER
   ========================================= */
footer {
    background: var(--black);
    color: var(--white);
    padding: 6rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

footer h5 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Strictly constrain the Footer logo */
.footer-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

footer ul { list-style: none; padding: 0; }
footer ul li { margin-bottom: 1rem; }

footer ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.95rem;
}

footer ul li a:hover { 
    color: var(--gold); 
    transform: translateX(5px); 
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    color: var(--gold);
    margin-right: 0.8rem;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.social-links a:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-3px);
    border-color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* =========================================
   11. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 991px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-section { 
        min-height: auto; 
        padding-top: 120px; /* Extra padding on mobile where navbars can wrap/taller */
        padding-bottom: 6rem;
        background-attachment: scroll;
    }
    .navbar {
        padding: 0.8rem 0; /* Slightly more padding on mobile for touch targets */
    }
    .navbar-collapse { 
        background: var(--dark-gray); 
        padding: 1.5rem; 
        margin-top: 1rem; 
        border-radius: 4px; 
        border: 1px solid rgba(255,255,255,0.05);
    }
    .nav-link { margin-left: 0; margin-bottom: 0.5rem; }
    .nav-link::after { display: none; }
    .page-header { padding: 10rem 0 5rem; }
    .page-header h1 { font-size: 2.5rem; }
    .contact-form { padding: 2.5rem; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .section-title h2 { font-size: 2rem; }
    .stat-number { font-size: 3rem; }
    .team-card img { height: 350px; }
    h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }
}

/* =========================================
   12. HERO IMAGE SLIDER (PERFECT FIT)
   ========================================= */
.hero-slider {
    position: relative;
    width: 100%;
    height: 550px; 
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    background-color: var(--dark-gray);
}

.hero-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slider img.active {
    opacity: 1;
}

@media (max-width: 991px) {
    .hero-slider { height: 450px; }
}

@media (max-width: 576px) {
    .hero-slider { height: 350px; }
}

/* =========================================
   13. MINIMALIST PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--black);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: preloaderPulse 2s infinite ease-in-out;
}

.preloader-line {
    width: 60px;
    height: 2px;
    background-color: var(--gold);
    margin: 0 auto;
    border-radius: 2px;
    animation: preloaderLoad 1.5s infinite ease-in-out;
}

@keyframes preloaderPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes preloaderLoad {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    51% { transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

/* =========================================
   14. DIAMOND WHATSAPP WIDGET
   ========================================= */
.whatsapp-diamond {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    text-decoration: none;
    z-index: 9990;
    transform: rotate(45deg);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    border: 2px solid var(--gold);
    animation: whatsappPulse 2s infinite;
}

.whatsapp-diamond i {
    transform: rotate(-45deg); 
}

.whatsapp-diamond:hover {
    transform: rotate(45deg) scale(1.1);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
    background-color: #20b858;
    animation: none;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 576px) {
    .whatsapp-diamond {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* =========================================
   15. LAWESQUE TESTIMONIAL DESIGN
   ========================================= */
.testimonial-card-law {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 4px;
    border-top: 4px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.testimonial-card-law::before {
    content: '\f24e';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    color: var(--gold);
    opacity: 0.04;
    transform: rotate(15deg);
    pointer-events: none;
}

.testimonial-card-law:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.testimonial-card-law .quote-icon {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-divider {
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 1.5rem;
}

.author-avatar {
    width: 55px;
    height: 55px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    flex-shrink: 0;
    background-color: var(--black);
    color: var(--gold);
    border: 2px solid var(--gold);
}

.author-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.author-name:hover {
    color: var(--gold);
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0;
}

.author-social {
    margin-top: 8px;
}

.author-social a {
    color: var(--text-light);
    font-size: 1rem;
    margin-right: 12px;
    transition: var(--transition);
}

.author-social a:hover {
    color: var(--gold);
    transform: translateY(-2px);
    display: inline-block;
}