/* Reset y tipografía base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%; /* 16px por defecto, adaptable */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Evita cambios de tamaño en iOS */
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f3f3f3;
    color: #000;
    line-height: 1.5;
    font-size: 1rem; /* 16px base */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}


/* Contenedor flexible base */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ========================= */
/* 1. CARRUSEL               */
/* ========================= */
.carousel-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Mantiene proporción en todos los dispositivos */
    background-color: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    image-rendering: -webkit-optimize-contrast;
}

.carousel img.active {
    opacity: 1;
    z-index: 1;
}

.dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #ffffff;
}
@media (max-width: 768px) {
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .dot {
        width: 8px;
        height: 8px;
    }

    .dots {
        bottom: 0.8rem;
        gap: 0.4rem;
    }
}
/* ========================= */
/* 2. ANUNCIOS               */
/* ========================= */
.anuncios-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.anuncio-card {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
    height: 100%;
}

.anuncio-card:hover {
    transform: translateY(-4px);
}

.anuncio-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.anuncio-info {
    padding: 1rem;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.anuncio-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #222;
}

.anuncio-info p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.button-link button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s ease;
}

.button-link button:hover {
    background-color: #45A049;
}

/* ========================= */
/* 3. NOTICIAS               */
/* ========================= */
.noticias-section {
    width: 100%;
    margin-top: 4rem;
    padding: 3rem 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.noticias-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.noticias-section > * {
    position: relative;
    z-index: 1;
}

.noticias-titulo {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
}

.noticias-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.noticia-card-link {
    width: 300px;
    max-width: 90vw;
    background-color: #ffffff;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.noticia-card-link:hover {
    transform: translateY(-5px);
}

.noticia-card-horizontal img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.noticia-contenido {
    padding: 1rem;
    background-color: #fff;
    height: auto;
    text-align: left;
}

.noticia-fecha {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.4rem;
}

.noticia-titulo {
    font-size: 1rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 0.5rem;
}

.noticia-resumen {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

/* ========================= */
/* 4. VIDEO                  */
/* ========================= */
.video-container {
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ========================= */
/* 5. BOTONES FLOTANTES      */
/* ========================= */
/* --- Botones flotantes en pantallas grandes --- */
.button-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 1rem 1rem 0 0 !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
}
.button-with-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circle-button img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease-in-out;
}

.circle-button img:hover {
    transform: scale(1.1);
}

.button-with-text p {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    color: #222;
    white-space: nowrap; /* evita que el texto se rompa en varias líneas */
}

/* Opcional: reducir tamaño en pantallas muy pequeñas */
@media screen and (max-width: 480px) {
    .circle-button img {
        width: 36px;
        height: 36px;
    }

    .button-with-text p {
        font-size: 0.65rem;
    }
}
