/* internet/css/main.css - Sistema de diseño del Portal ISP iTeck */

:root {
    /* Tema Claro */
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-border: #e2e8f0;
    --light-text: #0f172a;
    --light-text-muted: #64748b;
    
    /* Tema Oscuro (Defecto) */
    --dark-bg: #090e1a;
    --dark-surface: #111827;
    --dark-border: #1f2937;
    --dark-text: #f9fafb;
    --dark-text-muted: #9ca3af;

    /* Colores de Marca */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clases de Tema */
body.theme-light {
    --bg: var(--light-bg);
    --surface: var(--light-surface);
    --border: var(--light-border);
    --text: var(--light-text);
    --text-muted: var(--light-text-muted);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

body.theme-dark {
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --border: var(--dark-border);
    --text: var(--dark-text);
    --text-muted: var(--dark-text-muted);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Accesibilidad: Skip Link y Focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}
*:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 4px;
}

/* Header & Nav */
.main-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-tag {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--primary);
    font-weight: 700;
    margin-top: -3px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text);
}

.nav-btn-alt {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-btn-alt:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 8px;
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.admin-login-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.admin-login-link:hover {
    border-color: var(--text);
    color: var(--text);
}

/* Hero Section */
.hero {
    padding: 5rem 1.5rem;
    text-align: center;
    background: radial-gradient(circle at top, var(--primary-glow) 0%, transparent 60%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* General Layout sections */
.section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
}

/* Packages and Tables (Requisitos_PáginaWeb Point 5) */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.package-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.package-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.package-header {
    margin-bottom: 1.5rem;
}

.package-type {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.package-card h3 {
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}

.package-speed {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.package-speed span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.package-price {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.package-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
}

.package-details {
    list-style: none;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.package-details li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.package-details svg {
    color: var(--success);
    width: 16px;
    height: 16px;
}

.tariff-folio {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Interactive Table for tariffs transparency */
.table-container {
    overflow-x: auto;
    margin-top: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.tariff-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.tariff-table th, .tariff-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tariff-table th {
    background-color: rgba(255, 255, 255, 0.02);
    font-weight: 600;
}

.tariff-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Link IFT Visor Legend (Requisitos_PáginaWeb Point 6) */
.ift-link-box {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.ift-link-box a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

/* Interactive SVG Map (Requisitos_PáginaWeb Point 8) */
.map-container {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-svg {
    max-width: 600px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.map-state {
    fill: rgba(59, 130, 246, 0.1);
    stroke: var(--border);
    stroke-width: 1.5;
    transition: fill 0.3s ease;
}

.map-state.active {
    fill: rgba(59, 130, 246, 0.35);
    stroke: var(--primary);
    cursor: pointer;
}

.map-state.active:hover {
    fill: rgba(59, 130, 246, 0.55);
}

.map-pin {
    fill: var(--secondary);
    stroke: #fff;
    stroke-width: 1;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.coverage-details {
    margin-top: 1.5rem;
    text-align: center;
}

/* Forms */
.form-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.btn-submit:hover {
    background-color: #2563eb;
}

/* Legal content pages */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3.5rem;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-glow);
    padding-bottom: 0.5rem;
}

.legal-section p, .legal-section li {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* Footer & Security Justice box */
.main-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    margin-top: auto;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--primary);
}

.security-justice-box {
    max-width: 1200px;
    margin: 0 auto 3rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 2rem;
}

.security-justice-box h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--error);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.security-justice-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.web-credits {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Responsiveness */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    .nav-link {
        font-size: 1rem;
        padding: 0.3rem 0;
    }
    .nav-btn-alt {
        width: 80%;
        text-align: center;
    }
    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
        align-items: center;
        margin-top: 0.5rem;
    }
    .portal-clientes-btn {
        width: 80% !important;
        justify-content: center;
        margin-right: 0 !important;
    }
    .admin-login-link {
        width: 80%;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero-ctas {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    .hero-ctas .btn-primary, .hero-ctas .btn-secondary {
        width: 90%;
        text-align: center;
        justify-content: center;
    }
    .legal-container {
        padding: 1.5rem;
    }
}
