/* =========== ESTILO GENETAL ============ */
body {
    font-family: "Georgia", "Times New Roman", serif;
    background-color: #f4f6f9;
    margin: 20px;
    padding: 20px;
}

/* =========== TITULOS ============ */
h1 {
    text-align: center;
    color: #1f4e79;
    margin-bottom: 30px;
    font-size: 42px;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 12px;
}

h1::after {
    content: "";
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1f4e79, #5fa0d8);
    display: block;
    margin: 10px auto 0;
    border-radius: 4px;
}

h2 {
    font-size: 26px;
    color: #1f4e79;
    margin-top: 40px;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 5px solid #1f4e79;
    background: linear-gradient(to right, rgba(31,78,121,0.08), transparent);
}

h3 {
    font-size: 20px;
    color: #163b5f;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* =========== TEXTO ============ */
p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    max-width: 900px;
}

/* =========== LISTAS ============ */
ul {
    list-style: none;
    padding-left: 0;
    max-width: 850px;
    margin: 12px 0 25px;
}

ul li {
    background: #ffffff;
    margin: 8px 0;
    padding: 10px 14px;
    border-left: 4px solid #1f4e79;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-radius: 6px;
    transition: transform 0.2s ease, background 0.2s ease;
}

ul li:hover {
    background: #e6eef6;
    transform: translateX(5px);
}

/* =========== TABLAS ============ */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

caption {
    caption-side: top;
    font-size: 27px;
    font-weight: bold;
    color: #1f4e79;
    margin-top: 20px; /* espacio con el texto de arriba */
    margin-bottom: 16px;  /* espacio con la tabla */    
    padding: 6px 0;    
    text-align: center;
    letter-spacing: 0.3px;
}


th, td {
    border: 1px solid #ccc;
    padding: 14px;
    text-align: center;
    vertical-align: top;
}

td {
    line-height: 1.5;
}


th {
    background-color: #1f4e79;
    color: white;
    font-size: 16px;
}

tbody tr:nth-child(even) {
    background-color: #f0f4f8;
}

tbody tr:hover {
    background-color:  #cfdfee; /* azul intermedio */
}

/* ===== RESALTAR NOMBRE DE PAÍSES ===== */
tbody td:first-child {
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.3px;
}

/* =========== BOTONES DE LINKS ============ */
td a {
    display: inline-block;
    margin: 6px 4px;
    padding: 6px 10px;
    width: fit-content;
    background-color: #dbe7f3; /* azul suave intermedio */
    border: 1px solid #b6cce3; /* borde suave */
    color: #1f4e79;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
}

td a:hover {
    background-color: #1f4e79;
    color: white;
    transform: translateY(-2px);
}

/* =========== IMAGENES ============ */
td img {
    width: 130px;
    height: 85px;
    object-fit: cover;
    margin: 6px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

td img:hover {
    transform: scale(1.1);
}

/* =========== LINKS GENERALES ============ */
a {
    color: #1f4e79;
    text-decoration: none;   /* quita la línea */
    font-weight: bold;
}

a:hover {
    text-decoration: none;   /* evita que vuelva */
    color: #163b5f;          /* solo cambia el color */
}

/* ===== FUENTE ===== */
.fuente {
    font-size: 14px;
    color: #555;
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 25px;
    max-width: 1000px;
}

.fuente a {
    color: #1f4e79;
    font-weight: 600;
}

.fuente a:hover {
    color: #163b5f;
    text-decoration: none;
}


/* =========== RESPONSIVE DESIGN ============ */

/* ----------- TABLETS (pantallas medianas) ----------- */
@media (max-width: 992px) {

    body {
        margin: 12px;
        padding: 12px;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 22px;
    }

    p {
        font-size: 14px;
        max-width: 100%;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }

    td img {
        width: 110px;
        height: 75px;
    }
}


/* ----------- TELÉFONOS ----------- */
@media (max-width: 576px) {

    body {
        margin: 8px;
        padding: 8px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 19px;
        padding-left: 8px;
    }

    p {
        font-size: 13px;
        line-height: 1.5;
    }

    caption {
        font-size: 20px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

    td a {
        font-size: 11px;
        padding: 5px 8px;
    }

    td img {
        width: 90px;
        height: 65px;
    }
}


/* ----------- PANTALLAS GRANDES (PC) ----------- */
@media (min-width: 1400px) {

    body {
        max-width: 1300px;
        margin: auto;
    }

    p, ul {
        max-width: 1100px;
    }

    h1 {
        font-size: 46px;
    }

    h2 {
        font-size: 30px;
    }

    table {
        font-size: 16px;
    }

    td img {
        width: 150px;
        height: 100px;
    }
}

/* ===== CONTENEDOR VISUAL PARA TEXTO EN PC ===== */
@media (min-width: 1200px) {

    h2,
    h3,
    p,
    ul {
        margin-left: auto;
        margin-right: auto;
    }

    p, ul {
        max-width: 1000px;
    }

    h2, h3 {
        max-width: 1100px;
    }
}
