:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-200: #a5f3fc;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
}

body {
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-100) 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link.active {
    color: var(--teal-600);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal-500), var(--cyan-500));
    border-radius: 2px;
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-600) 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(20, 184, 166, 0.5);
}

.btn-outline {
    border: 2px solid var(--teal-500);
    color: var(--teal-600);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--teal-50);
    transform: translateY(-2px);
}

/* Outline-only white button (no fill) */
.btn-outline-white {
    background: rgba(255, 255, 255, 0.08); /* sutil translúcido */
    border: 2px solid #ffffff;
    color: #ffffff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.btn-outline-white:hover {
    background: #ffffff; /* lleno blanco */
    color: #111827; /* texto negro */
    transform: translateY(-2px);
}

/* White button with black text on hover */
.btn-white {
    background: #ffffff;
    color: var(--teal-600);
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.btn-white:hover {
    color: #111827; /* slate-900 (negro) */
    background: #ffffff;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.hero-bg {
    /* Base gradient visible under images */
    background: linear-gradient(135deg, var(--teal-50) 0%, var(--cyan-50) 50%, var(--slate-50) 100%);
    position: relative;
    overflow: hidden;
    /* Default hero image var (can be overridden). Path is relative to this CSS file */
    --hero-image: url('../images/morrazo-beach.png');
    /* Darkness of overlay on top of image (0 to 1) */
    --hero-overlay-opacity: 0.35;
    /* Color grading/tint for the image */
    --hero-tint-from: rgba(9, 98, 107, 0.40);   /* teal-ish */
    --hero-tint-to: rgba(30, 200, 199, 0.18);   /* #1EC8C7 with alpha */
}

/* Background image layer (slider) */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    transform: scale(1.05);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    pointer-events: none;
    z-index: 0;
}

/* Optional subtle activation state for each slide swap */
.hero-bg.slider-active::before {
    opacity: 0.35;
    transform: scale(1);
}

/* Grain overlay moved to ::after so it sits above the image */
.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(0,0,0, var(--hero-overlay-opacity)),
        rgba(0,0,0, var(--hero-overlay-opacity))
    ), linear-gradient(135deg, var(--hero-tint-from), var(--hero-tint-to)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%2314b8a6" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%2306b6d4" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%2310b981" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 1;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .hero-bg h1 {
        font-size: 2.5rem;
    }
    
    .card-hover:hover {
        transform: translateY(-4px);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(20, 184, 166, 0.3);
    border-radius: 50%;
    border-top-color: var(--teal-500);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Audio Player Styles */
.audio-player {
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.3);
}

.audio-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.audio-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Form Styles */
.form-input {
    border: 2px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Podcast/Audiobook Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--slate-200);
    border-radius: 2rem;
    background: white;
    color: var(--slate-600);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    border-color: var(--teal-500);
    background: var(--teal-500);
    color: white;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--teal-500);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--teal-500);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--teal-600);
    transform: translateY(-2px);
}

/* Gradient text for brand titles */
.gradient-text-brand {
    background-image: linear-gradient(90deg, #ffffff 0%, #1ec8c7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Radio waves animation */
.radio-waves {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave {
    width: 40px;
    height: 40px;
    border: 2px solid var(--teal-500);
    border-radius: 50%;
    position: absolute;
    animation: radioWave 2s infinite;
    opacity: 0;
}

.wave:nth-child(1) {
    animation-delay: 0s;
}

.wave:nth-child(2) {
    animation-delay: 0.5s;
}

.wave:nth-child(3) {
    animation-delay: 1s;
}

@keyframes radioWave {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Enhanced hero styling */
.hero-bg h1 {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-bg .animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Improved button hover effects */
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--slate-800);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Language Toggle Styles */
.language-toggle a {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    cursor: pointer;
    user-select: none;
}

.language-toggle a:hover:not(.active) {
    background-color: rgba(226, 232, 240, 0.8) !important;
    color: rgb(51, 65, 85) !important;
}

.language-toggle a.active {
    background-color: white !important;
    color: #20B2AA !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.language-toggle a i.fa-spinner {
    animation: spin 1s linear infinite;
    font-size: 12px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hamburger Menu Animation - Compatible */
.hamburger-icon {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-transform-origin: center;
    -moz-transform-origin: center;
    -ms-transform-origin: center;
    -o-transform-origin: center;
    transform-origin: center;
}

.hamburger-icon.active {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
    color: #14b8a6;
}

/* Mobile Menu - Versión simple para máxima compatibilidad */
.mobile-menu.hidden {
    display: none !important;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    min-height: 56px;
    font-size: 16px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link:active {
    transform: scale(0.98);
}

.mobile-nav-link i {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mobile-nav-link:hover i {
    opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, a {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Better spacing */
    .px-4 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .py-3 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Improved text sizes */
    .text-sm {
        font-size: 16px;
    }
    
    /* Prevent zoom on focus */
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Colores personalizados RadioRías - Restaurados */
:root {
    --radio-teal: #20B2AA;
    --radio-cyan: #00CED1;
    --radio-dark: #1a202c;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --cyan-400: #22d3ee;
    --slate-800: #1e293b;
}

/* Clases Tailwind personalizadas */
.text-radio-teal { color: var(--radio-teal) !important; }
.bg-radio-teal { background-color: var(--radio-teal) !important; }
.border-radio-teal { border-color: var(--radio-teal) !important; }
.text-radio-cyan { color: var(--radio-cyan) !important; }
.bg-radio-cyan { background-color: var(--radio-cyan) !important; }
.text-radio-dark { color: var(--radio-dark) !important; }
.bg-radio-dark { background-color: var(--radio-dark) !important; }

/* Estados hover y focus */
.hover\:text-radio-teal:hover { color: var(--radio-teal) !important; }
.hover\:text-radio-cyan:hover { color: var(--radio-cyan) !important; }
.focus\:ring-radio-teal:focus { --tw-ring-color: var(--radio-teal) !important; }
.focus\:border-radio-teal:focus { border-color: var(--radio-teal) !important; }

/* Gradientes */
.from-radio-teal { --tw-gradient-from: var(--radio-teal) !important; }
.via-radio-cyan { --tw-gradient-via: var(--radio-cyan) !important; }
.to-teal-600 { --tw-gradient-to: var(--teal-600) !important; }

/* Opacidades */
.bg-radio-teal.bg-opacity-10 { background-color: rgba(32, 178, 170, 0.1) !important; }
.bg-opacity-40 { background-color: rgba(0, 0, 0, 0.4) !important; }

/* Colores de texto específicos */
.text-yellow-300 { color: #fde047 !important; }
.text-teal-600 { color: var(--teal-600) !important; }

/* Menú móvil - Forzado para máxima visibilidad */
.mobile-menu {
    z-index: 9999 !important;
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: white !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-top: 1px solid #e2e8f0 !important;
    min-height: 200px !important;
}

.mobile-menu.hidden {
    display: none !important;
}

.mobile-menu.show {
    display: block !important;
}

/* Asegurar que el contenido del menú sea visible */
.mobile-menu .max-w-7xl {
    background-color: white !important;
    padding: 24px 16px !important;
}

.mobile-nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 16px !important;
    color: #374151 !important;
    font-weight: bold !important;
    border-radius: 12px !important;
    margin-bottom: 4px !important;
    min-height: 56px !important;
}

/* Smooth scrolling for mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
}