/* =========================================
   1. VARIABLES & RESET (BASE DEL DISEÑO)
   ========================================= */
:root {
    /* Paleta de Colores Premium */
    --primary-color: #2563EB;     /* Azul Vibrante */
    --primary-dark: #1D4ED8;      /* Azul Oscuro para Hover */
    --secondary-color: #1E40AF;   /* Azul Profundo */
    --accent-color: #3B82F6;      /* Azul Claro */
    
    --text-dark: #111827;         /* Negro Suave (Títulos) */
    --text-gray: #4B5563;         /* Gris Texto (Párrafos) */
    --text-light: #9CA3AF;        /* Gris Claro (Detalles) */
    
    --bg-body: #FFFFFF;           /* Fondo Principal */
    --bg-light: #F9FAFB;          /* Fondo Secundario */
    --bg-white: #FFFFFF;
    
    --border-color: #E5E7EB;      /* Bordes sutiles */
    
    /* Sombras Elevadas (Estilo Stripe/Apple) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Texto más nítido en Mac */
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. ANIMACIONES (EFECTO WOW)
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; /* Empieza invisible */
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* =========================================
   3. LAYOUT & UTILIDADES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section-padding {
    padding: 100px 0;
}

.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Grids Responsivos */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Tarjetas más anchas */
    gap: 40px;
}

/* =========================================
   4. HEADER & NAVEGACIÓN
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px); /* Efecto cristal */
    border-bottom: 1px solid var(--border-color);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Botón Hamburguesa */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}
.bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 6px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* =========================================
   5. BOTONES & COMPONENTES UI
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px; /* Redondos modernos */
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--text-dark);
    background: var(--bg-light);
}

/* =========================================
   6. SECCIONES DEL HOME
   ========================================= */

/* Hero Section */
.hero {
    padding: 140px 0 100px;
    background: radial-gradient(circle at 50% 0%, #EFF6FF 0%, #FFFFFF 100%);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Tarjetas de Servicio / Precio */
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}


/* Sección Sobre Mí (Imagen ULTRA PRO) */
.profile-img-wrapper {
    position: relative;
    /* Bordes un poco más técnicos (menos redondos = más serios) */
    border-radius: 24px; 
    overflow: hidden;
    
    /* 1. Tamaño más grande e imponente */
    max-width: 450px; /* Aumentado de 400px a 450px */
    width: 100%;
    margin: 0 auto; /* Centrado perfecto */
    
    /* 2. Marco Robusto (Estilo Galería de Arte) */
    border: 8px solid #FFFFFF; 
    
    /* 3. Sombra de Alta Definición (Doble Capa) */
    /* Capa 1: Sombra difusa para profundidad. Capa 2: Borde sutil para nitidez */
    box-shadow: 
        0 20px 40px -5px rgba(0, 0, 0, 0.12), 
        0 0 0 1px rgba(0, 0, 0, 0.03); 
    
    /* Suavidad extrema en la animación */
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateZ(0); /* Truco para evitar parpadeos */
}

/* Efecto Hover Premium */
.profile-img-wrapper:hover {
    /* Se levanta y hace un zoom imperceptible pero elegante */
    transform: translateY(-8px) scale(1.02);
    
    /* La sombra crece y toma un tinte azulado sutil (tu color de marca) */
    box-shadow: 
        0 35px 70px -10px rgba(37, 99, 235, 0.25),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

.profile-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Pequeño toque de contraste para que la foto resalte más */
    filter: contrast(1.02) saturate(1.02); 
    transition: transform 0.5s ease;
}

/* Opcional: Zoom interno extra en la foto al pasar el mouse */
.profile-img-wrapper:hover img {
    transform: scale(1.05);
}






/* Acordeón FAQ (Detalles) */
details {
    overflow: hidden;
    transition: all 0.3s ease;
}

details summary {
    padding: 10px 0;
    transition: color 0.3s;
}

details[open] summary {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 15px;
}

/* =========================================
   7. PROYECTOS & PÁGINAS INTERNAS
   ========================================= */
.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 240px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05); /* Zoom suave al pasar mouse */
}

/* Contacto */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 80px 0;
}

.form-control {
    width: 100%;
    padding: 16px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-light);
    transition: all 0.3s;
}

.form-control:focus {
    background: var(--white);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    text-align: center;
    color: var(--text-gray);
}

/* =========================================
   8. RESPONSIVE DESIGN (MÓVIL TOTAL)
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
}

/* =========================================
   📱 RESPONSIVE (MÓVIL TOTAL) - VERSIÓN FINAL CORREGIDA
   ========================================= */
@media (max-width: 900px) {
    /* Menú Móvil */
    .menu-toggle { display: block; z-index: 1001; } /* Aseguramos que el botón esté encima de todo */
    
    .nav-links {
        position: fixed;
        top: 0; /* Empieza desde arriba del todo */
        left: 0;
        width: 100%;
        height: 100vh; /* Ocupa TODA la pantalla */
        background: #FFFFFF; /* Fondo Blanco Sólido */
        flex-direction: column;
        justify-content: center; /* Centra los items verticalmente */
        align-items: center;
        padding: 40px 20px;
        gap: 30px;
        transform: translateY(-100%); /* Oculto arriba */
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Animación suave */
        z-index: 1000; /* Queda debajo del botón hamburguesa pero encima del resto */
    }

    .nav-links.active {
        transform: translateY(0); /* Bajar y mostrar */
    }

    .nav-links li { 
        width: 100%; 
        text-align: center;
        opacity: 0; /* Empezar invisibles para animar */
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    /* Animación en cascada para los links */
    .nav-links.active li { opacity: 1; transform: translateY(0); }
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a { 
        display: block; 
        padding: 15px; 
        font-size: 1.5rem; /* Texto más grande para móvil */
        font-weight: 700;
        color: var(--text-dark);
    }

    .nav-links a:hover { color: var(--primary-color); }
    
    /* Animación del botón hamburguesa (X) */
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    /* Mostrar botón "Digitaliza tu Negocio" también en el menú móvil para cerrar ventas */
    .desktop-only { display: inline-flex; width: 80%; margin-top: 20px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section-padding { padding: 60px 0; }

    /* Forzar 1 Columna */
    .grid-2-cols, .grid-3-cols, .contact-wrapper, .about-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* Hero Móvil */
    .hero { padding: 100px 0 60px; text-align: center; } /* Más padding arriba por el header fijo */
    .hero h1 { font-size: 2.5rem; letter-spacing: -1px; }
    .hero p { font-size: 1.1rem; }
    
    .btn { width: 100%; margin-bottom: 12px; }
    .hero div { flex-direction: column; }

    .profile-img-wrapper { display: none !important; }
    
    .service-card { padding: 30px 20px; }
}

/* =========================================
   9. SLIDER INFINITO (TECH STACK)
   ========================================= */
.slider {
    height: 60px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slider::before,
.slider::after {
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 100px;
    z-index: 2;
}

.slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}

.slider::before {
    left: 0;
    top: 0;
}

.slide-track {
    /* 200px * 48 slides totales (24 originales + 24 duplicados) */
    width: calc(200px * 48);
    animation: scroll 60s linear infinite; /* Lo puse más lento (60s) para que se lea bien */
    display: flex;
}

.slide {
    height: 60px;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6B7280; /* Color gris inicial */
    gap: 10px;
    transition: color 0.3s;
}

.slide i {
    font-size: 1.5rem; /* Tamaño del icono */
}

/* Colores originales al pasar el mouse (opcional) */
.slide:hover { color: var(--text-dark); }
.slide:hover i.fa-google { color: #DB4437; }
.slide:hover i.fa-whatsapp { color: #25D366; }
.slide:hover i.fa-php { color: #777BB4; }
.slide:hover i.fa-wordpress { color: #21759B; }
.slide:hover i.fa-html5 { color: #E34F26; }
.slide:hover i.fa-js { color: #F7DF1E; }
.slide:hover i.fa-stripe { color: #635BFF; }

@keyframes scroll {
    0% { transform: translateX(0); }
    /* Mueve la mitad exacta (-24 slides) */
    100% { transform: translateX(calc(-200px * 24)); } 
}

/* AJUSTE MÓVIL */
@media (max-width: 768px) {
    .slide-track {
        /* 150px * 48 slides */
        width: calc(150px * 48);
    }
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-150px * 24)); }
    }
}


/* =========================================
   10. MEJORAS DEL HEADER (NUEVO)
   ========================================= */

/* Estilo para el botón "Digitaliza tu Negocio" (Súper Destacado) */
.btn-cta-header {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white !important; /* Forza el color blanco */
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 800; /* Letra más gruesa */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); /* Sombra resplandeciente */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    border: 2px solid transparent;
}

.btn-cta-header:hover {
    transform: translateY(-3px) scale(1.05); /* Sube y crece un poco */
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

/* Estilo Discreto para el Login (Acceso) */
.nav-login-link {
    color: #9CA3AF !important; /* Gris suave */
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.nav-login-link:hover {
    color: var(--text-dark) !important;
    background-color: #F3F4F6;
}

.mobile-only-text {
    display: none; /* En PC solo se ve el candadito */
}

/* AJUSTES RESPONSIVOS PARA ESTOS CAMBIOS */
@media (max-width: 900px) {
    /* En móvil, el botón CTA ocupa ancho completo */
    .btn-cta-header {
        width: 100%;
        display: block;
        text-align: center;
        margin-top: 10px;
        padding: 16px;
    }

    /* En móvil, el Login necesita texto para que se entienda */
    .mobile-only-text {
        display: inline;
        margin-left: 8px;
        font-size: 1rem;
    }
    
    .nav-login-link {
        border-radius: 8px; /* Ya no redondo */
        width: 100%;
        display: block;
        text-align: center;
        background: #F9FAFB; /* Fondo grisáceo suave */
        margin-top: 10px;
    }
}
/* =========================================
   11. FOOTER PRO (CORREGIDO & PERFECCIONADO)
   ========================================= */

footer {
    background-color: #F9FAFB;
    padding: 70px 0 25px;
    border-top: 1px solid #E5E7EB;
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    /* PC: 3 columnas. La 1ra más ancha para el logo y bio */
    grid-template-columns: 2.5fr 2fr 1.2fr;
    gap: 50px;
    margin-bottom: 50px;
    align-items: start;
    text-align: left; /* Asegura alineación a la izquierda en PC */
}

/* Columna 1: Identidad */
.footer-col:first-child {
    padding-right: 30px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.footer-desc {
    max-width: 320px;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

/* Títulos de Columnas */
.footer-col h4 {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 25px;
    font-weight: 700;
    /* Eliminado uppercase para un look más limpio */
}

/* Listas de Enlaces */
.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li, .footer-contact li {
    margin-bottom: 14px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-block; /* Permite animación de padding */
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Contacto con Iconos */
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
}
.footer-contact a {
    color: var(--text-gray);
    text-decoration: none;
}
.footer-contact a:hover {
    color: var(--primary-color);
}
.footer-contact i {
    color: var(--primary-color);
    width: 18px;
    margin-top: 3px;
    text-align: center;
}

/* Copyright */
.footer-bottom {
    border-top: 1px solid #E5E7EB;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #9CA3AF;
}

/* =========================================
   📱 RESPONSIVE FOOTER (MEJORADO)
   ========================================= */
@media (max-width: 768px) {
    footer {
        padding: 50px 0 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr; /* Mantiene 2 columnas para links */
        gap: 40px 20px;
    }

    /* Columna de Identidad (Logo) arriba y centrada */
    .footer-col:first-child {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
        margin-bottom: 10px;
    }

    .footer-desc {
        margin: 0 auto 25px;
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
    }

    /* Columnas de Menú y Contacto centradas */
    .footer-col h4 {
        margin-bottom: 18px;
        text-align: center; /* Títulos centrados */
    }

    .footer-links, .footer-contact {
        text-align: center; /* Contenido centrado */
    }

    .footer-contact li {
        justify-content: center; /* Iconos y texto centrados */
    }
}

/* =========================================
   12. PÁGINA DE CONTACTO PRO
   ========================================= */

.contact-page-wrapper {
    padding: 80px 0 100px;
    background: linear-gradient(to bottom, #FFFFFF, #F3F4F6);
    min-height: 80vh;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Formulario un poco más ancho */
    gap: 80px;
    align-items: center;
}

/* Columna Izquierda: Info */
.badge-pill {
    background: #DBEAFE;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.contact-info h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-highlight { color: var(--primary-color); }

.contact-desc {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 40px;
}

/* Tarjetas de Contacto */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}
.whatsapp-bg { background: #25D366; }
.email-bg { background: #EA4335; }

.info-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
}
.info-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* Columna Derecha: Formulario */
.contact-form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid #E5E7EB;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}
.form-header h3 { font-size: 1.8rem; margin-bottom: 5px; }
.form-header p { font-size: 0.95rem; color: var(--text-gray); }

/* Inputs Modernos con Iconos */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.textarea-group .input-icon {
    top: 25px; /* Ajuste para textarea */
}

.modern-input {
    width: 100%;
    padding: 16px 20px 16px 55px; /* Padding izquierdo extra para el icono */
    border: 2px solid #F3F4F6;
    background: #F9FAFB;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.modern-input:focus {
    background: white;
    border-color: var(--primary-color);
    outline: none;
}

.modern-input:focus + .input-icon, 
.input-group:focus-within .input-icon {
    color: var(--primary-color);
}

.btn-block { width: 100%; display: flex; justify-content: center; gap: 10px; }

/* =========================================
   13. TOAST NOTIFICATION (POPUP PRO)
   ========================================= */
.toast {
    position: fixed;
    top: 25px;
    right: 30px;
    border-radius: 12px;
    background: #fff;
    padding: 20px 35px 20px 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateX(calc(100% + 60px)); /* Oculto a la derecha */
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    border-left: 6px solid #25D366;
}

.toast.active {
    transform: translateX(0%);
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-content .check {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    width: 35px;
    background-color: #25D366;
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
}

.toast-content .message {
    display: flex;
    flex-direction: column;
    margin: 0 20px;
}

.message .text { font-size: 16px; font-weight: 400; color: #666666; }
.message .text.text-1 { font-weight: 600; color: #333; }

.toast .close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
}

.toast .close:hover { opacity: 1; }

.toast .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #ddd;
}

.toast .progress:before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: #25D366;
}

.toast.active .progress:before {
    animation: progress 5s linear forwards;
}

@keyframes progress {
    100% { right: 100%; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact-info { text-align: center; }
    .contact-cards { align-items: center; }
    .input-icon { left: 15px; }
}
/* =========================================
   14. PORTAFOLIO PRO (MEJORADO)
   ========================================= */

/* Hero */
.hero-portfolio {
    padding: 80px 0 60px;
    background: #fff;
    text-align: center;
}
.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 15px auto 0;
    line-height: 1.6;
}

/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

/* Tarjeta */
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #F3F4F6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

/* Imagen Wrapper */
.project-img-wrapper {
    height: 240px;
    position: relative;
    overflow: hidden;
    background: #F3F4F6;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1); /* Zoom al hacer hover */
}

/* Placeholder */
.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #9CA3AF;
    font-weight: 700;
}

/* Overlay y Botón (NUEVO) */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7); /* Fondo oscuro semitransparente */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-overlay {
    background: white;
    color: var(--text-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(20px); /* Empieza más abajo */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .btn-overlay {
    transform: translateY(0); /* Sube a su posición */
}

.btn-overlay:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Contenido */
.project-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge {
    background: #EFF6FF;
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.project-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.project-title a:hover {
    color: var(--primary-color);
}

.project-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-footer {
    border-top: 1px solid #F3F4F6;
    padding-top: 15px;
    margin-top: auto;
}

.btn-text {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: padding 0.2s;
}
.btn-text:hover {
    padding-left: 5px;
}

/* Estado Vacío */
.empty-state {
    padding: 80px 20px;
    background: #F9FAFB;
    border-radius: 20px;
    border: 2px dashed #E5E7EB;
    margin-top: 20px;
}

/* =========================================
   15. GRID DINÁMICO (ROTATIVO)
   ========================================= */

.category-section {
    margin-bottom: 60px;
}

.section-header {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

/* --- GRID LAYOUT --- */
.dynamic-grid {
    display: grid;
    /* 3 Columnas exactas en PC */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    min-height: 380px; /* Altura mínima para evitar saltos bruscos si carga lento */
}

/* Animación de Entrada Suave */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-in {
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- ESTILO DE TARJETA (Mantenemos el diseño Mini) --- */
.project-card-mini {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #F3F4F6;
    transition: all 0.3s ease;
    height: 100%; /* Para que todas midan lo mismo */
    display: flex;
    flex-direction: column;
}

.project-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: transparent;
}

.mini-img-wrapper {
    height: 200px; /* Altura fija imagen */
    position: relative;
    overflow: hidden;
    background: #F3F4F6;
}

.mini-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.project-card-mini:hover img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    font-size: 0.7rem; font-weight: 700;
    padding: 6px 12px;
    border-radius: 30px;
    z-index: 2;
    text-transform: uppercase;
}

.mini-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(37, 99, 235, 0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}

.project-card-mini:hover .mini-overlay { opacity: 1; }

.btn-mini {
    background: white; color: var(--primary-color);
    padding: 10px 24px; border-radius: 50px;
    text-decoration: none; font-weight: 800; font-size: 0.9rem;
}

.mini-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mini-content h4 {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
    color: var(--text-dark);
}

.mini-content p {
    font-size: 0.9rem; color: var(--text-gray); margin: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .dynamic-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en Tablets */
    }
}

@media (max-width: 768px) {
    .dynamic-grid {
        grid-template-columns: 1fr; /* 1 columna en Móvil */
    }
}
/* =========================================
   16. CTA PREMIUM (FINAL DE PÁGINA)
   ========================================= */

.cta-premium-card {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); /* Azul Profundo a Vibrante */
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.4); /* Sombra azul brillante */
    color: white;
}

.cta-content {
    position: relative;
    z-index: 2; /* Para que el texto quede encima de los círculos */
}

.cta-premium-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white;
    letter-spacing: -0.5px;
}

.cta-premium-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

/* Botones del CTA */
.cta-buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Botón Principal (Blanco Brillante) */
.btn-white-glow {
    background: white;
    color: var(--primary-color);
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-white-glow:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.5);
    color: #1E3A8A;
}

/* Botón Secundario (Transparente) */
.btn-transparent {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-transparent:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Decoración de Fondo (Círculos abstractos) */
.circle-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

/* Responsive CTA */
@media (max-width: 768px) {
    .cta-premium-card {
        padding: 40px 20px;
    }
    .cta-premium-card h2 {
        font-size: 1.8rem;
    }
    .cta-buttons-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    .btn-white-glow, .btn-transparent {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   17. LOGIN CORPORATIVO ROBUSTO (FINAL)
   ========================================= */

/* CONTENEDOR PRINCIPAL (FIXED PARA CENTRADO PERFECTO) */
#login-overlay {
    position: fixed; /* Cubre todo, encima del header */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F3F4F6; /* Gris corporativo base */
    z-index: 9999; /* Por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CANVAS DE RED NEURONAL */
#neural-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Al fondo */
}

/* CONTENEDOR DE LA TARJETA */
.login-container-center {
    width: 100%;
    max-width: 480px; /* Un poco más ancho para robustez */
    padding: 20px;
    position: relative;
    z-index: 10; /* Encima del canvas */
}

/* TARJETA */
.login-card {
    background: #FFFFFF;
    padding: 50px 45px;
    border-radius: 20px;
    /* Sombra fuerte estilo SaaS */
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1), 
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-top: 5px solid var(--primary-color); /* Detalle de color arriba */
}

/* ANIMACIÓN DE ENTRADA (ESCALA) */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* HEADER */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo-corporate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-circle {
    width: 60px; height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
    display: flex; align-items: center; gap: 8px;
}

.badge-admin {
    background: #EFF6FF;
    color: var(--primary-color);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid #DBEAFE;
}

.login-header h2 {
    font-size: 1.5rem; font-weight: 700; color: #1F2937; margin-bottom: 5px;
}
.login-header p { color: #6B7280; font-size: 0.95rem; }

/* INPUTS ROBUSTOS */
.form-label-corp {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.input-group-corp { position: relative; }

.modern-input-corp {
    width: 100%;
    padding: 16px 16px 16px 50px; /* Padding generoso */
    background: #F9FAFB;
    border: 2px solid #E5E7EB; /* Borde más visible */
    border-radius: 10px;
    font-size: 1rem;
    color: #111827;
    transition: all 0.2s;
    font-weight: 500;
}

.modern-input-corp:focus {
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Iconos de Input con fondo */
.icon-wrapper {
    position: absolute;
    left: 2px; top: 2px; bottom: 2px;
    width: 40px;
    display: flex; align-items: center; justify-content: center;
    color: #9CA3AF;
    font-size: 1.1rem;
    background: transparent;
    border-radius: 8px 0 0 8px;
}

.input-group-corp:focus-within .icon-wrapper { color: var(--primary-color); }

.toggle-password-corp {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #9CA3AF; cursor: pointer;
    font-size: 1.1rem;
}
.toggle-password-corp:hover { color: #111827; }

/* BOTÓN LOGIN GRANDE */
.btn-login-corp {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login-corp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.35);
}

/* FOOTER */
.login-footer-corp { margin-top: 30px; text-align: center; }
.back-link-corp {
    color: #6B7280; text-decoration: none; font-size: 0.95rem; font-weight: 500;
    border-bottom: 1px solid transparent; transition: all 0.2s;
}
.back-link-corp:hover { color: var(--primary-color); border-bottom-color: var(--primary-color); }

/* ALERTA ERROR CON SHAKE */
.alert-box-corporate {
    background: #FEF2F2; color: #991B1B; padding: 14px;
    border-radius: 10px; font-size: 0.95rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 25px; border: 1px solid #FECACA;
}

.shake-animation { animation: shake 0.5s; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Utils */
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }









/* =========================================
   18. DASHBOARD ULTRA PRO (VERSIÓN FINAL)
   ========================================= */

/* CAPA MAESTRA: Cubre el header público */
.admin-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #F3F4F6;
    z-index: 99999; /* Encima de todo */
    display: flex;
    font-family: 'Inter', sans-serif;
}

/* --- 1. SIDEBAR (OSCURO) --- */
.admin-sidebar {
    width: 260px;
    background: #111827; /* Negro azulado corporativo */
    color: white;
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 12px; margin-bottom: 40px; padding-left: 10px;
}
.brand-logo {
    width: 36px; height: 36px; background: var(--primary-color);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.brand-text h3 { font-size: 1.1rem; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.badge-workspace { font-size: 0.65rem; background: #374151; padding: 2px 6px; border-radius: 4px; color: #9CA3AF; text-transform: uppercase; }

.menu-label { font-size: 0.7rem; color: #6B7280; font-weight: 700; margin-bottom: 10px; padding-left: 10px; letter-spacing: 0.5px; }
.mt-4 { margin-top: 25px; }

.menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; border-radius: 8px;
    color: #9CA3AF; text-decoration: none; font-weight: 500;
    transition: all 0.2s; font-size: 0.95rem;
}
.menu-item:hover { background: rgba(255,255,255,0.05); color: white; }
.menu-item.active { background: var(--primary-color); color: white; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

.sidebar-bottom { margin-top: auto; border-top: 1px solid #374151; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; }
.user-mini-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; background: #4B5563; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem; }
.user-info h4 { font-size: 0.85rem; margin: 0; font-weight: 600; }
.user-info small { font-size: 0.7rem; color: #9CA3AF; }
.btn-logout { color: #EF4444; font-size: 1.1rem; cursor: pointer; transition: 0.2s; }
.btn-logout:hover { transform: scale(1.1); }


/* --- 2. MAIN AREA --- */
.admin-main {
    flex-grow: 1;
    display: flex; flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Evita scroll global */
    padding: 0;
}

/* Topbar */
.admin-topbar {
    height: 80px;
    background: white;
    border-bottom: 1px solid #E5E7EB;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    flex-shrink: 0;
}
.topbar-title h1 { font-size: 1.4rem; font-weight: 800; color: #111827; margin: 0; }
.current-date { color: #6B7280; font-size: 0.85rem; margin: 0; display: flex; align-items: center; gap: 6px; }

.topbar-actions { display: flex; align-items: center; gap: 20px; }
.stat-pill { background: #ECFDF5; color: #059669; padding: 6px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #059669; }
.btn-shadow { box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }

/* --- BENTO GRID LAYOUT --- */
.bento-grid {
    padding: 30px 40px;
    flex-grow: 1;
    overflow-y: auto; /* Scroll interno solo aquí */
    display: grid;
    /* Grid de 3 columnas: 1fr 1fr 1fr */
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: auto 1fr; /* Fila de KPIs (auto) y Contenido (1fr) */
    gap: 25px;
}

/* KPI Cards */
.kpi-card {
    background: white; border-radius: 16px; padding: 20px;
    display: flex; align-items: center; gap: 15px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.kpi-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.card-blue .kpi-icon { background: #EFF6FF; color: #2563EB; }
.card-purple .kpi-icon { background: #F3E8FF; color: #9333EA; }
.card-dark .kpi-icon { background: #111827; color: white; }
.kpi-data h3 { font-size: 1.5rem; font-weight: 800; margin: 0; color: #111827; line-height: 1; }
.kpi-data p { font-size: 0.8rem; color: #6B7280; margin: 5px 0 0; }

/* --- PANELES (MEJORADO PARA FULL HEIGHT) --- */
.bento-panel {
    background: white; border-radius: 16px; border: 1px solid #E5E7EB;
    display: flex; 
    flex-direction: column; /* Clave para que el contenido se estire */
    overflow: hidden;
    height: 100%; /* Llena la celda del grid */
}
.projects-panel { grid-column: span 2; }
.messages-panel { grid-column: span 1; }

.panel-head {
    padding: 15px 25px; border-bottom: 1px solid #F3F4F6;
    display: flex; justify-content: space-between; align-items: center;
    background: white;
    flex-shrink: 0; /* No se encoge */
}
.panel-head h3 { font-size: 1rem; font-weight: 700; color: #111827; margin: 0; }

/* Herramientas de Tabla (Inputs de Búsqueda) */
.table-tools { display: flex; gap: 10px; align-items: center; }

.search-wrapper { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9CA3AF; font-size: 0.85rem; }

#searchInput {
    padding: 8px 12px 8px 35px; border: 1px solid #E5E7EB; border-radius: 8px;
    font-size: 0.85rem; color: #374151; background: #F9FAFB; width: 200px; transition: all 0.2s;
}
#searchInput:focus { background: white; border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); width: 220px; }

#categoryFilter {
    padding: 8px 12px; border: 1px solid #E5E7EB; border-radius: 8px;
    font-size: 0.85rem; color: #374151; background: #FFFFFF; cursor: pointer;
}
#categoryFilter:focus { outline: none; border-color: var(--primary-color); }

/* Contenedores de Scroll (Flex Grow para llenar espacio) */
.table-container, .messages-feed {
    flex: 1; /* Ocupa todo el espacio restante */
    overflow-y: auto; /* Scroll interno */
    padding: 0;
}

/* Tabla Profesional */
.pro-table { width: 100%; border-collapse: collapse; }
.pro-table th { 
    text-align: left; padding: 12px 25px; font-size: 0.75rem; color: #6B7280; 
    font-weight: 600; text-transform: uppercase; background: #F9FAFB; 
    border-bottom: 1px solid #E5E7EB; 
    position: sticky; top: 0; z-index: 10; /* Header fijo */
}
.pro-table td { padding: 15px 25px; border-bottom: 1px solid #F3F4F6; color: #374151; font-size: 0.9rem; vertical-align: middle; }

.project-mini { display: flex; align-items: center; gap: 12px; }
.mini-thumb { width: 32px; height: 32px; border-radius: 6px; background: #E5E7EB; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; color: #6B7280; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-name { font-weight: 600; color: #111827; }

.status-dot { padding-left: 12px; position: relative; font-size: 0.85rem; color: #059669; font-weight: 500; }
.status-dot::before { content: ''; width: 6px; height: 6px; background: #059669; border-radius: 50%; position: absolute; left: 0; top: 50%; transform: translateY(-50%); }

.tag-pill { background: #F3F4F6; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; color: #4B5563; font-weight: 600; }

.action-link { font-size: 0.8rem; font-weight: 600; text-decoration: none; margin-left: 10px; cursor: pointer; border: none; background: none; }
.action-link.edit { color: var(--primary-color); }
.action-link.delete { color: #EF4444; }

/* Mensajes Feed Estilizado */
.messages-feed { display: flex; flex-direction: column; }
.msg-card { padding: 20px 25px; border-bottom: 1px solid #F3F4F6; transition: 0.2s; background: white; }
.msg-card:hover { background: #F8FAFC; }
.msg-card:last-child { border-bottom: none; }

.msg-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.msg-author { font-weight: 700; font-size: 0.9rem; color: #111827; }
.msg-time { font-size: 0.7rem; color: #9CA3AF; }
.msg-business { font-size: 0.75rem; color: var(--primary-color); margin-bottom: 8px; font-weight: 600; }
.msg-preview { font-size: 0.85rem; color: #4B5563; line-height: 1.4; margin-bottom: 12px; }

.btn-whatsapp-sm {
    display: inline-flex; align-items: center; gap: 6px;
    background: #DCFCE7; color: #16A34A;
    padding: 6px 12px; border-radius: 6px;
    font-size: 0.8rem; font-weight: 700; text-decoration: none;
    transition: 0.2s;
}
.btn-whatsapp-sm:hover { background: #25D366; color: white; }
.badge-counter { background: #EF4444; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 10px; font-weight: bold; }
.empty-state-msg { text-align: center; padding: 40px 20px; color: #9CA3AF; margin: auto; }
.empty-state-msg i { font-size: 2rem; margin-bottom: 10px; display: block; }

/* Scrollbars Personalizados (Mac Style) */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #E5E7EB; border-radius: 20px; }
.custom-scrollbar:hover::-webkit-scrollbar-thumb { background-color: #D1D5DB; }

/* SweetAlert Custom */
.swal-pro-popup { border-radius: 16px !important; padding: 20px !important; }
.swal-pro-cancel { color: #374151 !important; background: #F3F4F6 !important; }
.text-right { text-align: right; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: 1fr; }
    .projects-panel, .messages-panel { grid-column: span 1; }
    .admin-sidebar { width: 70px; padding: 20px 10px; } 
    .brand-text, .menu-item span, .sidebar-menu p, .user-info { display: none; }
    .menu-item { justify-content: center; }
    .sidebar-brand { justify-content: center; padding: 0; }
}










/* =========================================
   19. FORMULARIO ADD PROYECTO (PRO)
   ========================================= */

.bg-light { background-color: #F3F4F6; }

/* Contenedor Centrado */
.form-container-center {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.back-link-flex {
    display: flex; align-items: center; gap: 8px;
    color: #6B7280; text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: color 0.2s;
}
.back-link-flex:hover { color: var(--primary-color); }

/* Tarjeta del Formulario */
.pro-form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

/* Grid Interno (2 Columnas) */
.form-grid-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Izq más ancho */
    border-bottom: 1px solid #E5E7EB;
}

.form-section {
    padding: 30px;
}

.image-section {
    background: #FAFAFA;
    border-left: 1px solid #E5E7EB;
}

.form-title {
    font-size: 1.1rem; font-weight: 700; color: #111827; margin-bottom: 25px;
    padding-bottom: 10px; border-bottom: 2px solid #F3F4F6;
}

/* Textarea Mejorado */
.text-area-corp {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Select Personalizado */
.select-wrapper { position: relative; }
.select-icon {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: #6B7280; pointer-events: none;
}
.modern-input-corp { appearance: none; } /* Quita flecha nativa */


/* --- ZONA DE UPLOAD (DASHED) --- */
.upload-zone {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    height: 320px; /* Alto fijo */
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #EFF6FF;
}

.upload-placeholder {
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

.upload-icon {
    font-size: 3rem; color: #9CA3AF;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.upload-zone:hover .upload-icon {
    transform: translateY(-5px);
    color: var(--primary-color);
}

.upload-hint {
    font-size: 0.8rem; color: #9CA3AF; margin-top: 5px;
}

/* Imagen Previa */
.preview-img {
    width: 100%; height: 100%;
    object-fit: cover; /* Recorta para llenar */
    border-radius: 10px;
}

/* --- FOOTER DEL FORM --- */
.form-footer {
    padding: 20px 30px;
    background: #F9FAFB;
    display: flex; justify-content: flex-end; gap: 15px;
}

.btn-secondary {
    background: white; border: 1px solid #D1D5DB; color: #374151;
    padding: 12px 24px; border-radius: 8px; font-weight: 600; text-decoration: none;
    transition: 0.2s;
}
.btn-secondary:hover { background: #F3F4F6; }

.btn-save {
    padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); border: none; cursor: pointer;
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .form-grid-layout { grid-template-columns: 1fr; } /* 1 Columna en móvil */
    .image-section { border-left: none; border-top: 1px solid #E5E7EB; }
    .upload-zone { height: 250px; }
}

/* =========================================
   20. ESTILOS EXTRA PARA EDITAR (ADD-ON)
   ========================================= */

.section-header-edit {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.id-badge {
    background: #EFF6FF;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #DBEAFE;
}

/* Efecto hover sobre la imagen existente */
.edit-overlay-hint {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center; justify-content: center;
    color: white; font-weight: 600; gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 12px;
    pointer-events: none; /* Deja pasar el click al input */
}

.upload-zone:hover .edit-overlay-hint {
    opacity: 1;
}

.info-alert-blue {
    margin-top: 15px;
    background: #EFF6FF;
    color: #1E40AF;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex; gap: 8px; align-items: start;
    border: 1px solid #DBEAFE;
}

.info-alert-blue i { margin-top: 3px; }


