/* =========================================================
   CONFIGURACIÓN GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #f4f7fb;
    color: #0f172a;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    line-height: 1.5;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}


/* =========================================================
   CABECERA
   ========================================================= */

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 36px;
    line-height: 1.2;
    color: #0f172a;
}

.page-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}


/* =========================================================
   NAVEGACIÓN ENTRE HERRAMIENTAS
   ========================================================= */

.tools-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.tools-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.tools-navigation a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.tools-navigation a:active {
    transform: translateY(1px);
}

.tools-navigation a[aria-current="page"] {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.05);
}

.card h2 {
    margin: 0 0 6px;
    font-size: 21px;
    color: #0f172a;
}

.section-description {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 14px;
}


/* =========================================================
   FORMULARIO
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
}


/* =========================================================
   BOTÓN CALCULAR
   ========================================================= */

.calculate-button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.calculate-button:hover {
    background: #1d4ed8;
}

.calculate-button:active {
    transform: translateY(1px);
}


/* =========================================================
   ERRORES
   ========================================================= */

.error-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
}


/* =========================================================
   EJEMPLOS
   ========================================================= */

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.example-button {
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.example-button:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.example-button:active {
    transform: translateY(1px);
}


/* =========================================================
   RESULTADOS
   ========================================================= */

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.result-item {
    min-height: 70px;
    padding: 12px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
}

.result-item strong {
    color: #0f172a;
    font-size: 14px;
    word-break: break-word;
}


/* =========================================================
   NOTAS ESPECIALES /31 Y /32
   ========================================================= */

.special-network-note {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.special-network-note strong {
    color: #0f172a;
}


/* =========================================================
   INFORMACIÓN SEO
   ========================================================= */

.information-card h2 {
    margin-top: 24px;
}

.information-card h2:first-child {
    margin-top: 0;
}

.information-card p {
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
}

.information-card ul {
    margin: 0 0 20px;
    padding-left: 22px;
    color: #475569;
    font-size: 14px;
}

.information-card li {
    margin-bottom: 7px;
}

.information-card strong {
    color: #0f172a;
}


/* =========================================================
   OTRAS HERRAMIENTAS
   ========================================================= */

.related-tools {
    margin-bottom: 22px;
}

.related-tool-link {
    display: block;
    padding: 14px 16px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.related-tool-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    text-align: center;
    color: #64748b;
    font-size: 12px;
    padding-top: 4px;
}

.footer p {
    margin: 0;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 650px) {

    .container {
        padding: 18px 14px 30px;
    }

    .page-header h1 {
        font-size: 29px;
    }

    .page-header p {
        font-size: 14px;
    }

    .card {
        padding: 20px;
        border-radius: 12px;
    }

    .tools-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tools-navigation a {
        width: 100%;
        text-align: center;
    }

    .examples-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .example-button {
        min-height: 50px;
    }
}


/* =========================================================
   PANTALLAS MUY PEQUEÑAS
   ========================================================= */

@media (max-width: 380px) {

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        padding: 16px;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .tools-navigation {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   NAVEGACIÓN PRINCIPAL
   ========================================================= */

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 14px;

    border: 1px solid #dbe3ec;
    border-radius: 8px;

    background: #ffffff;
    color: #2563eb;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.nav-button:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.nav-button:active {
    transform: translateY(1px);
}

.nav-button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.nav-button.active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}


@media (max-width: 650px) {

    .main-navigation {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
    }
}