/* --- Estilos Generales y de Fondo --- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif; /* Fuente legible para el texto general */
    background-image: url('fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* El fondo no se mueve al hacer scroll */
    color: #333;
    text-align: center;
}

/* --- Contenedor Principal --- */
.main-content {
    background-color: rgba(255, 255, 255, 0.9); /* Fondo blanco semitransparente para legibilidad */
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Cabecera --- */
.header {
    width: 100%;
}

.header img {
    width: 100%; /* La imagen se ajusta al ancho del contenedor */
    height: auto; /* Mantiene la proporción */
    display: block;
}

/* --- Título Principal --- */
h1 {
    font-family: 'Lilita One', cursive; /* Fuente temática y divertida */
    font-size: 2.8rem; /* Tamaño grande para llamar la atención */
    color: #E67E22; /* Color naranja cempasúchil */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
}

/* --- Bloque de Anuncio de AdSense --- */
.ad-container {
    margin: 20px auto;
    padding: 15px;
    border: 1px dashed #ccc;
    max-width: 100%;
}

.ad-label {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 10px;
}

/* --- Grilla del Abecedario (Responsive) --- */
.alphabet-grid {
    display: grid;
    /* 4 columnas en pantallas grandes */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Espacio entre las letras */
    padding: 20px 0;
    margin-bottom: 30px;
}

.alphabet-grid a {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #34495E; /* Color oscuro */
    color: white;
    font-family: 'Lilita One', cursive;
    font-size: 2.5rem;
    text-decoration: none;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alphabet-grid a:hover {
    background-color: #E74C3C; /* Color rojo al pasar el mouse */
    transform: scale(1.1); /* Efecto de zoom */
}

/* --- Contenido de Texto --- */
.text-content {
    text-align: left;
    line-height: 1.6;
    font-size: 1.1rem;
    padding: 0 15px;
    margin-bottom: 30px;
}

.text-content p:first-child {
    font-weight: bold;
    text-align: center;
    font-size: 1.3rem;
}

/* --- Botón de YouTube --- */
.youtube-button {
    display: inline-block;
    background-color: #E74C3C; /* Rojo */
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.youtube-button:hover {
    background-color: #C0392B; /* Rojo más oscuro */
}

/* --- Pie de Página --- */
.footer {
    background-color: #2C3E50; /* Color oscuro para el pie */
    color: white;
    padding: 20px;
    margin-top: 30px;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #F1C40F; /* Color amarillo para el enlace */
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- Media Queries para hacer la página RESPONSIVE --- */

/* Para tablets */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .alphabet-grid {
        /* 3 columnas en tablets */
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Para móviles */
@media (max-width: 480px) {
    .main-content {
        margin: 10px;
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .alphabet-grid {
        /* 2 columnas en móviles para mejor visualización */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .alphabet-grid a {
        font-size: 2rem;
        padding: 15px;
    }

    .text-content {
        font-size: 1rem;
    }
}