/* ========================================
   Minia.cl — Portal Minero de Chile
   Modern Mining Theme
   ======================================== */

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2440;
    --accent: #d69e2e;
    --accent-light: #ecc94b;
    --accent-dark: #b7791f;
    --surface: #f7fafc;
    --surface-alt: #edf2f7;
    --text: #1a202c;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --success: #38a169;
    --danger: #e53e3e;
    --warning: #d69e2e;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.1);
    --shadow-xl: 0 10px 40px rgba(0,0,0,.15);
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

main {
    width: 100%;
    overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
    background: var(--primary-dark);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    transition: background var(--transition), box-shadow var(--transition), height var(--transition);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.navbar.scrolled {
    background: rgba(15, 36, 64, 0.95);
    box-shadow: 0 2px 16px rgba(0,0,0,.15);
    backdrop-filter: blur(8px);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    width: 100%;
    height: 100%;
}

.logo {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo i { color: var(--accent); font-size: 20px; }
.logo span { color: var(--accent); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    height: 100%;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    height: 44px;
}
.nav-link:hover { 
    color: #fff; 
    background: rgba(255,255,255,.1); 
}
.nav-link.active { 
    color: var(--accent); 
    background: rgba(214,158,46,.15);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 9px;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    height: 44px;
    justify-content: center;
}
.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ── Hero ── */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

/* ── Hero Video Background ── */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0.6;
    transform: scale(1.15);
}

.hero-home {
    padding: 160px 24px 100px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-page {
    padding: 140px 24px 70px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(214,158,46,.2);
    color: var(--accent-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(214,158,46,.3);
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(214,158,46,.4);
}
.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
    transform: translateY(-2px);
}
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-calc {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* ── App Promo Banner ── */
.app-promo-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--accent);
    border-bottom: 3px solid var(--accent);
}
.app-promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    pointer-events: none;
}
.app-promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}
.app-promo-icon {
    font-size: 64px;
    color: var(--accent);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-promo-text {
    flex: 1;
    color: #fff;
}
.app-promo-text h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.app-promo-text p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,.95);
    margin: 0;
}
.btn-app-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition);
    border: 2px solid var(--accent);
    flex-shrink: 0;
}
.btn-app-store:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214,158,46,.3);
}

/* ── Sections ── */
.section {
    padding: 80px 24px;
}
.section-alt {
    background: var(--surface-alt);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-tag {
    display: inline-block;
    background: rgba(26,54,93,.08);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.section-desc {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 700px;
    margin: 0 auto;
}

/* ── Two Column Layout ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.two-col > .col-text {
    grid-column: 1;
    grid-row: 1 / 3;
}
.two-col > .col-image {
    grid-column: 2;
    grid-row: 1;
}
.two-col > .col-stats {
    grid-column: 2;
    grid-row: 2;
}
.col-text p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.8;
}
.col-text strong { color: var(--text); }

.col-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(26,54,93,.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 18px;
}
.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Card Grids ── */
.card-grid, .features-grid {
    display: grid;
    gap: 20px;
}
.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ── Info Cards ── */
.info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.info-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}
.info-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.info-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}
.info-card ul {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-top: 8px;
    padding-left: 16px;
}
.card-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    background: rgba(214,158,46,.1);
    color: var(--accent-dark);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Image Styles ── */
.col-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.section-image {
    width: 100%;
    max-width: 100%;
    height: 350px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}
.section-image:hover {
    transform: scale(1.02);
}
.info-card-image {
    width: calc(100% + 64px);
    height: 220px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
    margin: -32px -28px 20px -28px;
    display: block;
}

/* ── Feature Cards (links) ── */
.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}
.feature-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}
.feature-arrow {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    transition: transform var(--transition);
}
.feature-link:hover .feature-arrow { transform: translateX(4px); }

/* ── Timeline ── */
.timeline {
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--primary));
    border-radius: 3px;
}
.timeline-item {
    position: relative;
    margin-bottom: 32px;
}
.timeline-icon {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 1;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow);
}
.timeline-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.timeline-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.timeline-content p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
}
.timeline-content ul {
    color: var(--text-muted);
    font-size: 14px;
    padding-left: 18px;
    margin-bottom: 8px;
}
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.timeline-tags span {
    padding: 3px 10px;
    background: rgba(26,54,93,.06);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Process Flow ── */
.process-flow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 20px 0;
}
.process-step {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 20px;
    min-width: 180px;
    flex: 1;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}
.process-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.process-step h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.process-step p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.process-arrow {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-size: 18px;
    padding-top: 40px;
    flex-shrink: 0;
}

/* ── Card detail list ── */
.card-detail-list {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}
.card-detail-list li {
    font-size: 13px;
    color: var(--text-muted);
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}
.card-detail-list li:last-child { border-bottom: none; }

.subsection-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Law Cards ── */
.law-grid {
    display: grid;
    gap: 20px;
}
.law-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}
.law-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.law-card-primary { border-left: 4px solid var(--accent); }
.law-card-highlight { border-left: 4px solid var(--primary); }

.law-header {
    padding: 24px 28px 0;
}
.law-type {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(26,54,93,.08);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.law-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.law-body {
    padding: 16px 28px 28px;
}
.law-body p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}
.law-body ul {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
    padding-left: 18px;
    margin-top: 8px;
}
.law-related {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.law-related span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Calculations ── */
.calc-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: start;
}
.calc-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.calc-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.calc-tab {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text-muted);
}
.calc-tab:hover { border-color: var(--primary); color: var(--primary); }
.calc-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.calc-tab-content { display: none; }
.calc-tab-content.active { display: block; }

.calc-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.formula-display {
    background: var(--primary-dark);
    color: var(--accent-light);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,54,93,.1);
}

.calc-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    text-align: center;
}
.result-value {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}
.result-class {
    font-size: 16px;
    margin-top: 4px;
    opacity: 0.9;
}
.result-detail {
    font-size: 13px;
    margin-top: 8px;
    opacity: 0.75;
}

.calc-info {
    position: sticky;
    top: 80px;
}
.calc-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}
.info-table th {
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.info-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.info-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.info-table tr:last-child td { border-bottom: none; }

.quality-very-poor { color: var(--danger); font-weight: 600; }
.quality-poor { color: #dd6b20; font-weight: 600; }
.quality-fair { color: var(--warning); font-weight: 600; }
.quality-good { color: var(--success); font-weight: 600; }
.quality-excellent { color: #276749; font-weight: 600; }

.formula-explain {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.formula-explain div {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.formula-explain div:last-child { border-bottom: none; }

.info-note {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: rgba(214,158,46,.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}
.info-note i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.info-note span { font-size: 13px; color: var(--text-muted); }

/* ── Info Box ── */
.info-box {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(26,54,93,.04), rgba(214,158,46,.06));
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 32px;
}
.info-box-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.info-box h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.info-box p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── CTA Section ── */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    text-align: center;
}
.cta-content h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
}
.cta-content p {
    font-size: 17px;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 28px;
}

/* ── About ── */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.about-content p {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ── Footer ── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.7);
    padding: 60px 24px 20px;
    margin-top: 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-col p {
    font-size: 14px;
    line-height: 1.7;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 8px;
}
.footer-col ul a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--accent); }

.footer-logo {
    height: 28px;
    width: auto;
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
    border-radius: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
}
.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,.4);
}

/* ── Calc Navigation ── */
.calc-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky;
    top: 72px;
    z-index: 50;
}
.calc-nav-item {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
    border: 2px solid transparent;
}
.calc-nav-item:hover {
    color: var(--primary);
    background: var(--surface-alt);
}
.calc-nav-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Calc form helpers ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.calc-section-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.calc-section-label:first-of-type {
    margin-top: 0;
}

/* ── Calc breakdown panel ── */
.calc-breakdown {
    margin-top: 20px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid var(--border);
}
.calc-breakdown h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row strong {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
    margin-left: 12px;
}
.breakdown-row.breakdown-highlight {
    color: var(--primary);
    font-weight: 600;
}
.breakdown-row.breakdown-highlight strong {
    color: var(--primary);
}
.breakdown-row.breakdown-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 2px solid var(--primary);
    border-bottom: none;
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}
.breakdown-row.breakdown-total strong {
    color: var(--accent-dark);
    font-size: 16px;
}

/* ── Legal Content ── */
.legal-content {
    max-width: 860px;
    margin: 0 auto;
}
.legal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 32px 0 16px;
    margin-top: 40px;
}
.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-light);
    margin: 20px 0 12px;
}
.legal-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}
.legal-content ul {
    color: var(--text-muted);
    margin-left: 24px;
    margin-bottom: 16px;
    line-height: 1.8;
}
.legal-content ul li {
    margin-bottom: 10px;
}
.legal-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
.legal-content a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ── Cookie Table ── */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.cookie-table thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}
.cookie-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}
.cookie-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}
.cookie-table tr:last-child td {
    border-bottom: none;
}
.cookie-table tr:hover {
    background: var(--surface-alt);
}

/* ── Cookie Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 20px;
    z-index: 998;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    display: none;
    opacity: 0;
    transform: translateY(100%);
    transition: all var(--transition);
}
.cookie-banner.show {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}
.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: 1fr auto;
    gap: 24px;
    display: grid;
    align-items: center;
}
.cookie-banner-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cookie-banner-text p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}
.cookie-banner-text a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}
.cookie-banner-text a:hover {
    text-decoration: underline;
}
.cookie-banner-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.btn-cookie-accept,
.btn-cookie-reject,
.btn-cookie-custom {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-cookie-accept {
    background: var(--accent);
    color: var(--primary-dark);
}
.btn-cookie-accept:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}
.btn-cookie-reject,
.btn-cookie-custom {
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
}
.btn-cookie-reject:hover,
.btn-cookie-custom:hover {
    background: rgba(255,255,255,.3);
    transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .calc-layout { grid-template-columns: 1fr; }
    .calc-info { position: static; }
    .two-col { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .calc-nav { position: static; }
}

@media (max-width: 768px) {
    .navbar-container { padding: 0 16px; }
    .logo { font-size: 18px; }
    .logo i { font-size: 16px; }
    .menu-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        max-height: calc(100vh - 72px);
        width: 280px;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        transition: right var(--transition);
        box-shadow: -5px 0 30px rgba(0,0,0,.3);
        z-index: 999;
        overflow-y: auto;
        bottom: 0;
    }
    .nav-menu.open { right: 0; }
    .nav-link { 
        padding: 14px 16px; 
        font-size: 15px; 
        border-bottom: none;
        border-radius: var(--radius-sm);
        height: auto;
    }
    .nav-link.active {
        border-bottom: none;
        padding-bottom: 14px;
    }

    .hero-home { padding: 130px 20px 70px; min-height: auto; }
    .hero-page { padding: 120px 20px 50px; }
    .hero-video { transform: scale(1.05); }

    .process-flow { flex-direction: column; align-items: stretch; }
    .process-arrow { display: none; }
    .process-step { min-width: unset; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .section { padding: 48px 16px; }
    .two-col { 
        grid-template-columns: 1fr; 
        gap: 24px; 
    }
    .two-col > .col-text {
        grid-column: 1;
        grid-row: auto;
    }
    .two-col > .col-image {
        grid-column: 1;
        grid-row: auto;
    }
    .two-col > .col-stats {
        grid-column: 1;
        grid-row: auto;
    }
    .section-image {
        height: 280px;
    }
    .col-stats { grid-template-columns: 1fr; }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .info-card-image {
        height: 240px;
    }
    .form-row { grid-template-columns: 1fr; gap: 8px; }

    /* Cookie banner responsive */
    .cookie-banner-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn-cookie-accept,
    .btn-cookie-reject,
    .btn-cookie-custom {
        width: 100%;
    }

    /* stat-number puede tener texto largo (ej: "Antofagasta") — evitar overflow */
    .stat-number { font-size: clamp(16px, 5vw, 28px); word-break: break-word; }

    /* card-grid-3 usa minmax(320px) — reducir para pantallas pequeñas */
    .card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

    /* calc-nav: scroll horizontal en lugar de wrapping en varias filas */
    .calc-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 4px;
    }
    .calc-nav-item { padding: 8px 12px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

    /* formula-display: overflow-x para fórmulas largas */
    .formula-display { font-size: 12px; overflow-x: auto; }

    /* Tablas con 3+ columnas: scroll horizontal contenido sin afectar el layout */
    .info-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .timeline { padding-left: 30px; }
    .timeline::before { left: 12px; }
    .timeline-icon {
        left: -30px;
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    /* App Promo Banner responsive */
    .app-promo-banner {
        padding: 32px 16px;
    }
    .app-promo-content {
        flex-direction: column;
        gap: 20px;
    }
    .app-promo-icon {
        font-size: 48px;
    }
    .app-promo-text h3 {
        font-size: 22px;
    }
    .app-promo-text p {
        font-size: 14px;
    }
    .btn-app-store {
        width: 100%;
    }
}

/* ── Extra small devices (< 360px) ── */
@media (max-width: 360px) {
    .nav-menu {
        width: 75vw;
        max-width: 280px;
    }
    .navbar-container { padding: 0 12px; }
    .logo { font-size: 16px; }
    .logo i { font-size: 14px; }
    .section-image {
        height: 220px;
    }
    .info-card-image {
        height: 200px;
    }
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
