/* ==========================================================================
   1. VARIABLES & TEMAS (CUSTOM PROPERTIES)
   ========================================================================== */

:root {
    /* --- MODO CLARO (Por defecto) --- */
    --bg-color: #F3F5F9;
    --card-bg: #FFFFFF;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #e1e4e8;
    --input-bg: #ffffff;
    
    /* --- COLORES DE MARCA --- */
    --accent: #8A2BE2;        /* Morado Mikey Principal */
    --accent-hover: #7209b7;  /* Morado Oscuro para hover */
    --success: #25D366;       /* Verde WhatsApp */
    
    /* --- UI & EFECTOS --- */
    --radius-lg: 30px;        /* Bordes muy redondeados */
    --radius-md: 15px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --font-main: 'Inter', sans-serif;
    --nav-bg: rgba(255, 255, 255, 0.85);
}

/* --- MODO OSCURO (Clase .dark-mode) --- */
body.dark-mode {
    --bg-color: #0f0f12;
    --card-bg: #1a1a1e;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2a2a30;
    --input-bg: #25252a;
    --accent: #9d4edd;       /* Morado más brillante para fondo oscuro */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(26, 26, 30, 0.85);
}

/* ==========================================================================
   2. RESET & ESTILOS BASE
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    /* Transiciones suaves para todos los cambios de tema */
    transition: background 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease, 
                transform 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* ==========================================================================
   3. COMPONENTES GLOBALES (Botones, Títulos, Layout)
   ========================================================================== */

/* Contenedor Principal */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px 50px; /* Top, Sides, Bottom */
}

/* Títulos de Vistas */
.view-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
}

/* Textos destacados */
.highlight {
    color: var(--accent);
}

.purple-text {
    color: var(--accent);
}

/* Badge (Etiquetas pequeñas) */
.badge {
    background: var(--accent);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- BOTONES --- */

/* Botón Primario (Fondo Sólido) */
.btn-primary {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.dark-mode .btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Botón Secundario (Borde) */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Botón Link Simple */
.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. LÓGICA SPA (Single Page Application)
   ========================================================================== */

.view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.view.active-view {
    display: block;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   5. NAVEGACIÓN FLOTANTE
   ========================================================================== */

.floating-nav {
    position: fixed;
    bottom: 20px; /* En móvil aparece abajo */
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    padding: 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    box-shadow: var(--shadow);
    z-index: 1000;
    border: 1px solid var(--border-color);
    width: 90%;
}

.nav-btn {
    padding: 10px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn.active {
    background: var(--text-main);
    color: var(--bg-color);
}

body.dark-mode .nav-btn.active {
    background: white;
    color: black;
}

.nav-text {
    display: none; /* Oculto en móvil */
    margin-left: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.theme-btn {
    background: none;
    color: var(--text-main);
    padding: 10px;
    border-radius: 50%;
}

.theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   6. SECCIÓN: INICIO (HERO)
   ========================================================================== */

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 70vh;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 450px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

/* Estadísticas del Hero */
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.stat-item h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Imagen Hero */
.hero-img {
    position: relative;
}

.hero-img img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Tarjeta Flotante (Animada) */
.float-card {
    position: absolute;
    bottom: 40px;
    left: -30px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: float 4s ease-in-out infinite;
}

.float-card i {
    font-size: 2rem;
    color: var(--success);
}

.float-card strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text-main);
}

.float-card small {
    color: var(--text-muted);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================================================
   7. SECCIÓN: ACERCA (BENTO GRID)
   ========================================================================== */

.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
}

.bento-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* Tarjeta de Foto */
.photo-card {
    padding: 0;
    overflow: hidden;
    height: 450px;
    position: relative;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
}

/* Pasos del Proceso */
.process-steps {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
}

.step {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1rem;
}

/* ==========================================================================
   8. SECCIÓN: PROYECTOS & FUTUROS PROYECTOS (LAB)
   ========================================================================== */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Tarjeta de Proyecto General */
.project-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.card-img {
    height: 200px;
    background: #ddd;
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 5px;
}

/* --- ESTILOS ESPECÍFICOS PARA FUTUROS PROYECTOS --- */

/* Efecto Blur en imagen */
.future-card .blur-effect img {
    filter: grayscale(100%) opacity(0.8);
    transition: 0.5s ease;
}

.future-card:hover .blur-effect img {
    filter: grayscale(0%) opacity(1);
}

/* Badges de Estado del Futuro */
.status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.status-badge.warning { background: #ff9800; } /* Naranja */
.status-badge.info { background: #2196f3; }    /* Azul */
.status-badge.idea { background: #9c27b0; }    /* Morado */

/* Barra de Progreso */
.progress-container {
    margin-top: 20px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

body.dark-mode .progress-bar {
    background: #333;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* Animación de rayas en la barra de progreso */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
    opacity: 0.5;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* Mini Proyectos (Historial en texto pequeño) */
.mini-project {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-color);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   9. SECCIÓN: PLANES Y PRECIOS
   ========================================================================== */

.plan-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

/* Plan Destacado */
.plan-card.popular {
    border: 2px solid var(--accent);
    transform: scale(1.05);
    z-index: 2;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 15px 0;
    color: var(--text-main);
}

.features li {
    margin-bottom: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    text-align: left;
}

.features i {
    color: var(--accent);
}

/* ==========================================================================
   10. SECCIÓN: COTIZAR (FORMULARIO)
   ========================================================================== */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.quote-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-field {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
}

.input-field:focus {
    border-color: var(--accent);
}

.btn-whatsapp {
    width: 100%;
    padding: 15px;
    background: var(--success);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    font-size: 1.1rem;
}

.btn-whatsapp:hover {
    background: #1ebc57;
}

/* ==========================================================================
   11. PANTALLA DE CARGA (LOADER)
   ========================================================================== */

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   12. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* Tablet y Escritorio */
@media (min-width: 768px) {
    .floating-nav {
        top: 20px;
        bottom: auto; /* Mover barra arriba */
        width: auto;
        padding: 10px 20px;
    }

    .nav-btn {
        border-radius: 30px;
        padding: 10px 20px;
    }

    .nav-text {
        display: inline; /* Mostrar texto */
    }
}

/* Móvil Grande y Tablet Pequeña */
@media (max-width: 900px) {
    .hero-grid,
    .bento-grid,
    .contact-layout,
    .grid-3 {
        grid-template-columns: 1fr; /* Todo a una columna */
    }

    .hero-text {
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .float-card {
        display: none; /* Ocultar en pantallas pequeñas */
    }

    .plan-card.popular {
        transform: scale(1);
        margin: 20px 0;
    }
}