:root {
    --bg-slate: #92A7B5; 
    --text-navy: #2C4463; 
    --vest-blue: #A8BCE0; 
    --white: #FFFFFF;
    --dark-bg: #1A1A1A; 
    --accent-coral: #D16B64; 
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-slate);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.serif-italic {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 5%; }

/* --- ANIMACIONES --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- TÍTULOS COMUNES --- */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 2rem;
}
.section-title .serif-italic { color: var(--text-navy); }

/* --- BOTÓN WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; 
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse-wpp 2s infinite; 
}

.whatsapp-float:hover { 
    transform: translateY(-5px); 
    animation: none; 
    background-color: #20BA56;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 36px;
    height: 36px;
}

@keyframes pulse-wpp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- HERO --- */
.hero {
    position: relative;
    height: 75vh; 
    display: flex;
    align-items: center;
    padding-top: 2rem;
    overflow: hidden; 
}

.hero-placeholder {
    background-image: url('img/portada.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(146, 167, 181, 0.85) 0%, rgba(44, 68, 99, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5.5rem); 
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    max-width: 900px;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.15);
    opacity: 0; 
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s; 
}

.hero-title .serif-italic { 
    color: var(--accent-coral); 
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--white);
    opacity: 0; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.7s; 
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 70vh; 
        padding-top: 6rem; 
        padding-bottom: 4rem;
    }
    .hero-placeholder {
        background-attachment: scroll; 
        background-position: top center;
    }
    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3rem); 
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-top: 1.5rem; 
    }
}

/* --- SECCIÓN EXPERIENCIA & COMPETENCIAS --- */
.about-section {
    padding: 6rem 5%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.about-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.about-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.about-photo-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 100%;
    max-width: 380px; 
    height: 480px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.experience-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    padding: 15px 20px;
    background: rgba(44, 68, 99, 0.15);
    border-left: 4px solid var(--text-navy);
    border-radius: 0 10px 10px 0;
}

.badge-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-navy);
    line-height: 1;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    opacity: 0.9;
}

.lead-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.sub-text {
    font-size: 1rem;
    opacity: 0.8;
}

/* --- COMPETENCIAS CLAVE - DISEÑO EDITORIAL --- */
.about-bottom-section {
    width: 100%;
}

.competencies-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 4rem;
    text-align: center;
}

.competencies-editorial {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas en PC */
    gap: 3rem 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.comp-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.comp-row:hover {
    transform: translateX(10px);
}

.comp-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--accent-coral);
    flex-shrink: 0;
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.comp-row:hover .comp-icon-box {
    background: var(--accent-coral);
    color: var(--white);
    border-color: var(--accent-coral);
}

.comp-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.comp-details h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.6rem;
    margin-top: 0.2rem;
}

.comp-details p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* --- RESPONSIVE DE EXPERIENCIA Y COMPETENCIAS --- */
@media (max-width: 900px) {
    /* Reordenamiento de Cabecera (Foto y Biografía) */
    .about-top-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-text-content {
        align-items: center;
    }
    
    .experience-badge {
        border-left: none;
        border-top: 2px solid var(--text-navy);
        border-bottom: 2px solid var(--text-navy);
        border-radius: 10px;
        padding: 15px 30px;
    }

    /* Competencias Editoriales Móvil */
    .competencies-editorial {
        grid-template-columns: 1fr; /* Flujo de 1 columna vertical */
        gap: 0;
    }

    .comp-row {
        padding: 2rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left; /* Mantiene el texto alineado a la izquierda */
    }
    
    .comp-row:last-child {
        border-bottom: none;
    }

    .comp-row:hover {
        transform: none; /* Desactivar hover en táctil */
    }
    
    .comp-icon-box {
        width: 55px;
        height: 55px;
        border-radius: 12px;
    }
    
    .comp-icon-box svg {
        width: 24px;
        height: 24px;
    }

    .comp-details h4 {
        font-size: 1.2rem;
    }

    .comp-details p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .profile-photo {
        max-width: 280px;
        height: 380px;
    }
    .comp-row {
        gap: 1.2rem;
    }
}

/* --- SERVICIOS --- */
.full-width-cards {
    width: 100%;
    padding: 0 2%; 
    margin-top: 1.5rem;
}

@media (min-width: 2560px) {
    .full-width-cards {
        max-width: 2400px;
        margin-left: auto;
        margin-right: auto;
    }
}

.services-section {
    padding: 4rem 0 6rem 0;
}

.services-section .section-title { padding: 0 5%; }

.flex-cards-container {
    display: flex;
    flex-direction: row;
    height: 600px;
    width: 100%;
    gap: 15px;
}

.flex-card {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.flex-card.active { flex: 4; cursor: default; }

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9) 0%, rgba(44, 68, 99, 0.4) 100%);
    z-index: 1;
    transition: background 0.6s ease;
}

.flex-card.active .card-overlay {
    background: linear-gradient(to right, rgba(44, 68, 99, 0.95) 0%, rgba(44, 68, 99, 0.7) 100%);
}

.card-content-collapsed {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.flex-card.active .card-content-collapsed { opacity: 0; pointer-events: none; }

.card-content-collapsed h3 {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 1.5rem;
    margin-bottom: 20px;
    white-space: nowrap;
}

.icon-plus {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-content-expanded {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: all 0.5s ease 0.2s;
}

.flex-card.active .card-content-expanded { opacity: 1; pointer-events: auto; transform: translateX(0); }

.expanded-text { flex: 1; max-width: 400px; }

.expanded-text h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--vest-blue);
}

.expanded-text p { font-size: 1.1rem; margin-bottom: 2rem; color: rgba(255,255,255,0.9); }

.btn-card {
    display: inline-block;
    border: 1px solid var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-card:hover { background-color: var(--white); color: var(--text-navy); }

.expanded-img {
    width: 300px;
    height: 200px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-left: 20px;
    display: none;
}

@media (min-width: 1024px) {
    .expanded-img { display: block; }
}

/* --- UI MÓVIL SERVICIOS --- */
.mobile-tabs, .mobile-controls {
    display: none;
}

@media (max-width: 900px) {
    .mobile-tabs {
        display: flex;
        justify-content: flex-start;
        gap: 10px;
        margin-bottom: 20px;
        overflow-x: auto;
        padding-bottom: 5px;
        -ms-overflow-style: none;  
        scrollbar-width: none;  
    }
    .mobile-tabs::-webkit-scrollbar { display: none; }

    .mobile-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-top: 25px;
    }

    .tab-btn {
        background-color: transparent;
        border: none;
        color: var(--white);
        font-family: 'Montserrat', sans-serif;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 8px 16px;
        border-radius: 20px;
        cursor: pointer;
        white-space: nowrap;
        opacity: 0.7;
        transition: all 0.3s ease;
    }
    
    .tab-btn.active {
        background-color: var(--accent-coral);
        color: var(--white);
        opacity: 1;
    }

    .flex-cards-container {
        flex-direction: row; 
        height: 550px;
        overflow-x: auto;
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        gap: 15px;
        padding-bottom: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .flex-cards-container::-webkit-scrollbar { display: none; }

    .flex-card, .flex-card.active {
        flex: 0 0 85%; 
        scroll-snap-align: center; 
        border-radius: 20px;
    }

    .card-content-collapsed { display: none !important; }
    
    .card-content-expanded {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        padding: 30px 20px;
    }

    .card-overlay {
        background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, rgba(44, 68, 99, 0.3) 100%) !important;
    }

    .expanded-text h3 { font-size: 2rem; }
    
    .slider-btn {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        cursor: pointer;
        transition: background 0.3s;
    }
    .slider-btn:active { background: rgba(255,255,255,0.1); }
    
    .slider-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    .dot {
        width: 8px;
        height: 4px;
        background-color: rgba(255,255,255,0.4);
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    .dot.active {
        width: 20px;
        background-color: var(--white);
    }
}

/* --- CASOS DE ÉXITO (ACORDEÓN Y VIDEOS) --- */
.portfolio-section {
    padding: 6rem 5%;
}

.portfolio-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-navy);
}

.portfolio-grid {
    display: grid;
    /* Fuerza 3 columnas del mismo tamaño en PC (2 filas de 3 tarjetas) */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

/* Reglas responsivas para ordenar las tarjetas en dispositivos más pequeños */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 1 sola columna en celular (una debajo de otra) */
    }
}

.client-card {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    background-color: transparent;
    overflow: hidden;
}

.client-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.client-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    pointer-events: none;
}

.client-card h3 span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    font-style: normal;
}

.toggle-icon {
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.4s ease;
    pointer-events: none;
}

.client-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.3s ease;
}

.client-card.active {
    background-color: var(--white);
    color: var(--text-navy);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.client-card.active .toggle-icon {
    transform: rotate(45deg);
}

.client-card.active .client-details {
    max-height: 800px;
    opacity: 1;
    margin-top: 1.5rem;
}

.video-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #000;
}

.video-container video {
    width: 100%;
    display: block;
}

.client-details p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.client-card.wide {
    grid-column: 1 / -1;
    background-color: rgba(44, 68, 99, 0.1);
}

.client-card.wide.active {
    background-color: var(--white);
}

.wide-subtitle {
    margin-top: 0.2rem;
    font-size: 1rem;
    pointer-events: none;
}

/* --- FOOTER / CONTACTO --- */
.footer-section {
    background-color: var(--text-navy);
    padding: 6rem 0 2rem 0;
    margin-top: 4rem;
}

.contact-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 4rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.contact-btn svg {
    transition: transform 0.3s ease;
}

.contact-btn:hover {
    background-color: var(--white);
    color: var(--text-navy);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.contact-btn:hover svg {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .contact-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .contact-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.5;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

/* --- TÉRMINOS Y CONDICIONES (MODAL) --- */
.terms-link {
    color: var(--vest-blue);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 10px;
    display: inline-block;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--accent-coral);
}

.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-slate);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-coral);
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--text-navy);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.modal-body p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}
/* --- Ajustes de texto y títulos en sección Experiencia --- */
.custom-title-spacing {
    margin-bottom: 1rem !important; /* Reduce el espacio debajo del título */
    line-height: 1.2;
}

.justify-text {
    text-align: justify; /* Justifica los párrafos para mayor prolijidad */
}
