/* --- RESET Y ESTILOS GLOBALES --- */

html {
    /* Esto hace que el salto sea una animación fluida en navegadores modernos */
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;

}

/* Contenedor principal para centrar contenido */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    color: #1a1a1a;
}

p {
    color: #555;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- RESET Y ESTILOS GLOBALES --- */
/* (Header eliminado para experiencia inmersiva) */

/* --- UTILIDAD DE ANIMACIÓN GLOBAL (SCROLL REVEAL) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    /* Curva suave y elegante */
    will-change: opacity, transform;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- SECCIÓN 1: HERO SWITCH (Interruptor de Potencia) --- */


/* --- ESTADO INICIAL (Interruptor) --- */







/* --- SECCIÓN 4: SOBRE MÍ (Texto + Imagen) --- */
.about {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-top: 50px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    /* Fondo sutil para diferenciar */
}

/* Ajuste para que el fondo gris ocupe todo el ancho si se desea, 
           pero aquí lo mantengo limpio en el contenedor */

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: #F58634;
    border-bottom: 2px solid #F58634;
}

/* --- SECCIÓN PROYECTOS (X-RAY GALLERY) --- */
.projects {
    padding: 20px 0 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 40px;
}

/* Tarjeta Base */
.project-card {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    background-color: #f0f0f0;
    /* Fallback */

    /* Estado inicial animación entrada */
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* Overlay & Header */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    transition: background 0.3s ease;
}

.project-card:hover .card-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.9) 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.card-header h4 {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

.project-summary {
    color: #f0f0f0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    margin: auto;
    max-width: 90%;

    /* Legibilidad mejorada */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 10px 15px;
    border-radius: 8px;
}

/* Switch (Modo Admin) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: .4s;
    backdrop-filter: blur(4px);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #F58634;
    border-color: #F58634;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Panel X-Ray (Admin Mode) */
.admin-panel {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1;
    pointer-events: none;
    /* Dejar pasar clicks si está oculto */
}

/* Clase activa controlada por JS (Selector Hermano no funcionaría bien por estructura, usaremos JS) */
.admin-panel.is-active {
    opacity: 1;
    pointer-events: auto;
}

.console-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #ccc;
    text-align: left;
    width: 100%;
}

.console-text p {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
    color: #e0e0e0;
}

.status-online {
    color: var(--color-success, #28a745);
    font-weight: bold;
}

.status-legacy {
    color: #17a2b8;
    font-weight: bold;
}

.status-building {
    color: #fd7e14;
    font-weight: bold;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

/* Cartas Especiales */
.building-card {
    background: #2a2a2a;
    /* Placeholder si no hay img */
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px dashed #555;
}

.promo-card {
    background: #F58634;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-content {
    padding: 20px;
    color: #fff;
}

.card-content h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.btn-start {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    color: #F58634;
    font-weight: 700;
    border-radius: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slot-card {
    background: #f4f4f4;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-card h4 {
    color: #999;
}

.slot-card .status-text {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.slot-card .status-text p {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .projects {
        padding-bottom: 0;
        margin-bottom: 120px !important;
    }

    .footer-cta {
        margin-top: 50px !important;
    }
}



/* --- SECCIÓN 7: FOOTER / CTA --- */
.footer-cta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 60px 0;
    border-top: 1px solid #eee;
}

.cta-left h2 {
    font-size: 2.5rem;
    max-width: 300px;
    line-height: 1.1;
}

.cta-right {
    text-align: right;
}

.cta-socials {
    margin-bottom: 20px;
}

.cta-socials p,
.cta-contact p {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #999;
}

/* Links de Contacto y Redes (Unificados) */
.btn-contact-nav {
    font-weight: 700;
    margin-left: 10px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-contact-nav:hover {
    color: #F58634;
}

/* --- RESPONSIVE (Móvil) --- */

@media (max-width: 768px) {

    /* 1. AJUSTES GENERALES */
    .container {
        padding: 0 15px;
        /* Reducimos el padding lateral para usar más espacio */
    }

    /* Reducimos el padding en todas las secciones para que haya más contenido */
    section {
        padding: 60px 0;
        /* Padding generoso para evitar sensación tosca */
    }

    /* 2. HERO SWITCH MOVIL */


    /* Bloque 2 Unificado */



    /* 6. SOBRE MÍ (ABOUT) */
    .about {
        flex-direction: column;
        text-align: center;
    }

    /* Aseguramos que la imagen y el texto se vean bien */
    .about-image,
    .about-text {
        width: 100%;
        margin: 0;
    }



    /* 8. SERVICIOS (Gestionado en el bloque principal) */
    /* Reglas eliminadas para evitar duplicidad */

    /* 9. FOOTER Y CTA */
    .footer-cta {
        flex-direction: column;
        align-items: center;
        /* Centramos para móvil */
        gap: 30px;
        text-align: center;
    }

    .cta-right {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
        /* Centramos los iconos sociales */
    }

    /* Bloque 3 Unificado */

    /* 10. HEADER / NAV (Si no tienes menú hamburguesa) */
    header {
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        text-align: center;
        margin-top: 15px;
    }

    .nav-links a {
        margin: 10px 0;
    }
}

/* EFECTO HOVER INMERSIVO */
/* EFECTO HOVER ESTATICO (Neutralización Total) */
/* Bloque de servicios eliminado (consolidado arriba) */

/* Oculta el contenido de las respuestas por defecto */




/* --- ANIMACIONES DE TÍTULOS (Estilo Premium) --- */
.title-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    position: relative;
    display: table;
    /* Fallback para fit-content */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Pseudo-elemento para el subrayado dinámico */
.title-animate::after {
    content: '';
    position: absolute;
    bottom: -10px;
    /* Separación del texto */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    /* Empieza invisible */
    height: 4px;
    /* Grosor de la línea */
    background-color: #F58634;
    /* Color del tema */
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.4s;
    /* Espera a que el texto suba un poco */
}

/* Estado Visible (Activado por JS) */
.title-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-animate.visible::after {
    width: 60px;
    /* Ancho final estético */
}