/* ==========================================================================
   ESTILOS RED ECHOLINK CHILE
   Colores institucionales:
   - Azul Marino: #002B7F
   - Rojo Patrio: #D62828
   ========================================================================== */

:root {
    --primary-blue: #002B7F;
    --dark-blue: #001C55;
    --accent-red: #D62828;
    --accent-red-hover: #B81D1D;
    --bg-light: #F4F6F9;
    --white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-muted: #4A5568;
    --border-color: #E2E8F0;
}

/* Reset y Bases */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Barra Superior */
.top-bar {
    background-color: var(--dark-blue);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 3px solid var(--accent-red);
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slogan-tag em {
    color: #93C5FD;
}

.social-links {
    display: flex;
    gap: 12px;
}

.top-social a {
    color: var(--white);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.top-social a:hover {
    opacity: 1;
}

/* Encabezado con Logo */
.main-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 18px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background-color: var(--white);
}

.brand-text h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.9rem;
    color: #BFDBFE;
}

/* Navegación Principal y Control Micrófono */
.main-nav {
    background-color: var(--dark-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-container ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-container a {
    display: block;
    padding: 16px 16px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.nav-container a:hover,
.nav-container a.active,
.nav-container a.active-scroll {
    background-color: var(--accent-red);
    color: var(--white);
}

/* Estilos del Botón de Micrófono en el Menú */
.nav-control-mic {
    display: flex;
    align-items: center;
}

.mic-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.mic-btn.off {
    background-color: #334155;
    color: #94A3B8;
    border-color: #475569;
}

.mic-btn.off:hover {
    background-color: #475569;
    color: #FFFFFF;
}

.mic-btn.on {
    background-color: #15803D;
    color: #FFFFFF;
    border-color: #22C55E;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.mic-btn.on:hover {
    background-color: #166534;
}

.mic-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.mic-btn.off .mic-led {
    background-color: #64748B;
}

.mic-btn.on .mic-led {
    background-color: #4ADE80;
    box-shadow: 0 0 8px #4ADE80;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Hero / Banner Destacado */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 65px 0;
    text-align: center;
    border-bottom: 4px solid var(--accent-red);
}

.hero-content {
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    background-color: var(--white);
    color: var(--dark-blue);
    border: 1px solid var(--white);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 1.1rem;
    color: #E0E7FF;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Botones Generales con Efecto Hover / Aumento */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-primary {
    background-color: var(--accent-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Secciones generales */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.title-line {
    width: 60px;
    height: 3px;
    background-color: var(--accent-red);
    margin: 12px auto 0 auto;
}

/* Grilla de 3 columnas */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Tarjetas de Servicios e Infraestructura (Efecto Elevación / Aumento) */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 25px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 43, 127, 0.12);
    border-color: #CBD5E1;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--primary-blue);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    transition: background-color 0.3s ease;
}

.card:hover .card-accent {
    background-color: var(--accent-red);
}

.card h3 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tabla de Nodos con Elevación y Sombra al Hover */
.table-responsive {
    overflow-x: auto;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.table-responsive:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.nodes-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.nodes-table th, 
.nodes-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.nodes-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 500;
}

.nodes-table tr:last-child td {
    border-bottom: none;
}

.nodes-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.nodes-table tbody tr {
    transition: background-color 0.2s ease;
}

.nodes-table tbody tr:hover {
    background-color: #E2E8F0;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-online {
    background-color: #DCFCE7;
    color: #15803D;
}

.badge-maintenance {
    background-color: #FEF3C7;
    color: #B45309;
}

/* Contenedor EchoLink Web App (Iframe con Elevación / Aumento) */
.webapp-container {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.webapp-container:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow: 0 14px 28px rgba(0, 43, 127, 0.15);
}

.webapp-header {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-red);
}

.webapp-status {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #22C55E;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #22C55E;
}

.btn-external {
    color: #93C5FD;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-external:hover {
    color: var(--white);
    text-decoration: underline;
    transform: scale(1.05);
}

.iframe-wrapper {
    width: 100%;
    height: 650px;
    background-color: #000;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.webapp-note {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Tarjetas de Descargas (Efecto Elevación / Aumento) */
.download-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.download-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 43, 127, 0.12);
    border-color: #CBD5E1;
}

.download-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.download-card:hover .download-icon {
    transform: scale(1.15);
}

.download-card h3 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.download-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.btn-download {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    width: 100%;
}

.btn-download:hover {
    background-color: var(--dark-blue);
}

/* Cuadro de Información Normativa (Efecto Elevación) */
.info-box {
    background-color: #EFF6FF;
    border-left: 4px solid var(--accent-red);
    padding: 25px;
    border-radius: 0 6px 6px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 43, 127, 0.1);
}

.info-content h4 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.info-content p {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.styled-list {
    margin-left: 20px;
    color: var(--text-muted);
}

.styled-list li {
    margin-bottom: 8px;
}

/* Formulario de Contacto (Efecto Elevación) */
.contact-wrapper {
    max-width: 750px;
    margin: 0 auto;
    background: var(--white);
    padding: 35px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.1);
}

.btn-submit {
    background-color: var(--accent-red);
    color: var(--white);
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.btn-submit:hover {
    background-color: var(--accent-red-hover);
}

/* Pie de Página */
.footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding-top: 50px;
    border-top: 4px solid var(--accent-red);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-info h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.footer-info p {
    color: #93C5FD;
    font-size: 0.9rem;
    max-width: 500px;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #FFFFFF;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.15);
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.whatsapp {
    background-color: #25D366;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #E0E7FF;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
    transform: translateX(4px);
}

.footer-bottom {
    background-color: #001233;
    padding: 18px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Adaptabilidad Móvil */
@media (max-width: 900px) {
    .nav-container {
        flex-direction: column;
        padding: 10px 20px;
        gap: 10px;
    }

    .nav-control-mic {
        margin-bottom: 6px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .brand {
        flex-direction: column;
    }
    
    .nav-container ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    .nav-container a {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .iframe-wrapper {
        height: 480px;
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}