/* ================================================================
   REX EXTRANJERÍA ABOGADOS — Hoja de estilos completa
   Diseño profesional inspirado en despachos de abogacía líderes
   ================================================================ */

/* ========== VARIABLES Y RESET ========== */
:root {
    --gold: #c8a832;
    --gold-dark: #a68b28;
    --gold-light: #f0e6b8;
    --navy: #1a1a2e;
    --navy-light: #16213e;
    --blue: #0f3460;
    --blue-accent: #1e88e5;
    --dark: #0a0a0a;
    --dark-2: #111;
    --green: #25d366;
    --green-dark: #1ea952;
    --red: #e53935;
    --orange: #ff9800;
    --white: #ffffff;
    --light: #f7f8fc;
    --light-2: #eef1f6;
    --gray: #e0e0e0;
    --gray-dark: #bdbdbd;
    --text: #2c2c2c;
    --text-light: #555;
    --text-muted: #888;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 20px rgba(0,0,0,0.07);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-gold: 0 4px 20px rgba(200,168,50,0.2);
    --transition: 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: var(--font);
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ========== UTILITY ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ========== TOP BAR ========== */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.top-bar-left { display: flex; gap: 20px; align-items: center; }
.top-bar-left a { color: var(--green); font-weight: 600; }
.top-bar-left a:hover { text-decoration: underline; }
.top-bar-left i { margin-right: 5px; }
.top-bar-right { display: flex; gap: 15px; }
.top-bar-right a {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    transition: var(--transition);
}
.top-bar-right a:hover { color: var(--gold); }

/* ========== CABECERA / BANNER ========== */
#cabecera {
    background: var(--dark);
}
.banner-container {
    width: 100%;
    background: #1a1a1a;
    text-align: center;
    overflow: hidden;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}
.banner-fallback {
    padding: 35px 20px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    text-align: center;
}
.banner-fallback .photo-placeholder { display: none; }
.banner-title {
    font-size: 36px;
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 2px;
}
.banner-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    margin-top: 5px;
}
.banner-phone {
    font-size: 18px;
    color: var(--green);
    margin-top: 10px;
    font-weight: 700;
}

/* ========== NAVBAR ========== */
#navbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    position: relative;
    z-index: 1000;
    transition: var(--transition);
}
#navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.nav-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo {
    color: var(--gold);
    font-size: 18px;
    font-weight: 800;
    padding: 12px 0;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 8px;
}
.nav-menu {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-menu li { position: relative; }
.nav-menu > li > a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 14px;
    padding: 16px 12px;
    display: block;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: white;
    border-bottom-color: var(--gold);
}

/* Dropdown */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--navy);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    border-top: 3px solid var(--gold);
}
.nav-menu li:hover .nav-dropdown { display: block; }
.nav-dropdown a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}
.nav-dropdown a:hover {
    background: rgba(200,168,50,0.1);
    color: var(--gold);
    padding-left: 25px;
}

.nav-whatsapp {
    background: var(--green);
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition);
}
.nav-whatsapp:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn-whatsapp {
    background: var(--green);
    color: white;
    border-color: var(--green);
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37,211,102,0.4);
}
.btn-gold {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}
.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}
.btn-outline-dark {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline-dark:hover {
    background: var(--navy);
    color: white;
}
.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--dark);
}
.btn-red {
    background: var(--red);
    color: white;
    border-color: var(--red);
}
.btn-red:hover { background: #c62828; }
.btn-sm { padding: 10px 22px; font-size: 13px; }
.btn-lg { padding: 18px 40px; font-size: 17px; }
.full-width { width: 100%; justify-content: center; }

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 50%, #0a2d5a 100%);
    color: white;
    padding: 100px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200,168,50,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
    position: relative;
}
.hero-text {
    flex: 1;
    min-width: 0;
}
.hero-image {
    flex: 0 0 320px;
    position: relative;
}
.hero-image img {
    width: 320px;
    height: 420px;
    object-fit: cover;
    object-position: top center;
    border-radius: 16px;
    border: 4px solid rgba(200,168,50,0.5);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.1;
    position: relative;
}
.hero h2 {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.85;
    margin-bottom: 20px;
}
.hero p {
    font-size: 17px;
    max-width: 680px;
    margin: 0 0 35px;
    opacity: 0.8;
    line-height: 1.8;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.hero-badge {
    display: inline-block;
    background: rgba(229,57,53,0.9);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    animation: pulse-badge 2s infinite;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}
a.hero-badge:hover {
    background: rgba(229,57,53,1);
    transform: scale(1.05);
}
.hero-whatsapp-msg {
    margin-top: 25px;
    font-size: 15px;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
}
.hero-whatsapp-msg i {
    color: var(--green);
    margin-right: 5px;
}
.hero-whatsapp-msg a {
    color: var(--green);
    font-weight: 700;
    text-decoration: underline;
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
    50% { box-shadow: 0 0 0 10px rgba(229,57,53,0); }
}

/* ========== SECTIONS ========== */
.section { padding: 80px 0; }
.section-white { background: var(--white); }
.section-light { background: var(--light); }
.section-dark { background: var(--navy); color: white; }
.section-darker { background: var(--dark); color: white; }
.section-accent { background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%); }
.section-blue { background: linear-gradient(135deg, var(--navy), var(--blue)); color: white; }
.section-gold { background: var(--gold); color: var(--dark); }

.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: var(--navy);
    position: relative;
}
.section-title.light { color: white; }
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin: 12px auto 0;
    border-radius: 2px;
}
.section-title.light::after { background: var(--gold); }
.section-title.no-line::after { display: none; }
.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.section-subtitle.light { color: rgba(255,255,255,0.7); }

/* ========== SERVICES GRID ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.service-card {
    background: white;
    padding: 35px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    color: inherit;
    border-top: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to top, rgba(200,168,50,0.05), transparent);
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.service-card:hover::before { height: 100%; }
.service-icon {
    font-size: 42px;
    margin-bottom: 18px;
}
.service-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--navy);
    font-weight: 700;
}
.service-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}
.service-link {
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.service-link::after { content: ' →'; }

/* ========== QUICK LINKS / FEATURE BOXES ========== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.quick-link {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 25px;
    transition: var(--transition);
    display: block;
    color: white;
}
.quick-link:hover {
    background: rgba(200,168,50,0.1);
    border-color: var(--gold);
    transform: translateY(-3px);
}
.quick-link h4 { font-size: 16px; margin-bottom: 8px; }
.quick-link p { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ========== ABOUT / BIO ========== */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}
.about-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--navy), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}
.photo-placeholder {
    font-size: 80px;
    color: rgba(255,255,255,0.15);
}
.photo-fallback .photo-placeholder { display: block; }
.about-content h3 { font-size: 28px; margin-bottom: 18px; color: var(--navy); }
.about-content > p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--text-light);
}
.about-features { margin-bottom: 30px; }
.feature {
    display: flex;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray);
}
.feature:last-child { border-bottom: none; }
.feature-icon {
    width: 32px;
    height: 32px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.feature strong { display: block; margin-bottom: 3px; color: var(--navy); }
.feature p { font-size: 14px; color: var(--text-light); margin: 0; }

/* ========== ARRAIGO GRID ========== */
.arraigo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.arraigo-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}
.arraigo-card:hover { border-color: var(--gold); }
.arraigo-card h3 { font-size: 20px; margin-bottom: 15px; }
.arraigo-card h4 { font-size: 15px; margin-bottom: 10px; color: rgba(255,255,255,0.9); }
.arraigo-validity {
    background: rgba(30,136,229,0.15);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid var(--blue-accent);
}
.arraigo-validity.orange {
    background: rgba(255,152,0,0.15);
    border-left-color: var(--orange);
}
.arraigo-card ul { padding: 0; }
.arraigo-card li {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}
.arraigo-card li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.arraigo-ideal { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 12px; }
.arraigo-highlight { border-color: var(--orange); }
.arraigo-common {
    background: rgba(30,136,229,0.08);
    border-left: 4px solid var(--blue-accent);
    padding: 25px;
    border-radius: var(--radius-sm);
    margin-top: 40px;
}
.arraigo-common h4 { margin-bottom: 15px; }
.common-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.common-grid li {
    padding: 6px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}
.common-grid li::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ========== NEWS / ACTUALIDAD ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.news-card {
    background: white;
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    display: block;
    color: inherit;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.news-card.featured { border-left: 4px solid var(--red); }
.news-badge {
    background: var(--red);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}
.news-badge.new { background: var(--blue-accent); }
.news-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--navy); line-height: 1.4; }
.news-card p { color: var(--text-light); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.news-date { color: var(--text-muted); font-size: 13px; }

/* ========== CASES / CASOS REALES ========== */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.case-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green);
    transition: var(--transition);
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.case-result {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}
.case-result.success { color: var(--green); }
.case-result.revoked { color: var(--red); }
.case-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--navy); }
.case-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ========== ARTICLES LIST ========== */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 40px;
}
.article-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}
.article-item a {
    color: inherit;
    transition: var(--transition);
}
.article-item a:hover { color: var(--gold); }
.article-bullet { color: var(--gold); font-size: 20px; flex-shrink: 0; }

/* Light variant for subpages */
.articles-list-light .article-item {
    color: var(--text);
    border-bottom-color: var(--gray);
}
.articles-list-light .article-item a:hover { color: var(--blue-accent); }

/* ========== FAQ ========== */
.faq-container { max-width: 850px; margin: 0 auto; }
.faq-item {
    background: white;
    margin-bottom: 12px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid var(--gray);
}
.faq-item summary {
    padding: 20px 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    color: var(--navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.faq-item summary:hover { color: var(--gold-dark); }
.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: var(--gold);
    font-weight: 700;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 15px;
}
.faq-item[open] summary::after { content: '−'; color: var(--green); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p,
.faq-item .faq-answer {
    padding: 0 25px 20px;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
}
.faq-item ul {
    padding: 0 25px 20px 45px;
    list-style: disc;
}
.faq-item li {
    color: var(--text-light);
    margin-bottom: 5px;
    font-size: 14px;
}

/* ========== CONTACT ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}
.contact-info-box { display: flex; flex-direction: column; gap: 22px; }
.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.contact-item i {
    font-size: 22px;
    color: var(--green);
    width: 30px;
    text-align: center;
    margin-top: 5px;
}
.contact-item strong { display: block; margin-bottom: 4px; }
.contact-item p { font-size: 15px; color: rgba(255,255,255,0.8); margin: 0; }
.contact-item a { color: var(--green); }
.contact-item a:hover { text-decoration: underline; }

.contact-form {
    background: rgba(255,255,255,0.08);
    padding: 35px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}
.contact-form h3 { margin-bottom: 22px; font-size: 22px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.35); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.1);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
}
.checkbox-label input[type="checkbox"] { width: auto; }
.checkbox-label a { color: var(--gold); text-decoration: underline; }

/* Light form variant */
.contact-form.light {
    background: white;
    border: 1px solid var(--gray);
}
.contact-form.light h3 { color: var(--navy); }
.contact-form.light .form-group label { color: var(--text); }
.contact-form.light .form-group input,
.contact-form.light .form-group select,
.contact-form.light .form-group textarea {
    background: var(--light);
    border-color: var(--gray);
    color: var(--text);
}
.contact-form.light .form-group input::placeholder,
.contact-form.light .form-group textarea::placeholder { color: var(--text-muted); }
.contact-form.light .checkbox-label { color: var(--text-light); }

/* ========== CTA BAR ========== */
.cta-bar {
    background: var(--gold);
    padding: 25px 0;
}
.cta-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.cta-bar strong { font-size: 18px; color: var(--dark); }
.cta-bar p { font-size: 14px; color: rgba(0,0,0,0.6); margin: 3px 0 0; }
.cta-buttons { display: flex; gap: 10px; }
.cta-buttons .btn-whatsapp { background: var(--dark); border-color: var(--dark); }
.cta-buttons .btn-whatsapp:hover { background: var(--navy); }

/* ========== FOOTER ========== */
#footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h5 {
    color: white;
    font-size: 16px;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gold);
}
.footer-col p { font-size: 14px; line-height: 1.7; margin-bottom: 8px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: var(--transition);
}
.footer-col a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 10px; margin-top: 15px; }
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--green); color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}
.footer-bottom a { color: var(--gold); }

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 62px;
    height: 62px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: var(--transition);
    animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37,211,102,0.5);
}
@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* ========== SUBPAGE STYLES ========== */
.subpage-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    color: white;
    padding: 60px 0 50px;
    text-align: center;
}
.subpage-hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 10px;
}
.subpage-hero p {
    font-size: 17px;
    opacity: 0.8;
    max-width: 650px;
    margin: 0 auto;
}
.breadcrumb {
    font-size: 13px;
    margin-bottom: 18px;
    color: rgba(255,255,255,0.5);
}
.breadcrumb a { color: var(--gold); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* Subpage nav tabs */
.subpage-nav {
    background: var(--dark);
    padding: 0;
    overflow-x: auto;
    border-bottom: 3px solid var(--gold);
}
.subpage-nav .container {
    display: flex;
    gap: 0;
}
.subpage-nav a {
    color: rgba(255,255,255,0.7);
    padding: 16px 22px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: var(--transition);
}
.subpage-nav a:hover,
.subpage-nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(200,168,50,0.05);
}

/* Content area for subpages */
.content-section {
    padding: 60px 0;
}
.content-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
}
.content-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 30px 0 15px;
}
.content-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}
.content-section ul,
.content-section ol {
    padding-left: 25px;
    margin-bottom: 20px;
}
.content-section ul { list-style: disc; }
.content-section ol { list-style: decimal; }
.content-section li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 8px;
}
.content-section a {
    color: var(--blue-accent);
    text-decoration: underline;
}
.content-section a:hover { color: var(--gold-dark); }

/* Info boxes */
.info-box {
    background: var(--light);
    border-left: 4px solid var(--gold);
    padding: 22px 25px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 25px 0;
}
.info-box.blue { border-left-color: var(--blue-accent); background: #f0f4ff; }
.info-box.green { border-left-color: var(--green); background: #f0fff4; }
.info-box.red { border-left-color: var(--red); background: #fff5f5; }
.info-box h4 { color: var(--navy); margin-bottom: 8px; font-size: 16px; }
.info-box p { margin-bottom: 0; font-size: 14px; }

/* Requirements cards */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.req-card {
    background: white;
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    padding: 25px;
    transition: var(--transition);
}
.req-card:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.req-card h4 {
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.req-card li { font-size: 14px; }

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 40px 0;
}
.stat-card {
    text-align: center;
    padding: 30px 15px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
}
.stat-number {
    font-size: 42px;
    font-weight: 900;
    color: var(--gold);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}
/* Light variant */
.stats-row.light .stat-card {
    background: white;
    border-color: var(--gray);
    box-shadow: var(--shadow);
}
.stats-row.light .stat-number { color: var(--navy); }
.stats-row.light .stat-label { color: var(--text-light); }

/* Timeline */
.timeline { position: relative; padding-left: 30px; margin: 30px 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item h4 { font-size: 17px; color: var(--navy); margin-bottom: 5px; }
.timeline-item p { font-size: 14px; color: var(--text-light); margin: 0; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 992px) {
    .hero h1 { font-size: 34px; }
    .hero-image { flex: 0 0 260px; }
    .hero-image img { width: 260px; height: 340px; }
    .about-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 250px; margin: 0 auto; }
    .contact-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .common-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .section { padding: 50px 0; }
    .section-title { font-size: 28px; }
    .hero { padding: 60px 0; }
    .hero-content { flex-direction: column; text-align: center; gap: 30px; }
    .hero-image { flex: 0 0 auto; order: -1; }
    .hero-image img { width: 220px; height: 280px; border-radius: 50%; border-width: 3px; }
    .hero h1 { font-size: 28px; }
    .hero h2 { font-size: 16px; }
    .hero p { margin: 0 auto 30px; }
    .hero-buttons { flex-direction: column; align-items: center; justify-content: center; }
    .services-grid,
    .arraigo-grid,
    .news-grid,
    .cases-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .subpage-hero h1 { font-size: 26px; }

    /* Mobile nav */
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        box-shadow: var(--shadow-lg);
        padding: 10px 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-open .nav-menu { display: flex; }
    .nav-menu > li > a { padding: 12px 20px; }
    .nav-dropdown {
        position: static;
        display: none;
        border-top: none;
        background: rgba(0,0,0,0.2);
    }
    .nav-menu li.dropdown-open .nav-dropdown { display: block; }
    .nav-whatsapp { display: none; }
    .nav-flex { flex-wrap: wrap; justify-content: space-between; }

    .cta-flex { flex-direction: column; text-align: center; }
    .cta-buttons { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .banner-img { width: 100%; }

    .subpage-nav .container { gap: 0; }
    .subpage-nav a { padding: 12px 14px; font-size: 12px; }

    .quick-links { grid-template-columns: 1fr; }
    .req-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .hero-image img { width: 180px; height: 230px; }
    .stats-row { grid-template-columns: 1fr; }
    .btn { padding: 12px 24px; font-size: 14px; }
    .btn-lg { padding: 14px 30px; font-size: 15px; }
}
