/* 1. VARIABLES Y CONFIGURACIÓN BASE */
:root {
    --navy: #001d3d;
    --electric-yellow: #ffd60a;
    --soft-blue: #003566;
    --dark-accent: #14213d;
    --gold-accent: #fca311;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --transition: all 0.4s ease;
    --header-height: 420px;
    --nav-height: 70px;
}

body {
    background: var(--bg-gradient);
    font-family: 'Poppins', sans-serif;
    padding: 0px 0;
    padding-top: 0;
}

.dynamic-cv {
    max-width: 1100px;
    margin: 0px auto;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 2. HEADER / HERO BANNER */
.hero-banner {
    background: var(--navy);
    color: white;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--electric-yellow);
    border-radius: 50%;
    opacity: 0.1;
}

.profile-img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border: 8px solid var(--electric-yellow);
    border-radius: 40px;
    transform: rotate(-3deg);
    transition: var(--transition);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.profile-status-wrap {
    width: 260px;
    max-width: 100%;
    margin: 0 auto;
}

.profile-status {
    width: 100%;
}

.profile-status .small {
    overflow-wrap: anywhere;
}

.profile-img:hover {
    transform: rotate(0deg) scale(1.05);
}

.name-title h1 {
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 0.9;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.name-title {
    text-align: center !important;
}

.job-tag {
    background: var(--electric-yellow);
    color: var(--navy);
    padding: 8px 20px;
    font-weight: 800;
    border-radius: 50px;
    display: inline-block;
    transform: skewX(-10deg);
}

.main-body p,
.content-section p,
.exp-card p,
.form-card p,
.cert-card p,
.name-title p {
    text-align: justify;
}

/* 3. ESTRUCTURA Y BLOQUES COMUNES */
.sidebar {
    background: #fdfdfd;
    padding: 40px;
    border-right: 1px solid #eee;
}

.main-body {
    padding: 60px;
}

.section-icon {
    width: 45px;
    height: 45px;
    background: var(--navy);
    color: var(--electric-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

h2.title-border {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: var(--navy);
}

/* 4. EXPERIENCIA Y SKILLS (PILLS) */
.exp-card {
    background: #ffffff;
    border: 1px solid rgba(0, 29, 61, 0.08);
    border-left: 4px solid var(--electric-yellow);
    border-radius: 16px;
    padding: 22px 22px 20px 30px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: 0 10px 24px rgba(0, 29, 61, 0.08);
}

.exp-card::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--navy);
    border: 4px solid var(--electric-yellow);
    border-radius: 50%;
}

.year-label {
    font-weight: 900;
    color: var(--soft-blue);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.exp-card .company {
    color: var(--navy);
    font-weight: 700;
    margin-bottom: 10px;
}

.form-card {
    background: #ffffff;
    border: 1px solid rgba(25, 135, 84, 0.25);
    border-left: 4px solid #198754;
    border-radius: 16px;
    padding: 22px 22px 20px 26px;
    padding-right: 64px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: 0 10px 24px rgba(0, 29, 61, 0.08);
}

.form-card::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 4px solid #198754;
    border-radius: 50%;
}

.cert-card {
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-left: 4px solid #f59e0b;
    border-radius: 16px;
    padding: 22px 22px 20px 26px;
    padding-right: 64px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: 0 10px 24px rgba(0, 29, 61, 0.08);
}

.cert-link-floating {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #198754;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(25, 135, 84, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.cert-link-floating:hover {
    color: #ffffff;
    background: #157347;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(25, 135, 84, 0.4);
}

.cert-card::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    width: 20px;
    height: 20px;
    background: #fff6e9;
    border: 4px solid #f59e0b;
    border-radius: 50%;
}

.skill-pill {
    background: #fff;
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 5px 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 4px;
    display: inline-block;
    transition: var(--transition);
}

.skill-pill:hover {
    background: var(--navy);
    color: var(--electric-yellow);
    transform: translateY(-3px);
}

.contact-box {
    background: var(--navy);
    color: white;
    padding: 25px;
    border-radius: 20px;
    margin-top: 30px;
}

/* 5. BARRAS DE PROGRESO */
.skills-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 15px;
}

.skill-card {
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.skill-label {
    font-weight: 800;
    color: var(--dark-accent);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.skill-value {
    color: var(--gold-accent);
    font-weight: 900;
}

.bar-track {
    width: 100%;
    height: 12px;
    background: #e5e5e5;
    border-radius: 20px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--dark-accent);
    width: var(--w, 0%);
    border-right: 4px solid var(--gold-accent);
    transition: width 0.8s ease-out;
}

/* 5.5. FOOTER */
.footer-contact {
    background: var(--navy);
    color: white;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
}

.footer-contact .small {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact .small a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact .small a:hover {
    color: var(--electric-yellow);
    text-decoration: underline;
}

.footer-contact .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    flex-direction: row;
}

.footer-contact .social-icon {
    color: var(--electric-yellow);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    opacity: 0.9;
    margin-bottom: 15px;
}

.footer-contact .social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* 6. MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 991px) {
    .profile-status-wrap {
        width: min(320px, 100%);
    }

    .profile-status {
        padding-bottom: 14px;
    }

    .profile-img {
        width: 200px;
        height: 200px;
        transform: none;
        margin-bottom: 30px;
    }

    .name-title h1 {
        font-size: 2.5rem;
    }

    .name-title h1,
    .job-tag {
        margin: 0;
    }

    .name-title h1 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        white-space: nowrap;
        line-height: 1;
    }

    .job-tag {
        padding: 6px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
        transform: none;
    }
}

/* ========== BOTÓN FILTROS EN EL MENÚ ========== */
.filter-toggle {
    background: transparent;
    border: none;
    color: var(--navy);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px 15px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toggle:hover {
    color: var(--electric-yellow);
    transform: rotate(15deg);
}

.filter-toggle.active {
    color: var(--electric-yellow);
    transform: rotate(90deg);
}

/* ========== DROPDOWN FILTROS ========== */
.filter-dropdown {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    position: sticky;
    top: calc(var(--section-menu-height, 60px) - 2px);
    z-index: 102;
}

.filter-dropdown.show {
    padding: 15px 0;
    max-height: 200px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    border: none;
}

.filter-btn {
    background: white;
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

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

.filter-btn.active {
    background: var(--navy);
    color: var(--electric-yellow);
    border-color: var(--navy);
}

@media (max-width: 768px) {

    .main-body,
    .sidebar {
        padding: 30px;
    }

    .filter-dropdown.show {
        max-height: 250px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .filter-toggle {
        padding: 8px 12px;
        font-size: 1rem;
    }

    .skill-label {
        font-size: 0.75rem;
    }

    .bar-track {
        height: 10px;
    }

    .footer-contact {
        padding: 30px 20px;
    }

    .footer-contact .row {
        flex-direction: column;
    }

    .footer-contact-info {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        margin-bottom: 20px;
    }

    .footer-social-section {
        padding-top: 10px;
    }

    .footer-contact .social-links {
        flex-direction: row;
        gap: 12px;
        flex-wrap: wrap;
    }

    .filter-bar {
        padding: 10px 0;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.text-navy {
    color: var(--navy);
}

.badge {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 6px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-icon {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
    opacity: 0.8;
}

.social-icon i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--electric-yellow);
    /* Color resaltado para los logos */
}

.social-icon:hover {
    opacity: 1;
    color: var(--electric-yellow);
    transform: translateX(5px);
    /* Pequeño efecto de desplazamiento */
}

/* reCAPTCHA v3 - Ocultar badge flotante */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Botón con colores corporativos */
.btn-navy {
    background: var(--navy) !important;
    border-color: var(--navy) !important;
    color: var(--electric-yellow) !important;
    font-weight: 600;
    transition: var(--transition);
}

.btn-navy:hover {
    background: var(--soft-blue) !important;
    border-color: var(--soft-blue) !important;
    color: var(--electric-yellow) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 29, 61, 0.3);
}

.btn-navy:active,
.btn-navy:focus {
    background: var(--navy) !important;
    border-color: var(--navy) !important;
    color: var(--electric-yellow) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 214, 10, 0.25);
}

.btn-navy:disabled,
.btn-navy.disabled {
    background: #003566 !important;
    border-color: #003566 !important;
    color: rgba(255, 214, 10, 0.5) !important;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Línea sutil de separación */
.border-secondary {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========== MENÚ DE NAVEGACIÓN ========== */
.section-menu {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 103;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 2px solid var(--navy);
    border-radius: 10px;
    background: white;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 103;
}

.menu-toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 101;
}

.menu-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-close-btn {
    border: 1px solid #d6d6d6;
    background: #f8f9fa;
    color: var(--navy);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.filter-mobile-close {
    display: none;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    background: transparent;
    border: 2px solid #e5e5e5;
    color: var(--navy);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-link:hover {
    border-color: var(--navy);
    color: var(--navy);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.nav-link.active::before {
    content: "";
    position: absolute;
}

@media (max-width: 991px) {
    .section-menu {
        padding: 12px 0;
    }

    .section-menu .container-fluid {
        min-height: 52px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100vh;
        margin: 0;
        padding: 76px 16px 20px;
        background: white;
        border-right: 1px solid #e5e5e5;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 10px;
        transform: translateX(-105%);
        transition: transform 0.3s ease;
        z-index: 102;
        overflow-y: auto;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        border-radius: 12px;
    }

    .section-menu.menu-open .nav-list {
        transform: translateX(0);
    }

    .section-menu.menu-open .menu-toggle-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .section-menu.menu-open .menu-toggle-line:nth-child(2) {
        opacity: 0;
    }

    .section-menu.menu-open .menu-toggle-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .filter-dropdown {
        position: fixed;
        top: 0;
        right: 0;
        width: min(82vw, 340px);
        height: 100vh;
        max-height: none;
        margin: 0;
        padding: 90px 16px 20px;
        border-bottom: none;
        border-left: 1px solid #e5e5e5;
        transform: translateX(105%);
        transition: transform 0.3s ease;
        z-index: 102;
        overflow-y: auto;
    }

    .filter-dropdown.show {
        max-height: none;
        padding: 90px 16px 20px;
        transform: translateX(0);
    }

    .filter-mobile-close {
        display: block;
        text-align: left;
        margin-bottom: 8px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
        justify-content: flex-start;
        border-radius: 12px;
    }
}

/* ========== SECCIONES DE CONTENIDO ========== */
.content-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
