/* ==========================================================================
   CSS Variables (Design Tokens)
   ========================================================================== */
   :root {
    /* Colors */
    --color-bg-dark: #121212;
    --color-bg-darker: #0a0a0a;
    --color-primary: #d4af37; /* Gold / Dorado */
    --color-primary-hover: #b8962f;
    --color-text-light: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-whatsapp: #25D366;
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 30, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.highlight {
    color: var(--color-primary);
}

.subtitle {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 15px;
    font-weight: 500;
}

/* ==========================================================================
   Loading Screen (Loader)
   ========================================================================== */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-darker);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gavel-container {
    transform-origin: 90px 60px;
    animation: strike-horizontal 2s infinite ease-in-out;
}

@keyframes strike-horizontal {
    0%, 100% { transform: rotate(-40deg); }
    10% { transform: rotate(-40deg); }
    20% { transform: rotate(15deg); }
    25% { transform: rotate(5deg); }
    30% { transform: rotate(15deg); }
    60% { transform: rotate(15deg); }
    80% { transform: rotate(-40deg); }
}

.loading-bar-container {
    width: 200px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
    animation: load 2s infinite ease-in-out;
}

@keyframes load {
    0% { width: 0%; transform: translateX(0); }
    50% { width: 100%; transform: translateX(0); }
    100% { width: 100%; transform: translateX(100%); }
}

.loading-text {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-primary);
    opacity: 0.8;
}

.loaded #loader-wrapper {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 40px;
}

.glass-btn {
    background: rgba(212, 175, 55, 0.2); /* Semi-transparent primary */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--color-text-light);
}

.glass-btn:hover {
    background: var(--color-primary);
    color: var(--color-bg-dark);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.glass-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    height: 75px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-fast);
}

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

.btn-primary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-secondary {
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: var(--color-bg-darker);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--color-primary-hover);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-text-light);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.05); /* Slight scale for potential animation */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 50%, rgba(10,10,10,0.3) 100%);
    z-index: -1;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-text-card {
    padding: 50px;
}

.hero-text-card h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-text-card p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.btn-whatsapp-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-whatsapp);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-whatsapp-large:hover {
    background-color: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    position: relative;
    height: 100%;
}

.floating-person {
    max-height: 85vh;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--color-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.6) translateY(-40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-btn {
    color: var(--color-text-light);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-body h3 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.modal-body ul {
    list-style: none;
    margin-top: 15px;
}

.modal-body ul li {
    margin-bottom: 15px;
    font-size: 1.05rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-body ul li::before {
    content: '⚖️';
    font-size: 1.2rem;
}

/* Promo Banner */
.banner-container {
    margin-top: -40px;
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
}

.promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 40px;
    gap: 20px;
}

.promo-icon {
    font-size: 2rem;
    color: var(--color-primary);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-text h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.promo-text p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    background-color: var(--color-bg-darker);
}

.about-content {
    max-width: 800px;
}

.about-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-section {
    background-color: var(--color-bg-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    position: relative;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.4) 50%, rgba(10,10,10,0.1) 100%);
    transition: var(--transition-fast);
}

.service-card:hover .service-overlay {
    background: rgba(30, 30, 30, 0.85); /* Glassmorphism on hover */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.service-number {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.service-link {
    font-size: 0.9rem;
    color: var(--color-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.service-card:hover h3 {
    transform: translateY(0);
}

.service-card:hover .service-link {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Value Section
   ========================================================================== */
.value-section {
    background-color: var(--color-bg-darker);
}

.value-card {
    text-align: center;
    padding: 80px 40px;
}

.value-card h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.value-card p {
    color: var(--color-text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Locations Section
   ========================================================================== */
.locations-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.locations-header h2 {
    font-size: 2.5rem;
}

.map-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: linear-gradient(to right, var(--glass-bg), rgba(20, 20, 20, 0.4));
}

.map-info p {
    color: var(--color-text-muted);
}

.locations-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.location-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
}

.main-location {
    display: flex;
    flex-direction: column;
}

.main-location h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.main-location p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    flex: 1;
}

.location-list {
    display: flex;
    gap: 15px;
}

.location-list li {
    font-size: 0.85rem;
    color: var(--color-primary);
    padding-left: 20px;
    position: relative;
}

.location-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.location-item h4 {
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.location-item p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Footer & Floating Elements
   ========================================================================== */
footer {
    background-color: #050505;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-whatsapp);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition-fast);
}

.floating-wa:hover {
    transform: scale(1.1);
    background-color: #1ebe5d;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
}

.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-text-card h1 {
        font-size: 2.8rem;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition-fast);
    }

    .main-nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        margin-bottom: 30px;
    }

    .hero-container {
        flex-direction: column;
        padding-top: 50px;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 2;
        width: 100%;
        justify-content: center;
        height: 40vh;
    }
    
    .floating-person {
        max-height: 90%;
        max-width: 80%;
    }

    .promo-banner {
        flex-direction: column;
        text-align: center;
    }

    .locations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .map-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
