/* 
  TM Bufete Jurídico - Design System 
  Pure CSS Implementation (Tailwind Removed)
*/

:root {
    /* Colors */
    --primary: #24448F;
    --primary-dark: #1a326b;
    --accent: #FAB624;
    --accent-light: #ffce65;
    --white: #FFFFFF;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-900: #0f172a;
    
    /* Spacing */
    --container-max: 1280px;
    --section-py: 6rem;
    --section-py-mobile: 4rem;
    
    /* Typography */
    --font-inter: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-inter);
    background-color: var(--white);
    color: var(--slate-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Layout Helpers */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-lg-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-lg-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-lg-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px;
    display: flex;
    align-items: center;
}

.desktop-nav {
    display: none;
}

#mobile-menu-btn {
    display: flex;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
    #mobile-menu-btn {
        display: none;
    }
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    height: 70px;
}

.nav-link {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

header.scrolled .nav-link {
    color: var(--primary);
}

.nav-link:hover {
    color: var(--accent) !important;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(36, 68, 143, 0.85);
    z-index: 10;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: 900px;
    padding-top: 4rem;
}

.hero-badge {
    display: inline-block;
    background-color: var(--accent);
    color: var(--primary);
    padding: 0.4rem 1rem;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 950;
    color: var(--white);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title span {
    background: linear-gradient(90deg, var(--accent), #fff7e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    height: 3.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(250, 182, 36, 0.3);
}

.btn-primary:hover {
    background-color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    backdrop-filter: blur(4px);
}

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

/* Section Common */
section {
    padding: var(--section-py) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--section-py-mobile) 0;
    }
}

.section-title-sm {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title-lg {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--slate-900);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* Cards & Components */
.service-card {
    background: var(--white);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.05);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 80px -20px rgba(36, 68, 143, 0.1);
}

.card-header-icon {
    padding: 3rem 2rem;
    background: var(--slate-50);
    color: var(--primary);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
}

.card-header-icon svg {
    height: 4rem;
    width: 4rem;
    margin-bottom: 1.5rem;
}

.card-header-icon h4 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    color: var(--primary);
    transition: color 0.5s ease;
}

.service-card:hover .card-header-icon {
    background: var(--primary);
    color: var(--white);
}

.service-card:hover .card-header-icon h4 {
    color: var(--white);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 950;
    color: var(--accent);
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        height: 3.2rem;
        width: 100%;
    }
    
    .flex-mobile-col {
        flex-direction: column;
    }
}

/* Mobile Menu */
#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: var(--primary);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

#mobile-menu-overlay.open {
    transform: translateX(0);
}

.mobile-nav-link {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-link:hover {
    color: var(--accent);
    padding-left: 1rem;
}

.mobile-nav-link::after {
    content: '→';
    font-size: 1.25rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover::after {
    opacity: 1;
    transform: translateX(0.5rem);
}

#mobile-menu-overlay nav a {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

#mobile-menu-overlay.open nav a {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu-overlay.open nav a:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu-overlay.open nav a:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu-overlay.open nav a:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu-overlay.open nav a:nth-child(4) { transition-delay: 0.4s; }
#mobile-menu-overlay.open nav a:nth-child(5) { transition-delay: 0.5s; }

.mobile-menu-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Testimonials */
.testimonials-section {
    position: relative;
    padding: var(--section-py) 0;
    background-color: var(--slate-900);
    overflow: hidden;
}

.testimonial-bg-img {
    position: absolute;
    inset: 0 0 0 auto;
    width: 66.666%;
    opacity: 0.4;
    object-fit: cover;
    object-position: top center;
    z-index: 1;
}

.testimonial-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--slate-900) 40%, transparent);
    z-index: 2;
}

.testimonial-container {
    position: relative;
    z-index: 10;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    padding: 3.5rem;
    border-radius: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.testimonial-text {
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    font-weight: 500;
    color: var(--white);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 2.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.author-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.author-role {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Footer Styles */
.site-footer {
    background-color: #111;
    color: var(--white);
    padding: 4rem 0;
}

.footer-grid {
    display: grid;
    gap: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4rem;
}

.footer-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.6;
}

/* Stats */
.stats-section {
    background-color: var(--primary);
    color: var(--white);
    padding: 5rem 0;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.1);
}

/* Sedes Internacionales */
.location-section {
    background-color: #fdfbf7;
    padding: var(--section-py) 0;
}

.location-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

.location-card:hover {
    transform: translateY(-5px);
}

.location-title {
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.location-divider {
    width: 100%;
    height: 1px;
    background: #f0e9d2;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--slate-600);
    font-size: 0.95rem;
}

.contact-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary);
}

.cta-section {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 3rem;
    padding: 5rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
