:root {
    --primary-blue: #00A6FF;
    --secondary-yellow: #FED462;
    --accent-orange: #F5A623;
    --dark-bg: #0B121A;  /* Deep dark blue */
    --light-bg: #F8FAFC; /* Clean off-white */
    --darker-bg: #05090F;
    --light-text: #F8FAFC;
    --gray-text: #94A3B8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --container-width: 1200px;
    --section-padding: 140px 20px;
    --border-radius: 8px; /* Sharper, more institutional */
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 40%, var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-blue);
}

.text-center { text-align: center; }
.text-center.section-title::after { left: 50%; transform: translateX(-50%); }

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.section {
    padding: var(--section-padding);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(13, 27, 42, 0.85);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Buttons */
.btn-live {
    background: var(--primary-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px -5px rgba(0, 166, 255, 0.4);
    transition: var(--transition);
}

.btn-live:hover {
    transform: translateY(-2px);
    background: #0088cc;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: var(--transition);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 16px 36px;
    border-radius: 12px;
    border: 2px solid white;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: url('img/hero-bg.jpeg') center/cover no-repeat;
    background-attachment: fixed; /* Parallax effect */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 9, 15, 0.95) 30%, rgba(5, 9, 15, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-content h1 {
    animation: fadeInUp 1s ease forwards;
}

.badge {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 166, 255, 0.3);
}

.hero-tagline {
    font-size: 1.6rem;
    max-width: 650px;
    color: #cbd5e1;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections Contrast */
.nosotros {
    background-color: var(--light-bg);
    color: var(--dark-bg);
}

.nosotros .section-title {
    color: var(--dark-bg);
}

.nosotros .section-title::after {
    background: linear-gradient(to right, 
        #D52B1E 0%, #D52B1E 33.3%, 
        #F4E337 33.3%, #F4E337 66.6%, 
        #007934 66.6%, #007934 100%
    );
    width: 240px;
    height: 3.6px; /* 18px / 5 */
    left: 0;
    border-radius: 2px;
}

.nosotros .grid {
    align-items: stretch;
}

.nosotros .image-wrapper {
    height: 100%;
}

.nosotros .bordered-img {
    height: 100%;
    object-fit: cover;
}

.nosotros .text-content {
    display: flex;
    flex-direction: column;
}

.nosotros .card {
    background: white;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    flex: 1; /* Match image height */
}

.nosotros .card p {
    color: #475569;
}

.mision-objetivo {
    background: radial-gradient(circle at center, #1a2a3a 0%, #0B121A 100%);
}

.mision-objetivo .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    align-items: stretch;
}

.mision-objetivo .card {
    height: 100%;
}

/* Radio Live Section */
.radio-section {
    background: radial-gradient(circle at center, #152b3c 0%, #0B121A 100%);
    position: relative;
    overflow: hidden;
}

.grid-live {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: stretch; /* Match columns height */
}

.live-visual {
    position: relative;
    height: 100%;
}

.live-visual img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.live-badge-wrapper {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.badge-live {
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
}

.live-ping {
    width: 10px;
    height: 10px;
    background-color: #ff3e3e;
    border-radius: 50%;
    position: relative;
}

.live-ping::after {
    content: '';
    position: absolute;
    inset: -4px;
    background-color: #ff3e3e;
    border-radius: 50%;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(3);
        opacity: 0;
    }
}

.section-desc {
    font-size: 1.25rem;
    color: #94A3B8;
    margin-bottom: 3rem;
    max-width: 500px;
}

.live-controls {
    display: flex;
    flex-direction: column;
}

.custom-player {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1; /* Grow to match image height */
    justify-content: center; /* Center player controls vertically */
    backdrop-filter: blur(10px);
}

.player-main {
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: space-between;
    width: 100%;
}

.btn-playing {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 166, 255, 0.3);
}

.btn-playing:hover {
    transform: scale(1.05);
    background: #0088cc;
}

.player-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.player-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.player-subtitle {
    font-size: 0.9rem;
    color: #94A3B8;
}

.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px; /* Taller visualizer */
    min-width: 60px;
    justify-content: flex-end;
}

.bar {
    width: 7px;
    background: var(--primary-blue);
    border-radius: 4px;
    height: 15%;
    transition: height 0.2s ease;
}

.playing .bar {
    animation: bar-dance 1s ease-in-out infinite alternate;
}

.playing .bar:nth-child(1) { animation-delay: 0.1s; }
.playing .bar:nth-child(2) { animation-delay: 0.3s; }
.playing .bar:nth-child(3) { animation-delay: 0.2s; }
.playing .bar:nth-child(4) { animation-delay: 0.4s; }
.playing .bar:nth-child(5) { animation-delay: 0.1s; }

@keyframes bar-dance {
    0% { height: 20%; }
    100% { height: 100%; }
}

.contacto {
    background-color: white;
    color: var(--dark-bg);
    padding-bottom: 0; /* No bottom padding so the map can lead directly into footer */
}

.contacto .section-title {
    color: var(--dark-bg);
}

/* Components */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 60px 40px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-blue);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary-blue);
    transition: var(--transition);
}

.card:hover::before {
    height: 100%;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mision-objetivo .card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mision-objetivo .card::before {
    background: var(--secondary-yellow);
}

.mision-objetivo .card h3 {
    color: var(--secondary-yellow);
}

.image-wrapper {
    position: relative;
}

.bordered-img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.bordered-img:hover {
    transform: scale(1.02);
}

.icon-top {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    display: block;
}

/* Contact Cards */
.contact-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-10px);
    background: white;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.contact-card h4 {
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.contact-card p, .contact-card a {
    color: #64748b;
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contacto.dark {
    background: radial-gradient(circle at center, #002D4A 0%, #0B121A 100%);
    color: white;
}

.contacto.dark .section-title {
    color: white;
}

.contacto.dark .contact-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contacto.dark .contact-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-blue);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.contacto.dark .contact-card h4 {
    color: white;
}

.contacto.dark .contact-card p, .contacto.dark .contact-card a {
    color: #94a3b8;
}

.contacto.dark .contact-card a:hover {
    color: var(--primary-blue);
}

/* Map Full Width */
.map-full-width {
    margin-top: 5rem;
    line-height: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.map-full-width iframe {
    filter: grayscale(100%) brightness(0.9);
    transition: var(--transition);
}

.map-full-width:hover iframe {
    filter: grayscale(0%) brightness(1);
}

/* Footer */
footer {
    padding: 60px 0;
    background: var(--darker-bg);
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

footer p {
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* Responsive */
/* Responsive Design */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    .grid, .grid-live, .grid-three { 
        grid-template-columns: 1fr; 
        gap: 50px; 
    }
    :root { --section-padding: 80px 20px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.22rem; }
    
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(11, 18, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    header { padding: 15px 0; }
    .btn-live { display: none; }
    
    .hero-cta { flex-direction: column; width: 100%; text-align: center; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }

    .section-title { font-size: 2rem; margin-bottom: 2.5rem; text-align: center; width: 100%; }
    .section-title::after { left: 50%; transform: translateX(-50%); width: 60px; }

    .live-controls { text-align: center; }
    .player-main { flex-direction: column; gap: 20px; text-align: center; }
    .visualizer { justify-content: center; }

    .card, .contact-card, .area-card { padding: 40px 20px; }
    .amarc-hero h1 { font-size: 2.5rem; }
    
    .areas-gallery img { height: 250px; }
}

/* AMARC Page Specifics */
.amarc-hero {
    background: linear-gradient(rgba(11, 18, 26, 0.8), rgba(11, 18, 26, 0.8)), url('img/amarc_02.jpg') center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.amarc-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.amarc-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.amarc-hero .hero-tagline {
    margin: 0 auto;
    max-width: 800px;
}

.objectives-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.objective-item {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-blue);
    color: var(--dark-bg);
    transition: var(--transition);
}

.objective-item:hover {
    transform: translateX(10px);
    background: white;
    box-shadow: var(--shadow);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.area-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.area-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.area-card h3 {
    margin-bottom: 15px;
    color: var(--dark-bg);
}

.area-card p {
    font-size: 0.95rem;
    color: #475569;
}

.presentation .text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.presentation .text-content p:last-child {
    margin-bottom: 0;
}

.presentation .image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: fit-content;
    max-width: 400px;
    margin: 0 auto;
}

.presentation .image-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

@media (min-width: 1025px) {
    .presentation .grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 80px;
        align-items: stretch;
    }
    
    .presentation .image-wrapper {
        padding: 60px;
        max-width: none;
        margin: 0;
        height: 100%;
    }

    .presentation .image-wrapper img {
        max-height: 250px;
    }
}

.trayectoria-compromiso {
    background-color: var(--light-bg);
    color: var(--dark-bg);
}

.trayectoria-compromiso .section-title {
    color: var(--dark-bg);
    margin-bottom: 2rem;
}

.trayectoria-compromiso .grid-two-cols {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 80px;
    align-items: start;
}

.trayectoria-compromiso p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.trayectoria-compromiso p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .trayectoria-compromiso .grid-two-cols {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

.mision-vision-amarc {
    background: radial-gradient(circle at center, #1a2a3a 0%, #0B121A 100%);
    position: relative;
    overflow: hidden;
}

.mision-vision-amarc .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    align-items: stretch;
}

.amarc-card {
    height: 100%;
    color: var(--dark-bg);
}

.areas-work {
    background-color: var(--light-bg);
    color: var(--dark-bg);
}

.areas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    margin-top: 60px;
    gap: 30px;
}

.areas-gallery img {
    height: 350px;
    width: 100%;
    object-fit: cover;
}

/* AMARC Promo Section (Index) */
.amarc-promo {
    background-color: var(--light-bg);
}

.amarc-promo-grid {
    align-items: stretch;
    gap: 80px;
}

.amarc-promo-img {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.amarc-promo-img img {
    max-width: 280px;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.1));
}

.badge-institutional {
    background: var(--primary-blue);
    color: white;
}

.amarc-promo-text {
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 2rem;
}

/* End of Styles */
