/* ==========================================================================
   1. VARIABLES & CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --bg-dark: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #fcfcfc;
    --text-muted: #a4b0be;
    --primary-blue: #ce6161;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   2. HEADER & BARRA DE PESTAÑAS FLUIDA (ULTRAWIDE)
   ========================================================================== */
.main-header {
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px clamp(20px, 4vw, 60px);
    border-bottom: 1px solid var(--card-border);
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700;
    white-space: nowrap;
}

.logo-brand img { 
    width: 35px; 
    height: 35px; 
    border-radius: 8px; 
    object-fit: contain;
}

/* Navegador de Pestañas Fluido con Scroll Suave */
.nav-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    scrollbar-width: none;
    max-width: 100%;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-btn:hover { 
    color: var(--text-main); 
    background: rgba(255, 255, 255, 0.06); 
}

.tab-btn.active {
    background: var(--primary-blue);
    color: #0a0e17;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

/* ==========================================================================
   3. CONTENEDOR PRINCIPAL FLUIDO
   ========================================================================== */
.content-wrapper {
    width: 100%;
    max-width: 1800px;
    margin: 30px auto;
    padding: 0 clamp(20px, 3vw, 60px);
    flex: 1;
}

/* ==========================================================================
   4. TARJETA DE PRESENTACIÓN DE LA EMPRESA (CREATIVE M HERO)
   ========================================================================== */
.company-hero {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: clamp(40px, 5vw, 70px) clamp(20px, 4vw, 60px);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 80px rgba(0, 210, 255, 0.03);
}

/* Logo de la Empresa */
.company-logo-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15);
}

.company-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

/* Insignias e Indicador de Google Play Store */
.badges-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    border: 1px solid transparent;
}

.playstore-badge {
    background: rgba(0, 210, 255, 0.12);
    border-color: rgba(0, 210, 255, 0.4);
    color: var(--primary-blue);
    font-weight: 600;
}

.dev-badge {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--card-border);
    color: var(--text-muted);
}

/* Títulos y Descripciones */
.company-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    background: linear-gradient(135deg, #fff 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-subtitle { 
    font-size: clamp(1.1rem, 2vw, 1.4rem); 
    color: var(--text-main); 
    margin-bottom: 15px; 
}

.hero-desc { 
    color: var(--text-muted); 
    max-width: 900px; 
    margin: 0 auto 30px; 
    line-height: 1.7; 
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

/* Tecnologías / Badges de Habilidades */
.tech-tags-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 850px;
    margin: 0 auto 35px;
}

.tech-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tech-pill i {
    color: var(--primary-blue);
    font-size: 0.75rem;
}

/* Estadísticas de la Empresa */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 20px;
    transition: transform 0.3s;
}

.stat-card:hover { transform: translateY(-4px); }
.stat-card h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--primary-blue); font-family: 'Space Grotesk', sans-serif; }
.stat-card span { font-size: 0.9rem; color: var(--text-muted); }

/* ==========================================================================
   5. GRILLA FLUIDA DE APLICACIONES (INICIO)
   ========================================================================== */
.section-title { 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: clamp(1.5rem, 2.5vw, 2.2rem); 
    margin: 60px 0 30px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.apps-grid-interactive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(20px, 2vw, 30px);
}

.interactive-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: clamp(25px, 2.5vw, 35px);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
}

.interactive-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 20px var(--card-color);
}

.card-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.category-pill { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    background: rgba(255,255,255,0.05); 
    padding: 5px 12px; 
    border-radius: 12px; 
    border: 1px solid var(--card-border); 
}

.interactive-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; margin-bottom: 10px; }
.interactive-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }

.card-action-link { font-size: 0.95rem; font-weight: 600; color: var(--card-color); display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   6. PESTAÑA INDIVIDUAL DE PROYECTO (STAGE)
   ========================================================================== */
.project-stage {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: clamp(30px, 4vw, 60px) clamp(20px, 4vw, 60px);
    width: 100%;
}

.stage-header { text-align: center; margin-bottom: 50px; }
.category-badge { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.stage-header h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.2rem, 4vw, 3.8rem); margin: 10px 0 15px; }
.project-tagline { font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--text-muted); max-width: 850px; margin: 0 auto 30px; line-height: 1.6; }

.cloud-notice {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--project-color);
    padding: 14px 24px;
    border-radius: 14px;
    display: inline-block;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.main-cta-btn {
    text-decoration: none;
    color: #0a0e17;
    font-weight: 700;
    padding: 18px 36px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.main-cta-btn:hover { 
    transform: scale(1.04); 
    box-shadow: 0 0 25px var(--project-color);
}

.stage-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: clamp(20px, 3vw, 50px);
    border-top: 1px solid var(--card-border);
    padding-top: 50px;
}

.info-block h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.info-block p { color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }

.feature-ticks { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.feature-ticks li { display: flex; align-items: flex-start; gap: 14px; font-size: 1rem; line-height: 1.5; }
.feature-ticks li i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #0a0e17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==========================================================================
   7. CONTENEDORES ESTANDARIZADOS PARA LOGOS E ICONOS
   ========================================================================== */

/* 1. En la Barra de Navegación */
.nav-icon-wrapper {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.nav-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 2. En las Tarjetas de Proyectos */
.card-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-icon-wrapper i {
    font-size: 1.8rem;
}

/* 3. En el Detalle de la Aplicación */
.stage-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stage-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stage-icon-wrapper i {
    font-size: 3.5rem;
}

/* ==========================================================================
   8. FOOTER & ADAPTACIÓN MÓVIL
   ========================================================================== */
footer { 
    text-align: center; 
    padding: 40px; 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    border-top: 1px solid var(--card-border); 
    margin-top: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .main-header { flex-direction: column; align-items: flex-start; }
    .nav-tabs { width: 100%; }
    .stage-body { grid-template-columns: 1fr; }
    .company-logo-container { width: 90px; height: 90px; }
}
/* ==========================================================================
   CONTENEDOR DE VIDEO 100% RESPONSIVE (PANTALLA ANCHA & MÓVIL)
   ========================================================================== */

.responsive-video-box {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9; /* Proporción moderna perfecta sin desfasar */
    border-radius: 20px;
    border: 1px solid var(--card-border);
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

/* ==========================================================================
   RECORTE TOTAL PARA REPRODUCTOR DE GOOGLE DRIVE (SIN BARRAS NI ATENUACIÓN)
   ========================================================================== */

.responsive-video-box {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* CORTA Y OCULTA TODO LO QUE SE SALGA DEL RECUADRO */
    position: relative;
    margin-top: 15px;
}

/* Aplica el recorte superior e inferior solo al iframe de Drive */
.responsive-video-box iframe {
    position: absolute;
    top: -50px; /* Recorta la barra superior de Drive */
    left: 0;
    width: 100%;
    height: calc(100% + 105px); /* Recorta la barra flotante inferior fuera del recuadro */
    border: 0;
}

/* Para videos nativos MP4 (no aplica recorte) */
.responsive-video-box video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ajuste Fino para Celulares */
@media (max-width: 768px) {
    .responsive-video-box {
        border-radius: 14px;
        min-height: 240px;
    }
    
    .responsive-video-box iframe {
        top: -45px;
        height: calc(100% + 95px);
    }
}
