/**
 * EPA Website Styles
 * 
 * Main stylesheet for Economía Para Adultos website
 * Built with Tailwind CSS utilities and minimal custom components
 * 
 * @author Isai
 * @version 2.0
 */

/* ==============================================
    TAILWIND CSS CUSTOM BRAND COLORS
   ============================================== */

/* EPA Brand Colors */
.bg-epa-primary { background-color: #2E3D46; }
.bg-epa-accent { background-color: #5CB3B8; }
.bg-epa-light-bg { background-color: #F8FFFE; }
.bg-epa-Turquesa { background-color: #2EAEB3; }

.text-epa-primary { color: #2E3D46 !important; }
.text-epa-accent { color: #5CB3B8 !important; }
.text-epa-light-bg { color: #F8FFFE !important; }
.text-epa-Turquesa { color: #2EAEB3 !important; }
.text-epa-turquesa-light { color: #BAFCFF !important; }
.text-epa-gray50 { color: #686868 !important; }
.text-epa-gray30 { color: #AAAAAA !important;}
.text-epa-gray10 { color:#E9E9E9 !important;}

.border-epa-primary { border-color: #2E3D46; }
.border-epa-accent { border-color: #5CB3B8; }
.border-epa-gray30 { border-color: #AAAAAA; }

.hover\:bg-epa-primary:hover { background-color: #2E3D46; }
.hover\:bg-epa-accent:hover { background-color: #5CB3B8; }
.hover\:text-epa-primary:hover { color: #2E3D46; }
.hover\:text-epa-accent:hover { color: #5CB3B8; }
.hover\:text-epa-Turquesa:hover { color: #2EAEB3; }
.hover\:text-white:hover { color: white !important; }

/* Extended palette for gradients */
.bg-epa-400 { background-color: #36a2a9; }
.to-epa-400 { --tw-gradient-to: #36a2a9 var(--tw-gradient-to-position); }
.from-epa-accent { --tw-gradient-from: #5CB3B8 var(--tw-gradient-from-position); }

/* ==============================================
   CSS VARIABLES
   ============================================== */
:root {
    --color-epa-primary: #2E3D46;
    --color-epa-accent: #2EAEB3;
    --color-epa-light-bg: #F8FFFE;
    --transition-standard: 0.3s ease;
    --transition-fast: 0.2s ease;
}

/* ==============================================
   TYPOGRAPHY CLASSES
   ============================================== */

.epa-font-fam-ws {
    font-family: 'Work Sans', sans-serif !important;
}


.epa-font-fam-ws-force *[style*="font-family"] {
    font-family: 'Work Sans' !important;
}


.epa-font-fam-mw {
    font-family: 'Merriweather', serif !important;
}

.epa-tittle {
    line-height: 1.3;
    font-size: 2.625rem;
    font-weight: 900;
    font-family: 'Merriweather', serif;
}

.epa-body-gray10 {
    color: #E9E9E9;
    font-size: 1rem;
    line-height: 1.625;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
}

.epa-body-gray100 {
    color: #545454;
    font-size: 1rem;
    line-height: 1.625;
    font-family: 'Work Sans', sans-serif;
}

.epa-body-gray50 {
    color: #686868;
    font-size: 0.875rem;
    line-height: 1.7;
    font-weight: 400;
    font-family: 'Work Sans', sans-serif;
}

.text-title-s {
    font-size: 2rem;
}
.news-article-meta{
    font-family: 'Work Sans', sans-serif;
}

.topic-image-container {
    position: relative;
}

.topic-image-container img {
    transition: opacity 0.3s ease;
}

/* ==============================================
   ANIMATION CLASSES
   ============================================== */

/* Fade in down animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover underline animation */
.hover-underline-animation {
    position: relative;
    overflow: hidden;
}

.hover-underline-animation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-epa-accent);
    transition: width var(--transition-standard);
}

.hover-underline-animation:hover::after {
    width: 100%;
}

.submenu-active {
    animation: fadeInDown var(--transition-standard) ease-out;
}

/* ==============================================
    HEADER STYLES
   ============================================== */

.header-transition {
    transition: background-color var(--transition-standard), 
                border-color var(--transition-standard);
}

.text-transition {
    transition: color var(--transition-standard);
}

.nav-item .menu-text, .menu-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0%;
}

/* ==============================================
    BUTTON COMPONENTS
   ============================================== */

.btn-hover-effect {
    transition: all var(--transition-standard);
}

.btn-hover-effect:hover {
    transform: translateY(-1px);
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    border: 1px solid var(--color-epa-accent);
    border-radius: 9999px;
    color: white;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-standard);
}

.hero-cta-btn:hover {
    background-color: var(--color-epa-accent);
    transform: translateY(-2px);
}

/* ==============================================
   HOME PAGE SECTIONS
   ============================================== */

/* About Section */
.about-section-bg {
    background: #BAFCFF;
    position: relative;
    background-image: url('/images/elvira-about-bg1.webp');
    background-size: auto 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.about-section-label {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-epa-primary);
    position: relative;
    padding-bottom: 0.55rem;
    display: inline-block;
}

.about-section-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-epa-accent);
}

.about-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.2rem;
    background-color: #BAFCFF;
    border: 1px solid var(--color-epa-primary);
    border-radius: 9999px;
    color: var(--color-epa-primary);
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-standard);
}

.about-cta-btn:hover {
    transform: translateY(-2px);
    border-color: var(--color-epa-accent);
    background-color: #2E3D46;
    color: white;
}

.about-mobile-image {
    margin-top: 0rem;
    overflow: hidden;
}
.news-article-title{
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #2E3D46;
}

/* ==============================================
   MOBILE MENU
   ============================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-epa-primary);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

.mobile-menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: white;
    transition: all 0.2s ease;
    z-index: 101;
}

.mobile-menu-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: .5rem;
    margin-top: 5rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.mobile-menu-panel.active {
    transform: translateX(0);
}

.mobile-menu-panel.slide-left {
    transform: translateX(-100%);
}

.mobile-menu-panel.slide-right {
    transform: translateX(100%);
}

.mobile-menu-nav {
    flex: 1;
    padding: 0 1.5rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mobile-menu-text {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.mobile-menu-arrow {
    width: 1.25rem;
    height: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.mobile-menu-expandable:hover .mobile-menu-arrow {
    color: white;
}

.mobile-menu-footer {
    padding: 1.5rem;
    flex-shrink: 0;
}

.mobile-menu-cta-btn {
    width: 100%;
    background-color: var(--color-epa-accent);
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-cta-btn:hover {
    background-color: #4a9ca1;
    transform: translateY(-1px);
}

.mobile-submenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-epa-primary);
    z-index: 10;
}

.mobile-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.mobile-submenu-title {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-align: left;
    flex: 1;
}

.mobile-submenu-nav {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    padding-top: 0.5rem;
}

.mobile-submenu-item {
    display: block;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mobile-submenu-item:last-child {
    border-bottom: none;
}

.mobile-submenu-item-title {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.mobile-submenu-item-desc {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* ==============================================
   TOPICS SECTION
   ============================================== */

/* Desktop Topic Cards */
.topic-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 30px;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    background-color: white;
    cursor: pointer;
    transition: all var(--transition-standard);
}

.topic-card:hover,
.topic-card.active {
    background-color: var(--color-epa-primary);
    border-color: var(--color-epa-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(46, 61, 70, 0.15);
}

.topic-card:hover .topic-card-icon,
.topic-card.active .topic-card-icon {
    color: var(--color-epa-accent);
}

.topic-card:hover .topic-card-title,
.topic-card.active .topic-card-title {
    color: #BAFCFF;
}

.topic-card:hover .topic-card-description,
.topic-card.active .topic-card-description {
    color: #E9E9E9;
}

.topic-card-icon {
    flex-shrink: 0;
    color: #AAAAAA;
    transition: color var(--transition-standard);
}

.topic-card-title {
    font-family: 'Merriweather', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #AAAAAA;
    margin-bottom: 0.5rem;
    transition: color var(--transition-standard);
}

.topic-card-description {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #AAAAAA;
    line-height: 1.5;
    transition: color var(--transition-standard);
}

/* Desktop Carousel */
.topic-carousel-container-desktop {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.topic-carousel-track-desktop {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.topic-carousel-slide-desktop {
    flex: 0 0 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s ease;
}

.topic-carousel-slide-desktop.active {
    opacity: 1;
    transform: scale(1);
}

.topic-carousel-image-desktop {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
}

.topic-carousel-content-desktop {
    padding: 1.5rem;
}

.topic-carousel-indicators-desktop {
    display: flex;
    gap: 0.5rem;
}

.indicator-desktop {
    width: 40px;
    height: 8px;
    border-radius: 6px;
    background-color: #D1D5DB;
    border: none;
    cursor: pointer;
    transition: all var(--transition-standard);
}

.indicator-desktop.active {
    background-color: var(--color-epa-accent);
}

.indicator-desktop:hover:not(.active) {
    background-color: #9CA3AF;
}

.topic-carousel-wrapper {
    display: none;
    width: 100%;
    max-width: 400px;
}

.topic-carousel-wrapper.active {
    display: block;
}

/* ==============================================
   HORIZONTAL SCROLL UTILITY
   ============================================== */
.hide-scrollbar {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

.horizontal-scroll-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.horizontal-scroll-container:active {
    cursor: grabbing;
}

.horizontal-scroll-container.scrolling-active {
    cursor: grabbing;
    user-select: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: var(--color-epa-accent);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #4a9ca1;
}

.horizontal-scroll-container * {
    user-select: none;
    -webkit-user-drag: none;
}
/* Section padding utility */
.section-padding {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ==============================================
   NEWSLETTER SECTION
   ============================================== */

.newsletter-image-container {
    position: relative;
}

.newsletter-cta-btn:hover {
    transform: translateY(-1px);
}

/* ==============================================
   FOOTER STYLES
   ============================================== */

.footer-height {
    min-height: 359px;
}

.footer-main-title {
    font-size: 2rem;
    line-height: 1.3;
}

/* ==============================================
   MANIFESTO SECTION
   ============================================== */

.manifesto-content-container {
    border: 2px solid var(--color-epa-accent);
    border-radius: 1rem;
    padding: 2.5rem;
    background: rgba(46, 174, 179, 0.05);
    backdrop-filter: blur(10px);
}

.manifesto-quote {
    position: relative;
    padding: 1.5rem 0;
}


/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media (max-width: 1279px) {
  #main-header .max-w-7xl {
    padding-left: 1.9rem;
    padding-right: 1.9rem;
  }
}

@media (max-width: 1023px) {
    .text-title-s {
        font-size: 1.5rem;
    }
    .footer-main-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .about-mobile-image {
        display: none;
    }
}

@media (max-width: 768px) {
    .manifesto-content-container {
        padding: 1.5rem;
        margin: 0 -1rem;
    }
    
    .manifesto-quote::before {
        font-size: 3rem;
        left: -0.5rem;
    }
    .about-section-bg {
        background-image: none;
    }
    .epa-tittle {
        font-size: 1.5rem;
    }
    
    .footer-height {
        min-height: auto;
        padding: 3rem 0 2rem 0;
    }
    
    .footer-main-title {
        font-size: 1.125rem;
        text-align: left;
        margin-bottom: 2rem;
    }

    .hero-cta-btn,
    .about-cta-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.2rem;
        font-size: 0.875rem;
    }
    
    .about-section-label {
        text-align: center;
        font-size: 0.875rem;
    }
    
    .about-section-label::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .text-title-s {
        font-size: 1.125rem;
    }
    
    .epa-body-gray10, 
    .epa-body-gray100 {
        font-size: 0.875rem;
    }
    .section-padding{
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .news-article-title{
        font-weight: 900;
    }
}

@media (max-width: 640px) {
    .footer-main-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 375px) {
    .mobile-menu-container {
        max-width: 100%;
    }
}


/* ==============================================
   PARALLAX EFFECTS
   ============================================== */

/* Fixed background that stays in place while content scrolls */
.parallax-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('/images/parallax-dots-texture.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    will-change: transform;
}
.parallax-background::before {
    content: "";
    position: fixed;
    inset: 0;
    background-color: rgba(46, 61, 70, 0.9);
    pointer-events: none;
    z-index: -1;
}

/* Ensure main content is above the fixed background */
main {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
}

/* Remove any gaps between header and main */
body {
    margin: 0;
    padding: 0;
}

/* Fix header positioning to prevent white line */
#main-header {
    position: relative;
    z-index: 50;
    margin-bottom: 0;
}

/* Fallback for mobile devices that don't support fixed backgrounds */
@media (max-width: 768px) {
    .parallax-background {
        background-attachment: scroll;
        background-size: cover;
        background-position: center;
        height: 100%;
    }
}

/* Enhanced parallax with better performance */
@supports (background-attachment: fixed) {
    .parallax-background {
        background-attachment: fixed;
    }
}




/* ==============================================
   UTILITY CLASSES
   ============================================== */



@media (min-width: 1024px) {
    .section-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Line clamp utilities for text truncation */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ==============================================
   ACCESSIBILITY
   ============================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.focus-visible:focus-visible {
    outline: 2px solid var(--color-epa-accent);
    outline-offset: 2px;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    height: 100vh;
}

/* Custom Header Styles */
.custom-header-bg {
    background-color: var(--custom-bg) !important;
}

.custom-header-text {
    color: var(--custom-text) !important;
}