:root {
    --bg-color: #0b0d11;
    --card-bg: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #2f81f7; /* Azul GitHub/Corporativo más suave */
    --border-color: #30363d;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Colores de marca/acción */
    --phone: #238636;
    --whatsapp: #25D366;
    --share: #8e44ad;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
    padding-bottom: 80px; /* Espacio para barra móvil */
}

a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
	clear:both;
}

.main-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.main-logo {
    max-width: 220px; /* Tamaño ajustado para elegancia */
    height: auto;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- Sidebar Layout (PC) --- */
@media (min-width: 1024px) {
    .layout-wrapper {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 3rem;
        align-items: start;
        margin-top: 3rem;
    }
    .sidebar {
        position: sticky;
        top: 2rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    .mobile-contact-bar { display: none !important; }
}

@media (max-width: 1023px) {
    .layout-wrapper { display: block; }
    .sidebar { display: none; } /* Ocultar sidebar en móvil/tablet */
    .dossier-card { margin-top: -20px; }
}

/* --- Sidebar Components --- */
.contact-box {
    background: #1c2128;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex; flex-direction: column; gap: 0.8rem;
}

.contact-title {
    font-size: 0.85rem; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem;
}

.sidebar-menu {
    padding: 1.5rem 0;
}

.sidebar-menu h3 {
    font-size: 0.85rem; color: var(--text-secondary); 
    text-transform: uppercase; margin-bottom: 1rem; letter-spacing: 1px;
}

.sidebar-menu ul { list-style: none; }
.sidebar-menu li { margin-bottom: 0.2rem; }
.sidebar-menu a {
    display: block; padding: 0.5rem; color: var(--text-primary);
    border-radius: 6px; transition: all 0.2s; font-size: 0.95rem;
}
.sidebar-menu a:hover { background: rgba(47, 129, 247, 0.15); color: #58a6ff; }

/* Botones Contacto */
.btn-contact {
    display: flex; align-items: center; justify-content: center; gap: 0.8rem;
    padding: 0.6rem 1rem; border-radius: 6px; font-weight: 600;
    font-size: 0.9rem; color: white; transition: background 0.2s;
    border: 1px solid transparent;
}
.btn-phone { background: #238636; } /* Verde Llamada */
.btn-whatsapp { background: #25D366; } /* Verde WhatsApp */
.btn-share { background: #8e44ad; color: white; border: 1px solid transparent; } /* Morado Compartir */
.btn-share:hover { background: #9b59b6; }
.btn-email { background: transparent; border-color: var(--border-color); color: var(--text-secondary); }
.btn-email:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* --- Barra Móvil Flotante --- */
.mobile-contact-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #161b22;
    border-top: 1px solid var(--border-color);
    padding: 12px;
    display: flex; gap: 10px; z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.mob-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 10px; border-radius: 6px; font-weight: 600; font-size: 0.9rem;
    color: white;
}
.mob-btn span { margin-left: 8px; }

/* --- Footer --- */
.main-footer {
    text-align: center; padding: 3rem 2rem; color: var(--text-secondary); 
    margin-top: 3rem;
}

/* --- Contenido Dossier --- */
.dossier-card {
    background: var(--bg-color); 
    border-radius: 12px;
}

.dossier-intro {
    font-size: 1.15rem; color: #d0d7de; margin-bottom: 3rem; 
    line-height: 1.7; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color);
}

.dossier-section { margin-bottom: 4rem; }
.dossier-section h2 { 
    font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-primary); 
    display: flex; align-items: center; gap: 10px;
}

.features-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem;
}

.feature-item {
    background: #161b22; padding: 1.5rem; 
    border-radius: 8px; border: 1px solid var(--border-color);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 1rem; display: block; }
.feature-item h3 { color: var(--text-primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.feature-item p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

/* --- Galería (Arreglada 3 columnas) --- */
.tech-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.spec-badge {
    padding: 0.4rem 1rem;
    background: rgba(47, 129, 247, 0.1);
    color: var(--accent);
    border: 1px solid rgba(47, 129, 247, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.screenshot-gallery {
    display: grid;
    /* Forzar 3 columnas en escritorio, 2 en tablet, 1 en móvil */
    grid-template-columns: repeat(3, 1fr); /* 3 columnas fijas en PC */
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    aspect-ratio: 16/9;
    background: #0d1117;
    border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color);
    cursor: pointer; transition: opacity 0.2s;
}
.screenshot-item:hover { opacity: 0.8; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
    .screenshot-gallery { grid-template-columns: repeat(2, 1fr); } /* 2 en móvil */
    .dossier-card { padding: 0; border: none; }
    .features-grid { grid-template-columns: 1fr; }
}

/* --- Hero --- */
.product-hero { 
    height: 350px; 
    display: flex; align-items: center; justify-content: center; 
    background-size: cover; background-position: center; position: relative; 
}
.product-hero h1 { 
    font-size: 3rem; color: white; text-shadow: 0 5px 20px rgba(0,0,0,0.8); z-index: 2; text-align: center;
}
.product-hero::after { 
    content: ''; position: absolute; inset: 0; 
    background: linear-gradient(to bottom, rgba(11,13,17,0.3), rgba(11,13,17,1)); 
}

/* --- Lightbox --- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: none; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-content { max-width: 95%; max-height: 85vh; border-radius: 4px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; font-size: 3rem; color: white; cursor: pointer; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); padding: 20px; color: white; font-size: 3rem; cursor: pointer; user-select: none; }
.lightbox-prev { left: 10px; } .lightbox-next { right: 10px; }

/* --- Categorías y Bloques --- */
.category-section { 
    margin-bottom: 6rem; /* Mucho más espacio entre bloques */
}

.category-title {
    font-size: 1.1rem; /* Título más pequeño y elegante */
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-color), transparent);
}

/* --- Grid de Productos --- */
.grid-compact { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 1.5rem; 
}

@media (min-width: 1200px) {
    .grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Cards Portada (Rediseño Elegante) --- */
.card { 
    background: linear-gradient(145deg, #1c2128, #161b22); 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.card:hover { 
    transform: translateY(-4px); 
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.card-image { 
    height: 180px; 
    overflow: hidden; 
    border-bottom: 1px solid var(--border-color);
}

.card-img-real { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 1s ease;
    opacity: 0.9;
}

.card:hover .card-img-real {
    transform: scale(1.1);
    opacity: 1;
}

.card-content { 
    padding: 2rem; /* Más aire interno */
}

.header-row .tag { 
    font-size: 0.65rem; 
    color: var(--accent); 
    text-transform: uppercase; 
    font-weight: 800; 
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.card h3 { 
    margin: 0 0 0.8rem 0; 
    font-size: 1.4rem; 
    font-weight: 600;
    color: var(--text-primary);
}

.card p { 
    color: var(--text-secondary); 
    font-size: 0.95rem; 
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-action { 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: var(--text-primary);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.card:hover .card-action {
    opacity: 1;
    color: var(--accent);
}

.values-bar { display: flex; justify-content: center; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; text-align: center; }
.value-item h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.value-item p { font-size: 0.9rem; color: var(--text-secondary); }
.value-icon { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }

.back-nav{
	    padding: 10px;
}

.product-hero { 
	background-image: linear-gradient(rgba(17,153,142,0.85), rgba(11,13,17,1)), url('../assets/img/formando-hero.jpg');
    float: left;
    width: 100%;
	clear:both;
 }