/* --- VARIABLES Y CONFIGURACIÓN BASE --- */
:root {
    --primary-red: #c62828;
    --white: #ffffff;
    --text-dark: #333;
    --bg-light: #fcfcfc;
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- ANIMACIONES DE CARGA (KEYFRAMES) --- */
@keyframes expandContainer {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animación nativa en CSS que simula el dibujo sin estirar la curva */
@keyframes revealLine {
    from { clip-path: inset(0 100% 0 0); } /* Totalmente tapado desde la derecha */
    to { clip-path: inset(0 0 0 0); }     /* Totalmente descubierto */
}

/* --- HEADER & NAVBAR --- */
.header {
    background-color: var(--primary-red);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.brand { 
    color: var(--white); 
    font-weight: 700; 
    font-size: 1.5rem; 
    text-decoration: none; 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 30px; 
}

.nav-links a { 
    color: var(--white); 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: rgba(255,255,255,0.8); }

/* --- BLOQUE DEL TÍTULO PRINCIPAL ROJO --- */
.main-title-container {
    background-color: var(--primary-red);
    margin-left: 20%; 
    width: 80%;      
    padding: 20px 40px;
    margin-bottom: 60px;
    margin-top: 150px;
    
    transform-origin: right; 
    opacity: 0;
    animation: expandContainer 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.main-title {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 400;
    
    opacity: 0;
    animation: fadeInText 0.4s ease-out forwards;
    animation-delay: 0.35s; 
}

/* --- CONTENIDO GENERAL (Biografía e Info) --- */
.content-wrapper {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 50px 200px 50px;
    
    opacity: 0; 
    animation: fadeInUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s; 
}

/* --- SECCIÓN BIOGRAFÍA, NOMBRE ROJO Y OLA --- */
.profile-block {
    display: flex;
    gap: 50px;             
    align-items: flex-start; 
    margin-bottom: 80px;
}

.profile-text {
    flex: 1.1;             
    font-size: 1.2rem;     
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Nombre centrado y completamente rojo */
.user-name {
    color: var(--primary-red);
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    
    display: block;
    width: max-content;
    margin: 0 auto 35px auto; 
    position: relative;
    
    opacity: 0;
    animation: fadeInText 0.5s ease-out forwards;
    animation-delay: 0.6s;
}

/* Contenedor base de la Ola (Estático para evitar bloqueos por caché) */
.user-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -15px; 
    width: 100%;
    height: 20px;  
    
    /* SVG exacto y limpio de tu página inicial */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 20'%3E%3Cpath d='M5,15 Q150,5 250,15 T495,10' stroke='%23c62828' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    
    /* Inicia completamente recortado (oculto) */
    clip-path: inset(0 100% 0 0); 
}

/* Clase que ejecuta el efecto de dibujo continuo de izquierda a derecha */
.user-name.animate-wave::after {
    animation: revealLine 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.9s; 
}

.profile-text p {
    margin-bottom: 22px;
    text-align: justify;
}

.profile-image-container { flex: 0.9; }
.image-placeholder { width: 100%; display: block; }

.profile-img-box {
    height: 550px;         
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

.profile-img-box:hover {
    transform: scale(1.03); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12); 
}

/* --- SUBTÍTULOS (Educación, Experiencia...) --- */
.section-title-container {
    width: 100%;
    display: flex;
    justify-content: center; 
    margin: 60px 0 40px 0;
}

.section-title {
    background-color: var(--primary-red);
    color: var(--white);
    display: inline-block;
    padding: 10px 40px;
    font-weight: 600;
    text-align: center;
    text-transform: lowercase; 
}

.section-title.capitalized { text-transform: none; }

/* --- FILAS DE LOGOS --- */
.row-item {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.item-logo { flex: 0.35; }

.logo-box {
    width: 100%;
    height: 110px; 
    object-fit: contain; 
    object-position: center; 
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo-box:hover { transform: scale(1.08); }

.item-content {
    flex: 0.65;
    font-size: 1rem;
    color: var(--text-dark);
}

.item-content ul { list-style: none; }
.item-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.item-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    line-height: 1;
}

.item-content p { text-align: justify; margin-bottom: 8px; }
.tools { font-size: 0.95rem; color: #666; font-weight: 500; }

.logo-maria { height: 180px; transform: scale(1.2); }
.logo-maria:hover { transform: scale(1.28); }

.logo-lomas { height: 160px; transform: scale(1.15); }
.logo-lomas:hover { transform: scale(1.23); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .main-title-container {
        margin-left: 10%;
        width: 90%;
        padding: 15px 25px;
    }
    .main-title { font-size: 2.2rem; }
    
    .user-name { 
        font-size: 1.8rem; 
        max-width: 100%; 
        width: auto; 
        display: block; 
        margin-bottom: 25px;
    }
    
    .user-name::after { 
        bottom: -12px; 
        height: 15px; 
    }

    .content-wrapper { padding: 0 20px 60px 20px; }
    .profile-block { flex-direction: column-reverse; gap: 30px; } 
    .profile-text { font-size: 1.1rem; }
    .profile-img-box { height: 350px; } 
    
    .profile-img-box:hover { transform: none; box-shadow: none; } 
    .row-item { flex-direction: column; align-items: stretch; gap: 20px; }
    .logo-box { height: 90px; }
    .logo-box:hover { transform: none; }
    
    .logo-maria, .logo-lomas { height: 130px; transform: none; }
    .logo-maria:hover, .logo-lomas:hover { transform: none; }
}
/* ===== BOTONES FLOTANTES DE CONTACTO ===== */

.contacto-flotante {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    font-family: 'Montserrat', sans-serif;
}

.contacto-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
}

.contacto-boton {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: none;
    border-radius: 50%;
    background: #D92332;
    color: white;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px #0003;
    transition: transform .25s, background .25s;
}

.contacto-boton svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contacto-boton::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -7px;
    border-radius: 50%;
    background: #D9233266;
    animation: contacto-destello 1.8s ease-out infinite;
    pointer-events: none;
}

.contacto-boton::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -7px;
    border: 2px solid #D9233299;
    border-radius: 50%;
    animation: contacto-onda 1.8s ease-out infinite .6s;
    pointer-events: none;
}

@keyframes contacto-destello {
    0%, 100% {
        opacity: .25;
        transform: scale(.92);
    }
    50% {
        opacity: .85;
        transform: scale(1.12);
    }
}

@keyframes contacto-onda {
    0% {
        opacity: .8;
        transform: scale(.85);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.contacto-boton:hover {
    background: #B91828;
    transform: scale(1.08);
}

.contacto-panel {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 0;
    max-width: calc(100vw - 120px);
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    background: white;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 4px 20px #0002;
    transition: width .3s, padding .3s, opacity .2s,
                transform .3s, visibility .3s;
}

.contacto-item:hover .contacto-panel,
.contacto-item:focus-within .contacto-panel {
    width: 220px;
    padding: 12px 16px;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.contacto-panel-titulo {
    font-size: 12px;
    font-weight: 700;
    color: #D92332;
}

.contacto-panel-dato {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contacto-panel-ayuda {
    font-size: 10px;
    color: #777;
}

@media (max-width: 480px) {
    .contacto-flotante {
        right: 16px;
        bottom: 16px;
        gap: 10px;
    }

    .contacto-boton {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .contacto-boton svg {
        width: 24px;
        height: 24px;
    }

    .contacto-item:hover .contacto-panel,
    .contacto-item:focus-within .contacto-panel {
        width: min(190px, calc(100vw - 110px));
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contacto-boton::before,
    .contacto-boton::after {
        animation: none;
    }

    .contacto-boton,
    .contacto-panel {
        transition: none;
    }
}