/*
Theme Name: tecnologia21
Theme URI: https://tecnologia21.cl
Author: tecnologia21
Author URI: https://tecnologia21.cl
Description: Tema corporativo para tecnologia21 y sus filiales techment y vxt. Diseño inspirado en Apple: minimalista, paralax enfatizado y selector de idioma integrado.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tecnologia21
Tags: corporate, minimal, bilingual, parallax
*/

/* ==========================================================================
   Estilo de Diseño V2: Alta Cohesión, Header Ampliado y Parallax Enfatizado
   ========================================================================== */

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

:root {
    --bg-light: #f5f5f7;
    --bg-white: #ffffff;
    --bg-dark: #000000;
    --bg-dark-gray: #1d1d1f;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-white: #f5f5f7;
    --accent-blue: #0071e3;
    --accent-purple: #864af9;
    --accent-green: #34c759;
    --accent-red: #ff3b30;
    --border-radius-smooth: 26px;
    --border-radius-card: 20px;
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-apple: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-text);
    background-color: var(--bg-light);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body { margin: 0; padding: 0; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.text-center { text-align: center; }

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.8px;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.25s var(--transition-apple);
}
.nav-links a:hover { opacity: 1; }

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-text);
    padding: 2px 4px;
    transition: color 0.2s;
}
.lang-btn.active, .lang-btn:hover { color: var(--text-primary); }
.divider { opacity: 0.3; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.25s var(--transition-apple);
}

/* ==========================================================================
   Hero Parallax (front-page)
   ========================================================================== */
.parallax-hero {
    position: relative;
    height: 85vh;
    min-height: 580px;
    background-image: url('img/mundo_fondo.avif');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-hero::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.82) 0%, rgba(245,245,247,0.95) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.hero-tagline {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.45;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px auto;
}

/* Hero páginas internas (techment / vxt) */
.hero-section {
    padding-top: 140px;
    padding-bottom: 100px;
    background-color: var(--bg-white);
    text-align: center;
}
.hero-section .hero-tagline { color: var(--accent-blue); font-size: 14px; }
.hero-section.vxt-hero .hero-tagline { color: var(--accent-purple); }
.hero-section .hero-title { font-size: 64px; letter-spacing: -2.5px; line-height: 1.1; }

/* ==========================================================================
   Botones
   ========================================================================== */
.btn-primary {
    display: inline-block;
    background-color: var(--text-primary);
    color: var(--bg-white);
    padding: 14px 32px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.25s;
}
.btn-primary:hover { background-color: #000000; transform: scale(1.02); }

.btn-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.vxt-page .btn-arrow { color: var(--accent-purple); }
.btn-arrow .arrow { margin-left: 6px; transition: transform 0.2s var(--transition-apple); }
.btn-arrow:hover .arrow { transform: translateX(4px); }

/* ==========================================================================
   Secciones textuales
   ========================================================================== */
.intro-section { padding: 120px 0; background-color: var(--bg-white); }
.section-title-large { font-family: var(--font-display); font-size: 46px; font-weight: 700; letter-spacing: -1.5px; margin-bottom: 24px; line-height: 1.15; }
.lead-text { font-size: 22px; line-height: 1.6; color: var(--text-secondary); max-width: 880px; margin: 0 auto; }

.section-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.section-subtext { font-size: 36px; font-family: var(--font-display); font-weight: 700; margin-bottom: 56px; letter-spacing: -0.8px; }
.section-title { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -1.2px; margin-bottom: 60px; }
.section-title-medium { font-family: var(--font-display); font-size: 38px; font-weight: 700; margin-bottom: 44px; letter-spacing: -0.8px; }

/* ==========================================================================
   Ecosistema de empresas (front-page)
   ========================================================================== */
.companies-section { padding: 120px 0; background-color: var(--bg-light); }

.companies-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 32px 0;
}

.company-card {
    display: table-cell;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-smooth);
    vertical-align: top;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.01);
    transition: transform 0.4s var(--transition-apple), box-shadow 0.4s var(--transition-apple);
}
.company-card:hover { transform: translateY(-6px); box-shadow: 0 40px 90px rgba(0,0,0,0.05); }

.card-image-placeholder {
    height: 270px;
    background: linear-gradient(135deg, #e5e5ea 0%, #c7c7cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #48484a;
    font-size: 14px;
    font-weight: 500;
}
.card-image-placeholder.dark-placeholder { background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%); color: #d1d1d6; }

.company-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
}

.card-content { padding: 40px; display: flex; flex-direction: column; min-height: 300px; }
.company-category { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent-blue); margin-bottom: 10px; }
.company-name { font-family: var(--font-display); font-size: 36px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.8px; }
.company-description { font-size: 16px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 32px; }

/* ==========================================================================
   Parallax oscuro intermedio
   ========================================================================== */
.parallax-section-dark {
    position: relative;
    padding: 140px 0;
    background-image: url('img/chip_fondo.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-white);
    text-align: center;
}
.parallax-section-dark::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0, 0, 0, 0.76);
    z-index: 1;
}
.dark-content-wrapper { position: relative; z-index: 2; }
.parallax-dark-title { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -1.2px; margin-bottom: 20px; }
.parallax-dark-text { font-size: 21px; color: #d1d1d6; max-width: 720px; margin: 0 auto; line-height: 1.5; }

/* ==========================================================================
   Carruseles
   ========================================================================== */
.carousel-section { padding: 120px 0; background-color: var(--bg-white); overflow: hidden; }
.carousel-section.grey-bg { background-color: var(--bg-light); }

.carousel-wrapper { position: relative; width: 100%; }
.carousel-track { display: flex; transition: transform 0.6s var(--transition-apple); width: 100%; }

/* CORRECCIÓN: Definimos ancho exacto e impedimos que flexbox colapse tus tarjetas .carousel-item */
.carousel-slide, .carousel-track .carousel-item { flex: 0 0 50%; width: 50%; flex-shrink: 0; padding: 0 16px; box-sizing: border-box; }
.carousel-slide-full { flex: 0 0 100%; width: 100%; flex-shrink: 0; padding: 0 16px; }

.project-card { background: var(--bg-light); border-radius: var(--border-radius-card); overflow: hidden; }
.grey-bg .project-card { background: var(--bg-white); }
.project-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.project-info { padding: 36px; }
.project-info h4 { font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.project-info p { font-size: 15px; color: var(--text-secondary); line-height: 1.55; }

.why-us-card { background: var(--bg-white); padding: 64px; border-radius: var(--border-radius-smooth); text-align: center; max-width: 800px; margin: 0 auto; }
.why-icon { font-size: 52px; margin-bottom: 20px; }
.why-us-card h4 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.why-us-card p { font-size: 17px; color: var(--text-secondary); line-height: 1.65; }

.carousel-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.carousel-btn { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.05); font-size: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.06); transition: transform 0.2s; }
.carousel-btn:hover { transform: scale(1.05); background-color: #ffffff; }

.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 36px; }
.carousel-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: #d1d1d6; cursor: pointer; }
.carousel-dots .dot.active { background: var(--text-primary); }

/* ==========================================================================
   Lineup (techment / vxt)
   ========================================================================== */
.lineup-section { padding: 100px 0; background-color: var(--bg-light); }
.lineup-container { display: flex; flex-wrap: wrap; gap: 32px; }
.lineup-card { flex: 1 1 calc(50% - 16px); background-color: var(--bg-white); border-radius: var(--border-radius-smooth); padding: 48px; box-shadow: 0 4px 20px rgba(0,0,0,0.01); display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; }
.card-meta { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; }
.card-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.5px; }
.card-desc { font-size: 16px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 32px; }

.img-placeholder-fluid { width: 100%; object-fit: cover; display: block; }
.hero-img-fluid { height: 400px; border-radius: var(--border-radius-smooth); }
.card-img-fluid { height: 180px; margin-bottom: 24px; border-radius: var(--border-radius-card); }

/* ==========================================================================
   Análisis (pros / contras)
   ========================================================================== */
.analysis-section { padding: 120px 0; background-color: var(--bg-white); }
.analysis-split { display: flex; gap: 48px; margin-top: 40px; margin-bottom: 60px; }
.analysis-column { flex: 1; background-color: var(--bg-light); border-radius: var(--border-radius-smooth); padding: 48px; }
.analysis-column.positive { border-top: 4px solid var(--accent-green); }
.analysis-column.negative { border-top: 4px solid var(--accent-red); }
.column-header { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.analysis-list { list-style: none; }
.analysis-item { margin-bottom: 24px; padding-left: 28px; position: relative; font-size: 15px; line-height: 1.5; }
.analysis-item strong { color: var(--text-primary); display: block; margin-bottom: 4px; }
.analysis-item p { color: var(--text-secondary); }
.positive .analysis-item::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent-green); font-weight: 700; font-size: 18px; }
.negative .analysis-item::before { content: "✕"; position: absolute; left: 0; top: 2px; color: var(--accent-red); font-weight: 700; font-size: 14px; }

/* VXT usa emojis en lugar de ✓/✕ */
.vxt-page .positive .analysis-item::before { content: "🛡️"; font-size: 16px; }
.vxt-page .negative .analysis-item::before { content: "💥"; font-size: 14px; }

.analysis-category-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-top: 30px; margin-bottom: 10px; letter-spacing: -0.5px; color: var(--text-primary); }

/* ==========================================================================
   Specs
   ========================================================================== */
.specs-section { padding: 100px 0; background-color: var(--bg-light); }
.specs-table { width: 100%; margin-top: 48px; }
.specs-row { display: flex; border-bottom: 1px solid rgba(0,0,0,0.08); padding: 24px 0; }
.specs-label { flex: 0 0 300px; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text-primary); }
.specs-value { flex: 1; font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

/* ==========================================================================
   Formulario de contacto
   ========================================================================== */
.contact-section { padding: 120px 0; background-color: var(--bg-white); }
.contact-wrapper { max-width: 680px; margin: 0 auto; }
.contact-form { margin-top: 48px; }
.form-group { margin-bottom: 24px; }
.form-input { width: 100%; padding: 18px 24px; border-radius: 16px; border: 1px solid rgba(0,0,0,0.12); background-color: #fafafa; font-family: var(--font-text); font-size: 15px; transition: all 0.2s; outline: none; }
.form-input:focus { border-color: var(--accent-blue); background-color: var(--bg-white); box-shadow: 0 0 0 4px rgba(0,113,227,0.1); }
.vxt-page .form-input:focus { border-color: var(--accent-purple); box-shadow: 0 0 0 4px rgba(134,74,249,0.1); }
textarea.form-input { height: 160px; resize: vertical; }

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer { background: var(--bg-dark-gray); color: #86868b; padding: 80px 0; font-size: 13px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer-brand h3, .footer-links h4 { color: var(--text-white); font-size: 18px; margin-bottom: 16px; }
.footer-links a { display: block; color: #86868b; text-decoration: none; margin-bottom: 10px; }
.footer-links a:hover { color: var(--text-white); }
.footer-meta { width: 100%; border-top: 1px solid #424245; padding-top: 32px; margin-top: 32px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .main-header { height: 56px; }
    .logo { font-size: 18px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.99);
        flex-direction: column;
        padding: 32px 24px;
        gap: 20px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .nav-links.active { display: flex; }
    .mobile-menu-toggle { display: flex; }
    .mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-toggle.active span:nth-child(2) { transform: rotate(-45deg) translate(1px, -2px); }

    .parallax-hero, .parallax-section-dark { background-attachment: scroll; }

    .hero-title { font-size: 46px; letter-spacing: -1.8px; }
    .hero-section .hero-title { font-size: 42px; letter-spacing: -1.5px; }
    .hero-subtitle { font-size: 19px; }
    .section-title-large { font-size: 32px; }
    .lead-text { font-size: 18px; }

    .companies-grid { display: block; }
    .company-card { display: block; width: 100%; margin-bottom: 32px; }

    /* CORRECCIÓN: Ajuste responsivo para pantallas móviles */
    .carousel-slide, .carousel-track .carousel-item { flex: 0 0 100%; width: 100%; }
    .why-us-card { padding: 40px 24px; }
    .carousel-nav { display: none; }

    .lineup-card { flex: 0 0 100%; }
    .analysis-split { flex-direction: column; gap: 24px; }
    .specs-row { flex-direction: column; gap: 8px; }
    .specs-label { flex: none; }
}