@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&family=Outfit:wght@300;400;600&display=swap');

:root {
    --pereira-red: #E30613;
    --pereira-red-glow: rgba(227, 6, 19, 0.4);
    --pereira-yellow: #FFF200;
    --pereira-yellow-glow: rgba(255, 242, 0, 0.2);
    --dark-bg: #0d0d0d;
    --card-bg: #1a1a1a;
    --glass-bg: rgba(20, 20, 20, 0.85);
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --navbar-height: 70px;
    /* Reduced for mobile */
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

/* --- BASE UTILITIES --- */
h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    line-height: 1.1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    cursor: pointer;
}

/* Section Spacing */
section {
    padding: 60px 20px;
    width: 100%;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--pereira-red);
}

/* --- NAVIGATION (Mobile First) --- */
header {
    height: var(--navbar-height);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid var(--pereira-red);
}

.logo-container img {
    height: 40px;
}

/* Mobile Nav Styles */
nav {
    position: fixed;
    top: var(--navbar-height);
    right: -100%;
    width: 80%;
    height: calc(100vh - var(--navbar-height));
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    z-index: 999;
}

nav.active {
    right: 0;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

nav a {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-white);
}

nav a:active,
nav a:hover {
    color: var(--pereira-yellow);
}

/* Hamburger UI */
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.social-icons {
    display: none;
    /* Hidden on small mobile to save space */
}

/* --- HERO SECTION (Mobile First) --- */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
        url('https://marinosradio.com/wp-content/uploads/2024/06/WhatsApp-Image-2024-06-27-at-11.46.16-PM.jpeg');
    background-size: cover;
    background-position: center;
    padding: var(--navbar-height) 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero .highlight {
    color: var(--pereira-yellow);
}

.hero p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 100%;
}

/* --- PLAYER (Mobile First) --- */
.player-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 4px solid var(--pereira-red);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
}

.player-header {
    background: #111;
    padding: 10px 15px;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    letter-spacing: 1px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--pereira-red);
    border-radius: 50%;
    animation: breathe 2s infinite;
}

.player-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.player-main-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.player-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.visualizer-bar {
    width: 3px;
    background: var(--pereira-red);
    border-radius: 2px;
    height: 6px;
}

.station-meta {
    text-align: center;
}

.station-name {
    font-size: 1.4rem;
    font-weight: 800;
}

.now-playing {
    font-size: 0.75rem;
    color: var(--pereira-yellow);
    text-transform: uppercase;
}

.player-controls-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.btn-play {
    background: var(--pereira-red);
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px var(--pereira-red-glow);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-play:hover {
    transform: scale(1.1);
    background: #ff1c28;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    width: 140px;
    justify-content: center;
}

#volume-slider {
    width: 80px;
    accent-color: var(--pereira-red);
}

/* --- NEWS (Mobile First) --- */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: var(--pereira-red);
}

.news-card img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 1.1rem;
    margin: 10px 0;
}

/* --- ABOUT (Mobile First) --- */
.somos-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.somos-legacy-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 380px;
    margin-bottom: 20px;
}

.legacy-card {
    position: absolute;
    width: 85%;
    aspect-ratio: 4/5;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--glass-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: var(--card-bg);
    transition: var(--transition-smooth);
}

.legacy-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.father-card {
    top: 0;
    left: 0;
    z-index: 2;
    /* Put the father on top */
    transform: rotate(-2deg);
    border-color: rgba(255, 215, 0, 0.4);
}

.son-card {
    bottom: 0;
    right: 0;
    z-index: 1;
    border-color: rgba(227, 6, 19, 0.4);
}

.legacy-card:hover {
    z-index: 10;
    transform: scale(1.05) rotate(0deg);
    border-color: var(--pereira-yellow);
}

.somos-text {
    text-align: center;
}

.somos-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.somos-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    border-left: 3px solid var(--pereira-red);
}

.somos-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* --- APPS SECTION --- */
.apps-section {
    text-align: center;
    background: linear-gradient(180deg, #000 0%, var(--dark-bg) 100%);
}

.apps-subtitle {
    color: var(--text-gray);
    margin: -20px auto 40px;
    max-width: 600px;
    font-size: 1.1rem;
}

.apps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.app-button {
    transition: var(--transition-smooth);
    border-radius: 12px;
    overflow: hidden;
    max-width: 200px;
}

.app-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.2);
}

.app-button img {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (min-width: 768px) {
    .app-button img {
        height: 75px;
    }
}

/* --- CONTACT (Mobile First) --- */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--pereira-yellow);
    margin-bottom: 20px;
}

.email-display {
    padding: 12px;
    font-size: 0.9rem;
    word-break: break-all;
}

.social-links-large {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-weight: 700;
}

/* --- MODAL (Mobile First) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    width: 95%;
    margin: 50px auto;
    border-radius: 15px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modal-enter 0.4s ease;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: fixed;
    right: 20px;
    top: 20px;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 2100;
    width: 50px;
    height: 50px;
    background: var(--pereira-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(227, 6, 19, 0.5);
    transition: var(--transition-smooth);
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
    background: #ff1c28;
    box-shadow: 0 0 35px rgba(227, 6, 19, 0.7);
}

#modal-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.modal-info {
    padding: 25px;
}

.modal-info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.modal-info .category {
    color: var(--pereira-red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: block;
}

.modal-info .date {
    color: var(--text-gray);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 15px;
}

#modal-text {
    line-height: 1.6;
    font-size: 1rem;
    color: #ccc;
}

/* --- FOOTER (Mobile First) --- */
footer {
    padding: 40px 20px;
    background: #000;
    text-align: center;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

/* --- MEDIA QUERIES (Enhancements) --- */

/* TABLET (min-width: 768px) */
@media (min-width: 768px) {
    :root {
        --navbar-height: 85px;
    }

    header {
        padding: 0 5%;
    }

    .menu-toggle {
        display: none;
    }

    nav {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        background: none;
        padding: 0;
        right: 0;
    }

    nav ul {
        flex-direction: row;
        gap: 30px;
    }

    nav a {
        font-size: 0.9rem;
    }

    .social-icons {
        display: flex;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .player-container {
        max-width: 800px;
    }

    .player-body {
        flex-direction: row;
        padding: 30px 60px;
        gap: 60px;
        justify-content: center;
        align-items: center;
    }

    .player-main-info {
        flex-direction: row;
        flex: 0 1 auto;
        text-align: left;
        gap: 20px;
    }

    .station-meta {
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .player-controls-wrap {
        flex-direction: row;
        width: auto;
        gap: 25px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .somos-container {
        flex-direction: row;
        align-items: center;
        gap: 80px;
    }

    .somos-legacy-wrapper {
        max-width: 450px;
        height: 500px;
        flex-shrink: 0;
    }

    .legacy-card {
        width: 80%;
    }

    .somos-text {
        text-align: left;
        flex: 1;
    }

    .somos-text {
        text-align: left;
    }

    .contact-container {
        flex-direction: row;
        justify-content: center;
    }

    .contact-card {
        flex: 1;
        max-width: 450px;
    }

    .social-links-large {
        flex-direction: row;
        justify-content: center;
    }
}

/* DESKTOP (min-width: 1024px) */
@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 5rem;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title {
        font-size: 2.5rem;
    }

    .modal-content {
        max-width: 800px;
    }

    #modal-image {
        height: 400px;
    }
}

/* --- ANIMATIONS & EFFECTS --- */
@keyframes breathe {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

@keyframes bar-dance {

    0%,
    100% {
        height: 10px;
        opacity: 0.5;
    }

    50% {
        height: 35px;
        opacity: 1;
    }
}

.visualizer-bar {
    animation: bar-dance 1s infinite alternate ease-in-out;
}

/* Varied delays for visualizer */
.visualizer-bar:nth-child(2n) {
    animation-delay: 0.2s;
}

.visualizer-bar:nth-child(3n) {
    animation-delay: 0.4s;
}

.visualizer-bar:nth-child(4n) {
    animation-delay: 0.1s;
}

/* Reveal Effects */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}