/* --- 1. VARIÁVEIS E CONFIGURAÇÕES BASE --- */
:root {
    --primary: #C917DF;
    --dark: #2b0033;
    --white: #ffffff;
    --text-main: #333333;
    --light-gray: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    padding-bottom: 140px;
}

/* --- 2. HEADER E MENU --- */
header {
    background-color: var(--white);
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10000;
}

.logo img {
    max-height: 50px;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 50px;
    transition: 0.3s;
}

/* Regra para links normais */
.nav-menu a:not(.btn-app):hover,
.nav-menu a:not(.btn-app).active {
    background: var(--primary);
    color: white;
}

/* ESCONDE OS BOTÕES DE APP NO DESKTOP */
.app-store-buttons {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    z-index: 11000;
}

/* --- 3. SEÇÃO HERO --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(43, 0, 51, 0.6), rgba(201, 23, 223, 0.4)), url('/img/fundowebradio.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- 4. SEÇÕES GERAIS --- */
.content-section {
    padding: 60px 10%;
    text-align: center;
}

.content-section h2 {
    color: var(--primary);
    margin-bottom: 40px;
    font-size: 2.2rem;
    text-transform: uppercase;
}

#app-content {
    flex: 1 0 auto;
}

/* --- 5. GRID DE NOTÍCIAS --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.news-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.news-content p {
    font-size: 0.9rem;
    color: #666;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-ver-todas {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 35px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.btn-ver-todas:hover {
    background: var(--primary);
    color: white;
}

/* --- 6. FORMULÁRIO DE CONTATO --- */
.contato-wrapper {
    max-width: 800px;
    margin: auto;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.contato-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contato-form input,
.contato-form select,
.contato-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--light-gray);
}

.contato-form textarea {
    margin: 20px 0;
    resize: vertical;
}

.contato-form button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
}

.contato-form button:hover {
    background: var(--dark);
    transform: scale(1.02);
}

/* --- 7. PLAYER MASTER --- */
.master-player {
    position: fixed;
    z-index: 9999;
    background: #ffffff;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@media (min-width: 769px) {
    .master-player {
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 850px;
        height: 85px;
        border-radius: 100px;
        padding: 0 30px;
        border: 1px solid rgba(201, 23, 223, 0.15);
        justify-content: space-between;
    }
}

.song-info {
    display: flex;
    align-items: center;
    width: 280px;
    flex-shrink: 0;
}

.album-art {
    width: 55px;
    height: 55px;
    min-width: 55px;
    min-height: 55px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    overflow: hidden;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.playing .album-art img {
    animation: rotateDisk 12s linear infinite;
}

@keyframes rotateDisk {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.track-details b {
    display: block;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-details span {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

/* ESPECTRO MUSICAL ORIGINAL CENTRALIZADO (5 BARRAS) */
.visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 35px;
    flex-grow: 1;
}

.v-bar {
    width: 5px;
    height: 8px;
    background: linear-gradient(to top, var(--primary), #fb40ff);
    border-radius: 10px;
    transition: 0.3s;
}

.playing .v-bar {
    animation: waveAnim 0.8s ease-in-out infinite;
}

.v-bar:nth-child(1) {
    animation-delay: 0.1s;
}

.v-bar:nth-child(2) {
    animation-delay: 0.3s;
}

.v-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.v-bar:nth-child(4) {
    animation-delay: 0.4s;
}

.v-bar:nth-child(5) {
    animation-delay: 0.1s;
}

@keyframes waveAnim {

    0%,
    100% {
        height: 8px;
    }

    50% {
        height: 30px;
    }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 280px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.volume-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type=range] {
    accent-color: var(--primary);
    cursor: pointer;
    width: 70px;
}

/* --- 8. ESTILO DAS ABAS --- */
.tabs-periodo {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-weight: bold;
    border-radius: 50px;
    transition: 0.3s;
    font-family: 'Ubuntu', sans-serif;
    text-transform: uppercase;
}

.tab-btn.active {
    background-color: var(--primary) !important;
    color: white !important;
}

/* --- 9. GRADE DE PROGRAMAÇÃO --- */
.prog-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0;
}

.prog-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
    height: 110px;
}

.prog-card img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-right: 3px solid var(--primary);
    flex-shrink: 0;
}

.prog-info {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    overflow: hidden;
    flex-grow: 1;
}

.prog-info h4 {
    font-size: 1.05rem;
    color: var(--dark);
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prog-info .prog-hora {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

.prog-info p {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

/* --- 10. FOOTER --- */
footer {
    flex-shrink: 0;
    background: var(--dark);
    color: white;
    padding: 40px 10%;
    text-align: center;
}

/* --- 11. RESPONSIVIDADE E MENU LATERAL --- */
@media (max-width: 850px) {
    .hero {
        height: 300px !important;
        background-attachment: scroll;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 10px;
        right: -100%;
        width: 75%;
        height: calc(100vh - 20px);
        background: var(--white);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 25px;
        gap: 15px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10500;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.4);
        border-radius: 25px 0 0 25px;
    }

    .nav-menu.show {
        right: 0;
    }

    .nav-menu a {
        width: 100%;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-main);
        padding: 15px 20px;
        border-radius: 12px;
        text-align: left;
        border-bottom: 1px solid #f5f5f5;
    }

    /* Regra específica para os botões de APP para NUNCA ficarem roxos */
    .btn-app,
    .nav-menu a.btn-app:hover,
    .nav-menu a.btn-app.active {
        background: #000 !important;
        color: white !important;
        border-bottom: none !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px 20px !important;
        border-radius: 10px !important;
        margin-bottom: 5px !important;
    }

    .app-store-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: auto;
        padding-bottom: 20px;
    }

    .btn-app i {
        font-size: 1.5rem;
    }

    .btn-app span {
        display: block;
        font-size: 0.6rem;
        text-transform: uppercase;
        opacity: 0.8;
    }

    .btn-app b {
        display: block;
        font-size: 1rem;
    }

    .master-player {
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85px !important;
        border-radius: 20px 20px 0 0;
        padding: 0 15px;
        border-top: 2px solid var(--primary);
        justify-content: space-around;
        transform: none;
    }

    .visualizer,
    .volume-box {
        display: none !important;
    }

    .song-info,
    .player-controls {
        width: auto;
    }

    .prog-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .contato-form .form-grid {
        grid-template-columns: 1fr;
    }
}