:root {
    /* Sistema de colores */
    --color-gray-900: #212529;
    --color-gray-800: #343A40;
    --color-gray-700: #495057;
    --color-gray-600: #6C757D;  /* dark-gray original */
    --color-gray-500: #ADB5BD;  /* medium-gray original */
    --color-gray-400: #DEE2E6;  /* light-gray original */
    --color-gray-300: #E9ECEF;
    --color-gray-200: #F1F3F5;
    --color-gray-100: #F8F9FA;  /* very-light-gray original */
    --color-white: #FFFFFF;
    --color-yellow: #FCE482;
    
    /* Alias para compatibilidad */
    --color-dark-gray: var(--color-gray-600);
    --color-medium-gray: var(--color-gray-500);
    --color-light-gray: var(--color-gray-400);
    --color-very-light-gray: var(--color-gray-100);
    
    /* Tipografía */
    --font-family-main: 'Quicksand', sans-serif;
    --font-family-logo: 'Gabarito', sans-serif;
    
    /* Espaciado */
    --space-xxs: 0.25rem;  /* 4px */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 0.75rem;   /* 12px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-xxl: 3rem;     /* 48px */
    
    /* Bordes y sombras */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    
    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --transition-fast: all 0.15s ease;
    
    /* Z-index */
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-fixed: 1030;
    --z-index-modal: 1060;
    --z-index-popover: 1070;
    --z-index-tooltip: 1080;
}

body {
    margin: 0;
    font-family: var(--font-family-main);
    color: var(--color-gray-700);
    background-color: var(--color-white);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. Header
   ========================================================================== */
header.main-header {
    background-color: var(--color-white);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-gray-300);
    position: relative;
    z-index: var(--z-index-sticky);
}

header.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mantener compatibilidad con clases existentes */
.logo img,
.header-logo img {
    height: 31px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.header-logo img:hover {
    opacity: 0.9;
}

/* ==========================================================================
   2. Hero Section
   ========================================================================== */
.hero-section-updated {
    background-color: var(--color-dark-gray);
    padding: var(--space-xxl) 0;
    color: var(--color-very-light-gray);
}

.hero-section-updated .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xxl);
}

.hero-left-box {
    background-color: var(--color-yellow);
    color: var(--color-gray-900);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    font-size: 1.5em;
    line-height: 1.4;
    text-align: left;
    max-width: 300px;
    box-sizing: border-box;
}

.hero-left-box strong {
    font-weight: 700;
}

.hero-left-box span {
    font-weight: 400;
}

.hero-right-content {
    text-align: center;
    max-width: 500px;
}

.hero-right-content p,
.hero-right-content strong {
    font-size: 1.6em;
    margin: 0;
}

.app-store-buttons {
    display: flex;
    gap: var(--space-xxl);
    justify-content: flex-start;
    margin-top: var(--space-xl);
}

.app-store-buttons img {
    height: 48px;
    width: auto;
}

/* ==========================================================================
   3. Small Text Section
   ========================================================================== */
.intro-text-section {
    padding: var(--space-xl) 0;
    text-align: center;
    background-color: var(--color-white);
}

.intro-text-section p {
    font-size: 1.2em;
    color: var(--color-gray-900);
    max-width: 900px;
    margin: 0 auto;
    font-weight: 400;
}

/* ==========================================================================
   4. Categories Section
   ========================================================================== */
.categories-section-updated {
    padding: var(--space-lg) 0;
    background-color: var(--color-light-gray);
}

.categories-section-updated h2 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: var(--space-md);
    color: var(--color-gray-900);
    font-weight: normal;
}

.categories-section-updated .subtitle {
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: var(--space-xxl);
    color: var(--color-gray-900);
}

.static-category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width:830px;
    margin: 0 auto;
    margin-bottom: 50px;
}

.static-category-btn {
    background-color: var(--color-very-light-gray);
    color: var(--color-dark-gray);
    border: 1px solid var(--color-light-gray);
    padding: 14px; /* Original padding */
    border-radius: 25px;
    font-family: var(--font-family-main);
    font-size: 1em;
    font-weight: normal;
    text-align: center;
    cursor: default;
    transition: background-color 0.3s ease;
    max-width:240px;
}

.static-category-btn:hover {
    background-color: var(--color-medium-gray);
}

.static-category-btn.selected {
    background: var(--color-dark-gray);
    color: var(--color-very-light-gray);
    font-weight: bold;
    border: 2px solid var(--color-dark-gray);
    box-shadow: 0 2px 8px rgba(52,58,64,0.15); /* gris oscuro */
    transition: background 0.2s, color 0.2s;
}

.category-carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.category-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    padding: 10px 20px;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.category-carousel::-webkit-scrollbar {
    display: none;
}

.category-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-card {
    min-width: 100px;
    flex-basis: calc((100% - (2 * 20px)) / 3);
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    font-size: 0.95em;
    line-height: 1.5;
    max-width: 210px;
    margin: 10px;
}
.category-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 700;
}
.category-card p {
    margin: 0;
    font-weight: 400;
    font-size: 1.2em;
}

.category-card.bg-dark-gray {
    background-color: var(--color-dark-gray);
    color: var(--color-very-light-gray);
}
.category-card.bg-dark-gray h3 {
    margin: -3px;
    color: var(--color-yellow);
}

.category-card.bg-light-gray {
    background-color: var(--color-light-gray);
    color: black;
}
.category-card.bg-light-gray h3 {
    margin: -3px;
    color: black;
}

.category-card.bg-medium-gray {
    background-color: var(--color-medium-gray);
    color: black;
}
.category-card.bg-medium-gray h3 {
    margin: -3px;
    color: var(--color-white);
}

.category-card.bg-yellow {
     background-color: var(--color-yellow);
     color: black;
}
.category-card.bg-yellow h3 {
    margin: -3px;
    color: black;
}

.carousel-nav {
    text-align: center;
    margin-top: 20px;
}
.carousel-nav button {
    background-color: var(--color-dark-gray);
    color: white;
    border: none;
    padding: 12px 18px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}
.carousel-nav button:hover:not(:disabled) {
    background-color: #555;
}
.carousel-nav button:disabled {
    background-color: var(--color-medium-gray);
    cursor: not-allowed;
}

/* 5.- Features Section */
.features-section-updated {
    padding: 60px 0;
    background-color: var(--color-very-light-gray);
}

.feature-text-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.feature-text-box {
    background-color: var(--color-very-light-gray);
    padding: 30px;
    border-radius: 20px;
    text-align: left;
    border: 1px solid var(--color-light-gray);
    font-size: 1em;
    line-height: 1.5;
    min-height: 110px;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    color: black;
    font-size: 1.3em;
}

.feature-text-box p {
    margin: 0;
}

.app-screenshots-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.app-screenshots-carousel {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px 0;
    transition: transform 0.5s ease-in-out;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.app-screenshots-carousel::-webkit-scrollbar {
    display: none;
}
.app-screenshots-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.app-screenshot {
    max-height: 520px;
    min-width: 260px;
    flex-shrink: 0;
    border-radius: 20px;
    
    object-fit: contain;
    scroll-snap-align: start;
}

/* 6.- Download CTA Section */
.download-cta-section-updated {
    background-color: var(--color-yellow);
    padding: 60px 0;
    text-align: center;
}

.download-cta-section-updated p {
    font-size: 1.6em;
    color: black;
    margin-bottom: 40px;
    font-weight: bold;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.download-cta-section-updated .app-store-buttons {
    justify-content: center;
}

/* 7.- Footer */
footer.main-footer {
    background-color: var(--color-dark-gray);
    color: var(--color-very-light-gray);
    padding: 50px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-logo-area {
    flex-basis: 40%;
}
.footer-logo-area img {
    height: 40px;
    margin-bottom: 10px;
}

.footer-logo-area p:nth-child(1) {
    font-family: var(--font-family-logo);
    font-size: 1.5em;
    max-width: 500px;
    margin: 0;
    line-height: 1.5;
    margin-top: 15px;
}
.footer-logo-area p:nth-child(2) {
    font-family: var(--font-family-main);
    font-size: 1.5em;
    max-width: 500px;
    margin: 0;
    line-height: 1.5;
    margin-top: 15px;
}

.footer-links {
    flex-basis: 20%;
    min-width: 200px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--color-very-light-gray);
    text-decoration: none;
    font-size: 1em;
}
.footer-links ul li a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--color-medium-gray);
    padding-top: 25px;
    margin-top: 25px;
    font-size: 1.3em;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section-updated .container {
        flex-direction: column;
    }
    .hero-left-box, .hero-right-content {
        flex-basis: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    .app-store-buttons {
        justify-content: center;
    }
    .feature-text-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .static-category-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .category-carousel {
        padding: 10px 15px;
    }
    .category-card {
        min-width: calc((100% - (1 * 20px)) / 2.5);
        flex-basis: auto;
    }
}

@media (max-width: 768px) {
    .static-category-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .app-screenshot {
        max-height: 450px;
        min-width: 220px;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-logo-area, .footer-links {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    .footer-logo-area p {
         margin: 0 auto 10px auto;
    }
    .hero-left-box {
        font-size: 1.2em;
        padding: 25px;
    }
    .intro-text-section p, .categories-section-updated .subtitle, .download-cta-section-updated p {
        font-size: 1.1em;
    }
    .categories-section-updated h2 {
        font-size: 1.6em;
    }
    .category-carousel {
        padding: 10px 10px;
    }
    .category-card {
        min-width: calc(100% - (2 * 10px));
        flex-basis: auto;
    }
    .footer-bottom {
        padding-top: 10px;
        margin-top: 10px;
        font-size: 1.2em;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .hero-section-updated .container {
        justify-content: flex-start;
        align-items: stretch;
        gap: 10px;
        flex-direction: row;
        padding:5px;
    }

    .hero-left-box {
        flex-basis: 40%;
        padding: 20px;
        font-size: 1em;
        border-radius: 32px;
    }

    .hero-right-content {
        max-width:180px;
    }

    .hero-right-content p, strong {
        font-size: 1.2em;
        margin: -1px;
    }

    .hero-right-content strong {
        font-size: 1.2em;
        margin: -1px;
    }

    .app-store-buttons {
        gap: 5px;
        justify-content: flex-start; 
        margin-top:20px;
    }

    .app-store-buttons img {
        max-height: 28px;
    }

    .download-cta-section-updated .app-store-buttons{
        gap: 10px;
    }

    .download-cta-section-updated .app-store-buttons img {
        max-height: 35px;
    }

    .intro-text-section p, .categories-section-updated .subtitle {
        font-size: 0.95em;
    }

    .download-cta-section-updated p {
        font-size: 1.1em;
        max-width: 280px;
    }

    .categories-section-updated h2 {
        font-size: 0.9em;
    }

    .static-category-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-carousel {
        padding: 5px 5px;
        gap: 10px;
    }

    .category-card {
        min-width: calc(100% - (2 * 15px));
        flex-basis: auto;
        min-width: 50px;
        padding: 20px;
        max-width: 140px;
        font-size: 0.75em;
        border-radius: 30px;
    }

    .feature-text-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .feature-text-box {
        padding: 20px;
        font-size: 1em;
        min-height: 110px;
        max-width: 150px;
        display: flex;
        font-weight: 400;
        border-radius: 40px;
    }

    .app-screenshot {
        max-height: 580px;
        min-width: 280px;
    }

    .footer-content {
        justify-content: flex-start; 
        align-items: stretch;
        gap: 15px;
        width: 100%;
        flex-direction: row;
    }

    .footer-logo-area {
        max-width: 170px;
        min-width: 100px;
        text-align: left;
        flex: 0 1 auto;
        margin-inline-start: 15px;
    }
    
    .footer-logo-area p {
        margin: 0px;
    }

    .footer-logo-area p:nth-child(1) {
        font-size: 1.1em;
        margin:5px;
    }
    .footer-logo-area p:nth-child(2) {
        font-size: 0.80em;
        margin:5px;
    }

    .footer-links {
        max-width: 155px; 
        min-width: 100px;
        text-align: left;
        flex: 1 1 auto;
        margin-inline-start: 20px;
    }

    .footer-links ul li a {
        font-size: 0.80em;
    }

    .footer-bottom {
        padding-top: 10px;
        margin-top: 10px;
        font-size: 1em;
        padding:5px;
    }
}

@media (max-width: 391px) {
    .category-card {
        min-width: 50px;
        padding: 20px;
        max-width: 112px;
        font-size: 0.7em;
    }

    .footer-bottom {
        font-size: 0.9em;
    }

    .footer-logo-area {
        margin-inline-start: 10px;
    }

    .footer-links {
        margin-inline-start: 5px;
    }
}

/* Mensaje de carga para el carrusel */
.carousel-loading {
    text-align: center;
    padding: 2em 0;
    color: #555;
    font-size: 1.2em;
    font-style: italic;
    width: 100%;
    display: block;
}