/* ==========================================================================
   RESET GENERAL
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', sans-serif;
    background-color: #5C453C;
    color: #F3EBE6;
    font-size: 18px;
    line-height: 1.5;
}

/* ==========================================================================
   NAVBAR BASE & MENÚ HAMBURGUESA
   ========================================================================== */
.navbar {
    background-color: #2F1F1A;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    letter-spacing: 1px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo-box {
    display: inline-block;
    transition: opacity 0.2s ease;
    order: 1;
}

.logo-box:hover { opacity: 0.8; }

.nav-logo-img {
    height: 32px; 
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
}

.nav-links a {
    color: #F3EBE6;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-links a:hover { opacity: 0.8; }

.header-name {
    font-weight: 500;
    color: #F3EBE6;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    order: 3;
}

.header-name:hover { opacity: 0.8; }

.header-name .short-name {
    display: none;
}

.menu-checkbox, .hamburger-label { 
    display: none; 
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    background-color: #2F1F1A;
    min-height: 45vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    margin-top: 60px;
}

.hero-portfolio-img {
    max-width: 500px; 
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   INFO-BARRIERS
   ========================================================================== */
.info-barriers {
    background-color: #5C453C;
    width: 100%;
    overflow: hidden;
}

.moving-banner-container {
    background-color: #FFDCE8;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.moving-banner-track {
    display: flex;
    width: max-content;
    animation: moveLeftContinuous 20s linear infinite;
}

.moving-banner-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: 'Satoshi', sans-serif;
    color: #2F1F1A;
    font-size: 18px;
    letter-spacing: 1px;
}

.normal-text { 
    font-weight: 300; 
    font-style: italic;
}
.bold-text { font-weight: 700; }
.banner-item { margin-right: 15px; }

.star-icon {
    height: 20px; 
    width: auto;
    align-self: center;
    margin: 0 18px;
}

@keyframes moveLeftContinuous {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.moving-banner-container:hover .moving-banner-track {
    animation-play-state: paused;
}

.main-title {
    background-color: #5C453C;
    color: #FFDCE8;
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: 7.7vw; 
    text-align: center;
    padding: 20px 0;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    display: block;
}

/* ==========================================================================
   ESTRUCTURA PRINCIPAL FIGMA
   ========================================================================== */
.figma-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    scroll-margin-top: 90px;
}

h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    color: #FFDCE8; 
    text-transform: uppercase;
}

.top-row {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: center;
}

.section-block {
    margin-bottom: 30px;
}

.section-block p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 100%;
    color: #F3EBE6;
}

.video-column {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.video-wrapper {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gif-content {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* BARRA ROSA DEBAJO DEL GIF */
.gif-caption-bar {
    width: 100%;
    background-color: #FFDCE8;
    color: #2F1F1A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    box-sizing: border-box;
}

.caption-star {
    height: 22px;
    width: auto;
    display: block;
}

.caption-text {
    font-size: 18px;
    letter-spacing: 1px;
    display: flex;
    gap: 4px;
}

.caption-text .normal-text {
    font-weight: 300;
    font-style: italic;
}

.caption-text .bold-text {
    font-weight: 700;
}

.mid-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
    align-items: start;
}

.cv-box {
    width: 100%;
    max-width: 460px;
    margin-left: auto;
}

.cv-section {
    margin-bottom: 30px;
}

.cv-item {
    display: flex;
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.5;
}

.cv-item .year {
    width: 110px;
    font-weight: 700;
    color: #FFDCE8;
    flex-shrink: 0;
}

.cv-item p { color: #F3EBE6; }

.languages-box {
    width: 100%;
    max-width: 460px;
    margin-right: auto;
}

.lang-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.lang-row span {
    width: 90px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #F3EBE6;
}

.bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    position: relative;
    flex-grow: 1;
    margin-left: 15px;
}

.bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #FFDCE8;
}

.bar-100::after { width: 100%; }
.bar-90::after { width: 88%; }
.bar-85::after { width: 80%; }

.bottom-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
    align-items: start;
    margin-top: 10px;
}

.tools-box {
    width: 100%;
    max-width: 460px;
    margin-left: auto;
}

.section-giant-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -1px;
    color: #FFDCE8;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Satoshi', sans-serif;
}

.programs-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}

.contact-box {
    width: 100%;
    max-width: 460px;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-icon-svg {
    width: 22px;
    height: 22px;
    margin-right: 14px;
    flex-shrink: 0;
    color: #FFDCE8; 
}

.contact-box a {
    color: #F3EBE6;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.contact-box a:hover {
    color: #FFDCE8;
}

.contact-trigger {
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.contact-trigger:hover { opacity: 0.8; }

.title-star {
    height: 0.7em;
    width: auto;
    display: inline-block;
}

/* ==========================================================================
   ESTILOS DOWNLOAD CV (CENTRADO Y EN COLOR MARRÓN)
   ========================================================================== */
.download-cv-section {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #2F1F1A;
    color: #F3EBE6;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 220, 232, 0.3);
}

.cv-download-btn:hover {
    transform: translateY(-3px);
    background-color: #FFDCE8;
    color: #2F1F1A;
}

.cv-star {
    height: 18px;
    width: auto;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: #2F1F1A; 
    padding: 25px 20px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: rgba(243, 235, 230, 0.7); 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   MODAL DE CONTACTO / ID BADGE
   ========================================================================== */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.id-badge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    transform-origin: top center;
}

.contact-overlay.active .id-badge-wrapper {
    animation: badgeSwing 1.8s ease-in-out infinite alternate;
}

@keyframes badgeSwing {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.badge-clip {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: -10px;
    z-index: 2;
}

.clip-top {
    width: 24px;
    height: 40px;
    background: linear-gradient(135deg, #3d2922, #2F1F1A, #1d1310);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.clip-ring {
    width: 16px;
    height: 16px;
    border: 3px solid #2F1F1A;
    border-radius: 50%;
    margin-top: -6px;
    background-color: #5C453C;
}

.id-card {
    background-color: #FFDCE8;
    color: #2F1F1A;
    width: 380px;
    padding: 24px 20px 20px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    font-family: 'Courier New', Courier, monospace;
}

.close-badge {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5C453C;
    transition: color 0.2s ease;
}

.close-badge:hover { color: #2F1F1A; }

.id-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #2F1F1A;
    border-bottom: 1px solid rgba(47, 31, 26, 0.2);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.id-card-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.id-photo-box {
    width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.id-photo-box img {
    width: 130px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
}

.id-date {
    font-size: 11px;
    color: #2F1F1A;
    margin-top: 6px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.id-info {
    display: flex;
    flex-direction: column;
}

.id-info h3 {
    font-family: 'Satoshi', sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: #2F1F1A;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.id-info .status {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #5C453C;
    margin-bottom: 16px;
    font-weight: bold;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.email-link {
    font-size: 10px;
    color: #2F1F1A;
    text-decoration: underline;
    word-break: break-all;
    font-weight: bold;
}

.phone {
    font-size: 12px;
    color: #2F1F1A;
}

.instagram-link {
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.instagram-link:hover { opacity: 0.7; }

.note {
    font-size: 10px;
    color: #5C453C;
    font-style: italic;
}

.id-card-footer {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px dashed rgba(47, 31, 26, 0.25);
    text-align: center;
}

.id-role {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #5C453C;
    text-transform: uppercase;
}

/* ==========================================
   ESTILOS GENERALES DEL POPUP DE CONTACTO
   ========================================== */

.contact-modal {
    display: flex;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.active {
    visibility: visible;
    opacity: 1;
}

.contact-modal-content {
    background-color: #FFFFFF;
    color: #1A1A1A;
    padding: 50px 40px 40px 40px;
    max-width: 480px;
    width: 90%;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(15px);
    transition: transform 0.3s ease;
}

.contact-modal.active .contact-modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #1A1A1A;
    cursor: pointer;
    font-family: inherit;
    padding: 5px;
}

.contact-modal-content h2 {
    font-family: 'Satoshi', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.contact-modal-content p {
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #555555;
    margin-bottom: 25px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.contact-link {
    font-family: 'Satoshi', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

.location-text {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888888 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   RESPONSIVE / MÓVIL Y TAMAÑOS REDUCIDOS (< 850px)
   ========================================================================== */
@media (max-width: 850px) {

    .header-name .full-name { display: none; }

    .header-name .short-name {
        display: inline;
        font-weight: 500;
        font-size: 13px;
    }

    .hamburger-label {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1002;
        order: 2;
    }

    .hamburger-label span {
        width: 100%;
        height: 2px;
        background-color: #F3EBE6;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }

    .logo-box { order: 1; }
    .header-name { order: 3; }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: #2F1F1A;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 60px;
        gap: 35px;
        z-index: 1001;
    }

    .nav-links a {
        font-size: 22px;
        margin: 0;
    }

    .menu-checkbox:checked ~ .nav-links { display: flex; }

    .menu-checkbox:checked ~ .hamburger-label span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-checkbox:checked ~ .hamburger-label span:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked ~ .hamburger-label span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .figma-container {
        padding: 20px 15px;
        gap: 30px;
    }

    .top-row, .mid-row, .bottom-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cv-box, .languages-box, .tools-box, .contact-box {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    /* CENTRADO EXCLUSIVO EN MÓVIL PARA TOOLS Y CONTACT */
    .tools-box, 
    .contact-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .programs-img {
        margin: 0 auto;
    }

    .contact-trigger {
        justify-content: center;
    }

    .video-column {
        justify-content: center;
        order: -1;
    }

    .video-wrapper { max-width: 280px; }

    .section-giant-title { font-size: 48px; }

    .id-card {
        width: 90vw;
        max-width: 340px;
    }
}