/* ========================================= */
/* --- 1. CONFIGURACIÓN BASE Y VARIABLES --- */
/* ========================================= */

:root {
    --primary: #37074d;   
    --secondary: #580f7a; 
    --neon-purple: #bd00ff;
    --border-lilac: #dcd0ff;
    --text-dark: #000000;
    --text-light: #ffffff;
    --font-title: 'Red Hat Display', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
#contacto { scroll-margin-top: 100px; }
#beneficios, #proyectos, #nosotros { scroll-margin-top: 20px; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #ffffff;
    background-image: radial-gradient(rgba(55, 7, 77, 0.08) 2px, transparent 2px);
    background-size: 25px 25px;
}

h1, h2, h3, h4, .btn {
    font-family: var(--font-title);
    font-weight: 700;
}

.text-purple { color: var(--primary); }

/* --- BOTONES GENERALES --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    font-size: 0.95rem;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-full { width: 100%; background-color: var(--secondary); color: white; margin-top: 10px; }
.btn-full:hover { background-color: var(--primary); }


/* ========================================= */
/* --- 2. HEADER Y NAVEGACIÓN --- */
/* ========================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.5);
}

.logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-lilac);
    background-color: white;
}

.logo-img { 
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.15);
}

.navbar { display: flex; align-items: center; gap: 15px; }

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    transition: color 0.3s ease;
}
.nav-link:hover { color: var(--secondary); }

.btn-contact {
    background: var(--secondary);
    color: white !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(88, 15, 122, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 10px;
}
.btn-contact:hover { 
    transform: translateY(-2px); 
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(55, 7, 77, 0.4); 
}

.menu-toggle { display: none; background: none; border: none; font-size: 2rem; color: var(--text-dark); cursor: pointer; }


/* ========================================= */
/* --- 3. HERO (PORTADA) --- */
/* ========================================= */
.hero-brand {
    position: relative;
    width: 100%;
    min-height: 500px;
    background-image: url('portada.jpg'); /* Asegúrate de tener esta imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: white;
    z-index: 1; 
}
.hero-brand::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(55, 7, 77, 0.6); 
    z-index: -1; 
}
.hero-brand-content h1 {
    font-size: 5rem;
    line-height: 1; 
    margin-bottom: 15px; 
    text-transform: uppercase;
    letter-spacing: -2px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-weight: 900;
}
.hero-brand-content p { 
    font-size: 1.3rem; letter-spacing: 1px; opacity: 0.95; font-weight: 400;
}

.brand-bar-container { 
    background: transparent;
    padding: 20px 5%; display: flex; justify-content: flex-start; 
}
.brand-bar {
    background-color: var(--primary);
    color: white; padding: 15px 40px;
    border-radius: 12px; width: 100%; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.brand-bar h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }


/* ========================================= */
/* --- 4. BENEFICIOS --- */
/* ========================================= */
.features { padding: 100px 5%; text-align: center; background: transparent; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 15px; color: var(--primary); }
.section-header p { color: #444; max-width: 600px; margin: 0 auto 60px auto; font-size: 1.1rem; }

.features-grid { display: flex; justify-content: space-between; gap: 30px; }

.feature-card {
    background: #ffffff; padding: 40px 30px; border-radius: 16px; text-align: left; flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.04); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; overflow: hidden;
}
.feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(88, 15, 122, 0.15); border-color: rgba(88, 15, 122, 0.3);
}
.icon-box {
    background: var(--primary); color: white; width: 60px; height: 60px;
    display: flex; justify-content: center; align-items: center; border-radius: 12px;
    margin-bottom: 25px; font-size: 1.5rem; transition: transform 0.4s ease;
    box-shadow: 0 5px 15px rgba(55, 7, 77, 0.2);
}
.feature-card:hover .icon-box { transform: scale(1.1) rotate(5deg); background: var(--secondary); }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-dark); }
.feature-card p { font-size: 0.95rem; color: #555; line-height: 1.7; }


/* ========================================= */
/* --- 5. SECCIÓN PROYECTOS (ESTRUCTURA) --- */
/* ========================================= */
.projects { padding: 100px 5%; background: transparent; }

/* TÍTULO PRINCIPAL "PROYECTOS" */
.projects-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
}
.projects-header h2 {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* GRILLA VERTICAL (Un proyecto debajo del otro) */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

/* BLOQUE INDIVIDUAL */
.project-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* SUBTÍTULOS (Milano III / Milano IV) */
.project-subtitle {
    text-align: left;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-left: 10px;
    border-left: 6px solid var(--neon-purple);
    padding-left: 15px;
    line-height: 1;
}

/* TARJETA DE PROYECTO (BASE) */
.project-item {
    border-radius: 20px; 
    background-size: cover; 
    background-position: center; 
    position: relative;
    overflow: hidden; 
    display: flex; 
    align-items: flex-end; 
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease;
    width: 100%;
    aspect-ratio: 21/9; /* Formato panorámico para desktop */
}
.project-item:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.project-item::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(55, 7, 77, 0.95) 0%, rgba(55, 7, 77, 0.4) 50%, transparent 100%);
    opacity: 0.8; transition: opacity 0.5s ease;
}
.project-item:hover::before { opacity: 1; }

/* INFORMACIÓN DENTRO DE LA TARJETA */
.project-info {
    position: relative; z-index: 2; padding: 40px; color: white; width: 100%;
    transform: translateY(0); transition: all 0.5s ease;
}
.project-info p { margin-bottom: 25px; opacity: 0.95; font-weight: 400; font-size: 1.1rem; }
.project-info h3 { font-size: 2rem; }

/* TAGS Y ETIQUETAS */
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag {
    font-size: 0.75rem; text-transform: uppercase; font-weight: 700;
    padding: 6px 12px; border-radius: 6px; display: inline-block; margin-bottom: 0;
}
.tag-status { background: var(--secondary); color: white; }
.tag-data { background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(4px); color: #fff; font-weight: 600; }

/* BOTÓN BLANCO "SABER MÁS" (Para Milano IV) */
.project-info .btn-white {
    opacity: 0; transform: translateY(20px); transition: all 0.4s ease; display: inline-block;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px);          
    border: 1px solid rgba(255, 255, 255, 0.3); color: white; font-weight: 600; padding: 10px 24px;
    border-radius: 20px; cursor: pointer; text-transform: none; position: relative; z-index: 10;
}
.project-item:hover .btn-white { opacity: 1; transform: translateY(0); background: rgba(255, 255, 255, 0.25); }

/* GRÁFICO DE VALOR */
.investment-chart {
    position: absolute; right: 30px; bottom: 30px; text-align: right;
    opacity: 0; transform: translateY(20px); transition: all 0.5s ease 0.1s; 
}
.chart-label {
    display: block; font-size: 0.7rem; color: var(--neon-purple); margin-bottom: 5px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(189, 0, 255, 0.5);
}
.project-item:hover .investment-chart { opacity: 1; transform: translateY(0); }
.chart-line {
    stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.5s ease-out;
    stroke: var(--neon-purple) !important; filter: drop-shadow(0 0 5px rgba(189, 0, 255, 0.6));
}
.project-item:hover .chart-line { stroke-dashoffset: 0; }
.chart-dot { opacity: 0; transition: opacity 0.3s ease 1s; fill: var(--neon-purple) !important; }
.project-item:hover .chart-dot { opacity: 1; }


/* ========================================================= */
/* --- 6. PROYECTOS INTERACTIVOS (POSICIÓN CORREGIDA) --- */
/* ========================================================= */

.project-item-interactive {
    position: relative;
    overflow: hidden;
}

/* --- A. CONTENEDOR DE INFORMACIÓN --- */
.project-info {
    position: relative; 
    z-index: 30; /* Encima del vidrio */
    padding: 40px; 
    color: white; 
    width: 100%;
    pointer-events: none; /* Permite clicks en los botones de abajo */
    
    /* Estado Normal */
    transform: translateY(0); 
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* AL PASAR EL MOUSE: Subimos el contenedor MUCHO MÁS (-120px) */
/* Esto hace que todo el bloque de texto se vaya a la parte superior */
.project-item-interactive:hover .project-info {
    transform: translateY(-120px); 
}

/* --- B. ELEMENTOS QUE DESAPARECEN --- */
/* El título se va */
.project-item-interactive:hover .project-info h3 {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
    transition: all 0.3s ease;
}

/* El gráfico se va */
.project-item-interactive:hover .investment-chart {
    opacity: 0;
    transition: all 0.3s ease;
}

/* --- C. ELEMENTOS QUE SE MUEVEN (Tags y Dirección) --- */

/* 1. LOS MENSAJES (Tags): Suben un poquito más para despegarse */
.project-item-interactive:hover .project-tags {
    opacity: 1;
    transform: translateY(-10px); /* Ajuste fino hacia arriba */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    transition: all 0.5s ease;
}

/* 2. LA DIRECCIÓN: Sube fuerte para ocupar el lugar vacío */
.project-item-interactive:hover .project-info p {
    opacity: 1;
    /* Sube 55px para cerrar el hueco que dejó el Título invisible */
    transform: translateY(-55px); 
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    transition: all 0.5s ease 0.1s; /* Pequeño retraso para efecto fluido */
}


/* --- D. EL PANEL DE VIDRIO (OVERLAY) --- */
.project-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%; 
    display: flex;
    
    transform: translateY(101%); 
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    
    z-index: 20;
    pointer-events: auto; /* Reactivar clicks para botones */
    
    /* EFECTO VIDRIO */
    background: rgba(30, 5, 40, 0.6); 
    backdrop-filter: blur(12px) saturate(180%); 
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 -15px 40px rgba(0,0,0,0.4);
}

/* AL PASAR EL MOUSE: Aparece el vidrio */
.project-item-interactive:hover .project-actions-overlay {
    transform: translateY(0);
}


/* --- E. BOTONES --- */
.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.photos-btn::after {
    content: '';
    position: absolute;
    right: 0;
    top: 30%;
    height: 40%;
    width: 1px;
    background: rgba(255,255,255,0.15);
}

.action-btn .material-icons-outlined {
    font-size: 2rem;
    color: var(--neon-purple);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(189, 0, 255, 0.4));
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.action-btn:hover .material-icons-outlined {
    transform: scale(1.15);
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* Ajuste Celular: Subimos un poco menos para que no se salga de pantalla */
@media (max-width: 768px) {
    .project-item-interactive:hover .project-info { transform: translateY(-90px); }
}


/* ========================================= */
/* --- 7. SECCIÓN NOSOTROS --- */
/* ========================================= */
.about { padding: 100px 5%; background: transparent; position: relative; }
.about-container { display: flex; align-items: center; justify-content: space-between; gap: 60px; max-width: 1200px; margin: 0 auto; }
.about-text { flex: 1; }
.about-text h2 { font-size: 2.5rem; margin-bottom: 25px; line-height: 1.2; color: var(--text-dark); }
.about-text p { font-size: 1rem; color: #555; margin-bottom: 20px; }

.tag-essence {
    background: var(--secondary); padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; 
    text-transform: uppercase; font-weight: 800; color: #ffffff; letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2); margin-bottom: 15px; display: inline-block;
}

.about-values {
    flex: 1; background: white; padding: 40px; border-radius: 20px;
    box-shadow: 0 10px 40px rgba(55, 7, 77, 0.08); border: 1px solid rgba(0,0,0,0.05);
}
.value-item { 
    margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease; border-left: 3px solid transparent; padding-left: 0px;
}
.value-item:hover { transform: translateX(10px); border-left: 3px solid var(--secondary); padding-left: 15px; }
.value-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.value-item h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 8px; }
.value-item p { font-size: 0.9rem; color: #666; margin: 0; }


/* ========================================= */
/* --- 8. FOOTER Y REDES SOCIALES --- */
/* ========================================= */
.footer { background: var(--primary); color: white; padding: 80px 5% 20px 5%; }
.footer-container { display: flex; justify-content: space-between; gap: 50px; }
.footer-left { flex: 1; }
.footer-left h2 { font-size: 2.5rem; margin-bottom: 20px; }
.contact-data p { display: flex; align-items: center; gap: 10px; margin-top: 15px; color: #ddd; }
.footer-right { flex: 1; background: rgba(255,255,255,0.05); padding: 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.8rem; margin-bottom: 5px; color: #ccc; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px; color: white; font-family: inherit;
}
.footer-bottom { margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); text-align: right; font-size: 0.85rem; color: #aaa; }

/* REDES SOCIALES */
.social-media-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.social-btn:hover {
    transform: translateY(-3px);
    color: white;
}

/* Color oficial Facebook */
.social-btn.facebook:hover {
    background: #1877F2; 
    border-color: #1877F2;
}

/* Degradado oficial Instagram */
.social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
}

/* Color oficial WhatsApp */
.social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}


/* ========================================= */
/* --- 9. VISOR DE IMÁGENES (LIGHTBOX) --- */
/* ========================================= */

/* El fondo negro que cubre todo */
.lightbox {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999; /* Por encima de TODO */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Negro casi opaco */
    backdrop-filter: blur(5px);
}

/* La Imagen Grande */
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh; 
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
    animation-name: zoom;
    animation-duration: 0.3s;
}

/* Animación de entrada */
@keyframes zoom {
    from {transform:scale(0.8); opacity: 0} 
    to {transform:scale(1); opacity: 1}
}

/* Botón Cerrar (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
}
.close-btn:hover { color: var(--neon-purple); }

/* Flechas de Navegación */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10000;
}

.next-btn { right: 10px; border-radius: 3px 0 0 3px; }
.prev-btn { left: 10px; border-radius: 3px 0 0 3px; }

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neon-purple);
    transform: scale(1.1);
}

/* Texto descriptivo */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    margin-top: 10px;
}


/* ========================================= */
/* --- 10. RESPONSIVE (CELULARES/TABLETS) --- */
/* ========================================= */

@media (max-width: 1024px) {
    .hero-brand h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    /* Menú Hamburguesa */
    .menu-toggle { display: block; } 
    .navbar {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 75%; background: white;
        flex-direction: column; justify-content: center; gap: 30px; z-index: 1001;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); padding: 40px; transition: 0.4s ease;
    }
    .navbar.active { right: 0; }
    .nav-link { font-size: 1.2rem; }
    .btn-contact { width: 100%; text-align: center; margin: 10px 0 0 0; }

    /* Hero */
    .hero-brand { min-height: 400px; }
    .hero-brand-content h1 { font-size: 2.8rem; }
    
    /* Beneficios */
    .features-grid { flex-direction: column; }
    
    /* Proyectos (Ajustes Verticales) */
    .projects-header h2 { font-size: 2.5rem; }
    .projects-grid { gap: 60px; }
    .project-subtitle { font-size: 2rem; }
    .project-item { aspect-ratio: 4/5; width: 100%; } /* Más alto en móvil */
    .investment-chart { display: none; }
    
    /* Mostrar info en móvil siempre (El hover no funciona bien en touch) */
    .project-item:hover .project-info { padding-right: 40px; }
    .project-item .btn-white { opacity: 1; transform: translateY(0); background: rgba(255, 255, 255, 0.3); }
    .project-item:hover { transform: none; }

    /* Nosotros */
    .about-container { flex-direction: column; gap: 40px; }
    .about-text h2 { font-size: 2rem; }

    /* Footer */
    .footer-container { flex-direction: column; gap: 40px; }
    .footer-left { text-align: center; }
    .contact-data p { justify-content: center; }
    .social-media-links { justify-content: center; }
    .footer-bottom { text-align: center; }

    /* Lightbox Móvil */
    .lightbox-content { width: 95%; }
    .close-btn { top: 10px; right: 20px; font-size: 40px; }
    .prev-btn, .next-btn { font-size: 20px; padding: 10px; }
}

@media (max-width: 480px) {
    .hero-brand-content h1 { font-size: 2.5rem; }
    .projects-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 768px) {
    .project-item-interactive:hover .project-info {
        transform: translateY(-120px); /* Sube menos en celular */
    }
}
