/**
 * Ramírez Abogados - Diseño Premium VIP
 * Estilo elegante, sofisticado y de alta gama
 */

/* ==================== IMPORTAR FUENTES PREMIUM ==================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ==================== VARIABLES PREMIUM ==================== */
:root {
    /* Colores Premium */
    --gold-primary: #D4AF37;
    --gold-light: #F4E4C1;
    --gold-dark: #B8941E;
    --navy-deep: #0A1128;
    --navy-medium: #1C2541;
    --charcoal: #2C3E50;
    --cream: #FAF8F3;
    --white: #FFFFFF;
    --gray-light: #F5F5F7;
    --gray-medium: #8E8E93;
    --gray-dark: #48484A;
    
    /* Compatibilidad v3.0 */
    --ramirez-accent: var(--gold-primary);
    --ramirez-primary: var(--gold-primary);
    --ramirez-dark: var(--navy-deep);
    --ramirez-medium: var(--gray-dark);
    --ramirez-light: var(--cream);
    --ramirez-white: var(--white);
    --font-display: var(--font-serif);
    --font-body: var(--font-sans);

    /* Tipografía Premium */
    --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Efectos */
    --shadow-soft: 0 4px 24px rgba(10, 17, 40, 0.08);
    --shadow-medium: 0 8px 40px rgba(10, 17, 40, 0.12);
    --shadow-strong: 0 16px 64px rgba(10, 17, 40, 0.16);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== RESET & BASE PREMIUM ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--charcoal);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== TIPOGRAFÍA PREMIUM ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-dark);
}

/* ==================== HEADER PREMIUM ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header.scrolled {
    box-shadow: var(--shadow-medium);
    background: rgba(10, 17, 40, 0.98);
}

header.scrolled .nav-container {
    padding: 0.35rem 3rem;
}

header.scrolled .logo img {
    width: 180px !important; 
    height: auto !important;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 3rem; /* Reduced for a slimmer profile */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.logo {
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    width: 220px; /* Locked as requested */
    padding: 0;
}

.logo img {
    width: 280px !important; /* Increased for better visibility */
    height: auto !important;
    max-height: 120px !important; /* Increased proportionally */
    object-fit: contain;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
    margin: 0;
}

header.scrolled .logo img {
    width: 200px !important; /* Increased while maintaining elegance */
    height: auto !important;
    max-height: 70px !important;
}

.logo:hover img {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.5));
}

.nav-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-menu a {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    text-decoration: none !important;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--gold-primary);
}

/* ==================== HERO PREMIUM ==================== */
.hero-premium {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(10, 17, 40, 0.85) 0%, rgba(28, 37, 65, 0.85) 50%, rgba(44, 62, 80, 0.9) 100%), url('../img/hero-bg.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
    padding-top: 140px;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 228, 193, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-premium::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-content-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 3rem;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50px;
    color: var(--gold-light);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
}

.hero-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--gold-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title-premium {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-title-premium .gold-accent {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle-premium {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
    font-style: italic;
    margin-bottom: 2rem;
    max-width: 800px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.hero-description-premium {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    max-width: 650px;
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* ==================== BOTONES PREMIUM ==================== */
.btn-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--navy-deep);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

/* Premium Table */
.premium-table {
    width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: white;
}

.premium-table th {
    background: var(--navy-deep);
    color: white;
    padding: 1.25rem 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
}

.premium-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: var(--gray-dark);
    font-size: 1rem;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    background: rgba(212, 175, 55, 0.03);
}

.premium-table .gold-row {
    background: rgba(212, 175, 55, 0.05);
}

/* Form Elements Premium */
.form-control, 
input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="number"], 
select, 
textarea {
    width: 100%;
    padding: 1rem 1.25rem !important;
    font-size: 1rem !important;
    color: var(--navy-deep) !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(13, 27, 42, 0.2) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.form-control:focus, 
input:focus, 
select:focus, 
textarea:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15) !important;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--navy-deep);
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.btn-premium.btn-gold,
.btn-primary-premium,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: var(--gold-primary);
    color: var(--navy-deep);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-premium.btn-gold:hover,
.btn-primary-premium:hover,
button[type="submit"]:hover {
    background-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ==================== SECCIONES PREMIUM ==================== */
.section-premium {
    padding: 8rem 3rem;
    position: relative;
}

.section-premium.bg-white {
    background: var(--white);
}

.section-premium.bg-cream {
    background: var(--cream);
}

.section-premium.bg-navy {
    background: linear-gradient(135deg, rgba(10, 17, 40, 0.9) 0%, rgba(28, 37, 65, 0.95) 100%), url('../img/services-bg.png') center/cover no-repeat;
    color: var(--white);
}

.container-premium {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header-premium {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.section-label {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(244, 228, 193, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50px;
    color: var(--gold-dark);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.section-title-premium {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--navy-deep);
    margin-bottom: 1.5rem;
}

.section-premium.bg-navy .section-title-premium {
    color: var(--white);
}

.section-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--navy-deep);
    font-weight: 500;
}

/* ==================== GRID PREMIUM ==================== */
.grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2.5rem;
    margin-top: 4rem;
    align-items: stretch;
}

.grid-premium > * {
    display: flex;
    flex-direction: column;
}

/* ==================== CARDS PREMIUM ==================== */
.card-premium {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Ensure image border-radius matches */
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
    border-radius: 0;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 5;
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(212, 175, 55, 0.2);
}

.card-premium:hover::before {
    opacity: 1;
}

.card-image-wrapper {
    margin: -3rem -3rem 2.5rem -3rem;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition-bounce);
}

.card-premium:hover .card-image {
    transform: scale(1.08);
}

.card-title-premium {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-deep);
    margin-bottom: 1rem;
}

.card-description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--gray-dark);
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* ==================== DIVIDER PREMIUM ==================== */
.divider-premium {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
    margin: 3rem auto;
    border-radius: 2px;
}

/* ==================== ANIMACIONES PREMIUM ==================== */
@keyframes fadeInUp-premium {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-premium {
    opacity: 0;
    will-change: transform, opacity;
}

.animate-premium.visible {
    opacity: 1;
    animation: fadeInUp-premium 0.8s ease forwards;
}

.animate-premium.delay-1 { animation-delay: 0.1s; }
.animate-premium.delay-2 { animation-delay: 0.2s; }
.animate-premium.delay-3 { animation-delay: 0.3s; }
.animate-premium.delay-4 { animation-delay: 0.4s; }

/* ==================== RESPONSIVE PREMIUM ==================== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1.5rem 2rem;
    }

    .section-premium {
        padding: 6rem 2rem;
    }

    .grid-premium {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tablet: 2 columnas */
@media (min-width: 769px) and (max-width: 1023px) {
    .grid-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        font-size: 0.875rem;
        background: rgba(10, 17, 40, 0.98);
    }

    .nav-menu a {
        color: rgba(255, 255, 255, 0.9);
    }

    .hero-content-premium {
        padding: 3rem 2rem;
    }

    .section-premium {
        padding: 4rem 1.5rem;
    }

    .card-premium {
        padding: 2rem;
    }
}

/* ==================== LANG SWITCHER ==================== */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-switcher button {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.lang-switcher button.active {
    background: var(--gold-primary);
    color: var(--navy-deep);
    border-color: var(--gold-primary);
    font-weight: 700;
}

.lang-switcher button:hover {
    background: var(--gold-primary);
    color: var(--navy-deep);
    border-color: var(--gold-primary);
}

/* ==================== MOBILE MENU TOGGLE ==================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--gold-primary);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

/* Estado activo del toggle (transformación a X) */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 17, 40, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem !important;
        transition: var(--transition-smooth);
        z-index: 1000;
        padding: 2rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 1rem;
    }
}

/* ==================== FOOTER MEJOR CONTRASTE ==================== */
.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.85);
}

.footer-section strong {
    color: var(--gold-primary);
}

.footer-section h3 {
    color: var(--gold-primary);
}

/* ==================== FOTOS DE EQUIPO REDONDAS ==================== */
.team-photo {
    border-radius: 50% !important;
    border: 4px solid var(--gold-primary) !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3), 0 0 0 8px rgba(212, 175, 55, 0.1) !important;
}

/* ==================== FOOTER CREDIT ==================== */
.footer-credit {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-credit a {
    color: var(--gold-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-credit a:hover {
    color: var(--gold-light);
}

/* ==================== FOOTER COMPLETO ==================== */
footer {
    background: linear-gradient(135deg, #0A1128 0%, #1C2541 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-family: var(--font-serif);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-section a:hover {
    color: var(--gold-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    max-width: 1400px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

/* ==================== WHATSAPP FLOAT ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition-smooth);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* ==================== CALCULADORA ==================== */
.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--cream);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-deep);
    margin-bottom: 1rem;
    display: block;
}

.radio-group,
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.radio-option,
.checkbox-option {
    flex: 1;
}

.radio-option input,
.checkbox-option input {
    display: none;
}

.radio-option label,
.checkbox-option label {
    display: block;
    padding: 1.5rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    font-weight: 500;
    background: var(--white);
    font-size: 1rem;
}

.radio-option input:checked + label,
.checkbox-option input:checked + label {
    border-color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-dark);
    font-weight: 600;
}

.radio-option label:hover,
.checkbox-option label:hover {
    border-color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
}

.range-input {
    width: 100%;
}

.range-input input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--gold-light) 0%, var(--gold-primary) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    transition: var(--transition-smooth);
}

.range-input input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.6);
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    transition: var(--transition-smooth);
}

.range-input input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.6);
}

.range-value {
    display: inline-block;
    margin-left: 1rem;
    font-weight: 700;
    color: var(--gold-primary);
    font-size: 1.5rem;
    font-family: var(--font-serif);
}

.calculator-result {
    margin-top: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--navy-deep), var(--navy-medium));
    border-radius: 16px;
    color: white;
    display: none;
    box-shadow: var(--shadow-medium);
}

.calculator-result.show {
    display: block;
    animation: fadeInUp-premium 0.5s ease;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item:last-child {
    border-bottom: none;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--gold-primary);
}

.result-label {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-primary);
    font-family: var(--font-serif);
}

/* Responsive calculadora */
@media (max-width: 768px) {
    .calculator-container {
        padding: 2rem 1.5rem;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: 1rem;
    }

    .result-value {
        font-size: 1.5rem;
    }
}

/* ==================== MENU HAMBURGUESA Y MOBILE MENU ==================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--navy-deep);
    transition: all 0.25s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 350px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 2rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        font-size: 1.25rem;
    }
}
/**
 * RAMÍREZ ABOGADOS - PREMIUM DESIGN SYSTEM v3.0
 * Diseñado por LYNDA (Inspirado en Lynda Weinman)
 *
 * "El diseño web no es arte digital. Es comunicación visual con un propósito."
 *
 * Principios aplicados:
 * 1. Optimización primero
 * 2. Usabilidad sobre estética
 * 3. Accesibilidad universal (WCAG AA)
 * 4. Paleta limitada para máximo impacto
 * 5. Tipografía legible (line-height 1.5-1.7)
 * 6. Grilla de 8px para consistencia
 * 7. Mobile-first siempre
 */

/* ==================== VARIABLES DE DISEÑO ==================== */

:root {
    /* PALETA DE COLORES (Max 5 colores - Principio de Lynda) */

    /* Primarios */
    --ramirez-primary: #C41E3A;          /* Rojo borgaña - Autoridad legal */
    --ramirez-accent: #D4AF37;           /* Dorado - Premium/Confianza */

    /* Neutrales */
    --ramirez-dark: #0A1128;             /* Texto principal */
    --ramirez-medium: #4A5568;           /* Texto secundario */
    --ramirez-light: #F7FAFC;            /* Backgrounds */
    --ramirez-white: #FFFFFF;

    /* Semánticos */
    --success: #10B981;                   /* Verde - Casos ganados */
    --warning: #F59E0B;                   /* Ámbar - Urgente */
    --error: #EF4444;                     /* Rojo - Error */
    --info: #3B82F6;                      /* Azul - Info */

    /* Overlays */
    --overlay-dark: rgba(10, 17, 40, 0.95);
    --overlay-light: rgba(247, 250, 252, 0.95);

    /* TIPOGRAFÍA */

    /* Familias (Optimizadas para legibilidad) */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;

    /* Tamaños (Escala modular 1.250 - Major Third) */
    --text-xs: 0.75rem;        /* 12px */
    --text-sm: 0.875rem;       /* 14px */
    --text-base: 1rem;         /* 16px - MÍNIMO para body */
    --text-lg: 1.125rem;       /* 18px */
    --text-xl: 1.25rem;        /* 20px */
    --text-2xl: 1.563rem;      /* 25px */
    --text-3xl: 1.953rem;      /* 31px */
    --text-4xl: 2.441rem;      /* 39px */
    --text-5xl: 3.052rem;      /* 49px */
    --text-6xl: 3.815rem;      /* 61px */

    /* Line Heights (1.5-1.7 para lectura - Principio de Lynda) */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    --leading-loose: 2;

    /* Font Weights */
    --weight-light: 300;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --weight-black: 900;

    /* SPACING (Grilla de 8px) */
    --space-0: 0;
    --space-1: 0.5rem;        /* 8px */
    --space-2: 1rem;          /* 16px */
    --space-3: 1.5rem;        /* 24px */
    --space-4: 2rem;          /* 32px */
    --space-5: 2.5rem;        /* 40px */
    --space-6: 3rem;          /* 48px */
    --space-8: 4rem;          /* 64px */
    --space-10: 5rem;         /* 80px */
    --space-12: 6rem;         /* 96px */
    --space-16: 8rem;         /* 128px */
    --space-20: 10rem;        /* 160px */

    /* CONTENEDORES */
    --container-sm: 640px;    /* Formularios */
    --container-md: 768px;    /* Texto largo */
    --container-lg: 1024px;   /* Contenido general */
    --container-xl: 1280px;   /* Layout completo */

    /* SOMBRAS (Sutiles pero visibles) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Sombras de marca */
    --shadow-primary: 0 10px 30px rgba(196, 30, 58, 0.25);
    --shadow-accent: 0 10px 30px rgba(212, 175, 55, 0.25);

    /* BORDER RADIUS */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* TRANSICIONES */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-INDEX (Sistema organizado) */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ==================== RESET Y BASE ==================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* Base para rem */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-relaxed); /* 1.7 - Principio Lynda */
    color: var(--ramirez-medium);
    background-color: var(--ramirez-white);
    overflow-x: hidden;
}

/* ==================== TIPOGRAFÍA ==================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--ramirez-dark);
}

h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--weight-black);
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
}

h3 {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

h4 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

h5, h6 {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

p {
    margin: 0 0 var(--space-4) 0;
    max-width: 65ch; /* Legibilidad óptima */
}

a {
    color: var(--ramirez-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #A01829; /* Primary más oscuro */
    text-decoration: underline;
}

strong, b {
    font-weight: var(--weight-bold);
    color: var(--ramirez-dark);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
    color: var(--ramirez-medium);
}

/* Clase para texto dorado (acentos) */
.text-accent {
    color: var(--ramirez-accent);
}

.text-primary {
    color: var(--ramirez-primary);
}

/* ==================== LAYOUT CONTAINERS ==================== */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}


/* Calculator Results Premium */
#resultado-calculo {
    margin-top: 2rem;
    padding: 2.5rem;
    background: var(--navy-deep);
    border-radius: 12px;
    color: white;
    box-shadow: var(--shadow-strong);
    animation: fadeIn 0.5s ease-out;
}

#resultado-calculo h3 {
    color: var(--gold-primary);
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 0.5rem;
}

#resultado-calculo .total-box {
    background: rgba(212, 175, 55, 0.1);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--gold-primary);
    margin-top: 2rem;
}

#resultado-calculo .total-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

#resultado-calculo .total-amount {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--gold-primary);
    font-weight: 700;
}

#resultado-calculo .item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.125rem;
}

#resultado-calculo .item-label {
    color: rgba(255,255,255,0.7);
}

#resultado-calculo .item-value {
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
