* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
}

/* Header con imagen logo */
.header {
    flex: 0 0 auto;
    min-height: 300px;
    max-height: 40vh;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.menu-icon {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
}

.menu {
    margin-top: 10px;
    background-color: white;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    padding: 20px 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    min-width: 180px;
    font-size: 1.3rem;
    z-index: 200;
}

.menu a {
    text-decoration: none;
    color: #333;
    padding: 5px 0;
}

.menu a:hover {
    color: #007bff;
}

/* Ocultar el menú por defecto */
.hidden {
    display: none;
}

/* Main con reproductor */
.main-content {
    flex: 1 0 auto;
    min-height: 400px;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-content h1 {
    text-align: center;
    font-size: 2rem;
    color: black;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.radio-player {
    background-color: rgba(0, 0, 0, 0);
    padding: 20px 30px;
    border-radius: 10px;
    color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

.radio-info {
    display: flex;
    align-items: center;
}

.radio-info img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 15px;
}

.radio-controls button {
    background: linear-gradient(135deg, #4295fb, #64dd17);
    border: none;
    padding: 12px 24px;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.radio-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.6);
}

/* Footer */
.footer {
    flex: 0 0 auto;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: black;
}

.carousel-text-container {
    width: 100%;
    margin: 5px 0;
}

.carousel-text {
    display: flex;
    width: 100%;
}

.carousel-text-track {
    display: flex;
    width: max-content;
    animation: scrollLoop 60s linear infinite;
}

.carousel-text-item {
    flex: 0 0 auto;
    margin: 0 40px;
    font-size: 1rem;
    color: black;
    white-space: nowrap;
    font-weight: 500;
}

.carousel-container {
    width: 100%;
    text-align: center;
    padding: 10px 0px;
    background-color: rgba(220, 220, 220, 1);
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.3);
}

.carousel-container h2 {
    text-align: center;
    font-size: 1.5rem;
    color: black;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.carousel {
    display: flex;
    width: 100%;
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: scrollLoop 60s linear infinite;
}

.carousel-item {
    flex: 0 0 auto;
    width: 200px;
    margin: 0 40px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.carousel-item a {
    text-decoration: none;
    color: inherit;
}

.carousel-item a:hover {
    text-decoration: none;
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.carousel-description {
    margin-top: 10px;
    color: black;
    font-size: 0.95rem;
    text-decoration: none;
}

/* Contenedor general de las tarjetas */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Tarjeta individual */
.program-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    color: #111;
    padding: 20px;
    font-size: 18px;
    line-height: 1.2;
}

.program-card:hover {
    transform: scale(1.02);
}

/* Imagen de la tarjeta */
.program-image {
    max-height: 400px;
    height: auto;
    width: 100%;
    object-fit: contain;
    display: block;
}

/* Título tarjeta */
.program-title {
    font-size: 1.4rem;
    margin: 15px;
    color: #555;
}

/* Descripción tarjeta */
.program-description {
    font-size: 1rem;
    margin: 0 15px 15px 15px;
    color: #555;
}

.program-title,
.program-description {
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
}

.footer {
    height: auto;
    background-color: white;
    color: rgba(141, 141, 141, 1);
    padding: 25px;
    text-align: center;
    flex-direction: column;
}

.footer h3 {
    color: rgb(129, 129, 129);
    font-size: 1.2rem;
    font-weight: 600;
}

.footer ul.icons {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer ul.icons li a {
    color: rgba(141, 141, 141, 1);
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer ul.icons li a:hover {
    color: rgb(180, 179, 179);
}

.contact {
    margin: 20px;
    font-size: 0.95rem;
    color: #616161;
    font-weight: bold;
    line-height: 1.5;
}

.contact a {
    color: #616161;
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

.contact i {
    margin-right: 5px;
}

.related-sites a {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

#copyright {
    margin-top: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0 10px;
}

@keyframes scrollLoop {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .program-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .program-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }

    .program-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 18px;
        line-height: 1.5;
    }

    .program-card img {
        width: 100%;
        height: auto;
    }

    .program-card h3 {
        font-size: 22px;
        margin-top: 10px;
    }

    .program-card p {
        font-size: 16px;
    }

    .related-sites {
        margin: 10px;
    }
}

@media (max-width: 600px) {
    .header {
        min-height: 250px;
    }

    .main-content {
        min-height: 350px;
    }

    .carousel-container {
        transform: translateY(-5px);
    }

    .carousel-text-container {
        transform: translateY(5px);
    }

    .carousel-text-item {
        margin: 0 20px;
        font-size: 0.9rem;
    }

    .carousel-item {
        width: 160px;
        margin: 0 10px;
    }

    .carousel-description {
        font-size: 0.85rem;
    }

}