/* CSS styles will go here */

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
    background: transparent;
    padding: 20px;
}

.loading-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

* {
    box-sizing: border-box;
}

:root {
    --header-height: 60px; /* Default to mobile height */
    --header-height-mobile: 60px;
    --vh: 1vh; /* Fallback for viewport height */
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a; /* Match main section background */
    color: #F2F2F2;
    scroll-behavior: smooth;
    overflow-x: hidden; /* This prevents horizontal scrolling */
    width: 100%;
    max-width: 100%;
}

html {
    overflow-x: hidden; /* Also prevent horizontal scrolling on html */
    width: 100%;
    max-width: 100%;
}

html.no-scroll,
body.body-no-scroll {
    overflow: hidden;
}

.top-header {
    position: fixed; /* Changed from sticky to fixed */
    top: 0;
    z-index: 1000;
    background-color: #3f484e; /* User-specified grey */
    padding: 0; /* Remove padding */
    display: flex;
    justify-content: space-between; /* Adjust alignment */
    align-items: center;
    height: var(--header-height); /* Set explicit height */
    width: 100%;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.top-header.hidden {
    transform: translateY(-100%);
}

.desktop-nav {
    padding-right: 20px; /* Add padding to the right of the nav */
}

.top-header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.top-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
    transition: color 0.3s;
    font-size: 0.9em; /* Reduce font size */
}

.top-header nav a:hover {
    color: #a8b720;
}

.top-header img {
    height: var(--header-height); /* Use CSS variable for consistency */
    clip-path: inset(1px);
    display: block; /* Ensure it behaves as a block element */
}

.top-header img.banner {
    height: var(--header-height);
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
}

.desktop-banner {
    margin-left: 0; /* Explicitly remove left margin */
    padding-left: 0; /* Explicitly remove left padding */
}

.hero {
    position: relative;
    height: 100vh; /* Use standard vh for desktop */
    min-height: 100vh; /* Ensure minimum height */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 0; /* Remove any bottom margin */
}

.comunidad-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Match parent height */
    z-index: 1;
    pointer-events: none;
}

.comunidad-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
}

.comunidad-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Match parent height */
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    max-width: 800px;
    width: 90%;
    text-align: center;
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 0.5em;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 1.5em;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Increased to ensure it's above all hero content */
}

.scroll-down-arrow a {
    color: white;
    font-size: 2em;
    text-decoration: none;
    display: inline-block; /* Add this to allow transforms */
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.cta-button {
    background-color: #a8b720;
    color: #333;
    padding: 1em 2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.cta-button:hover {
    background-color: #8c9a1c;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 1;
}

main {
    padding: 1em;
    background-color: #1a1a1a; /* Dark background */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    margin-top: 0; /* Ensure no gap between hero and main content */
}

#faq {
    position: relative;
    overflow: hidden;
    margin-left: calc(-1em);
    margin-right: calc(-1em);
    width: calc(100% + 2em);
}

@media (max-width: 768px) {
    #faq {
        margin-left: calc(-0.5em);
        margin-right: calc(-0.5em);
        width: calc(100% + 1em);
    }
}

section {
    padding: 3.5em 0; /* Increased vertical spacing */
    min-height: auto; /* Ensure height is based on content */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    scroll-margin-top: var(--header-height);
}

/* Remove bottom padding from the last section to reduce space before the footer */
main section:last-of-type {
    padding-bottom: 2em;
}

#about {
    margin: 7em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#about p {
    max-width: 600px;
    margin: 0 auto 2em auto;
    text-align: center;
    font-size: 1.2em;
    line-height: 1.6;
}

h2 {
    text-align: center;
    margin-bottom: 0.5em; /* Reduced margin */
    font-size: 2.5em;
}

.features {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5em;
    margin-top: 2em;
    text-align: center;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 0;
    min-width: 120px;
    max-width: 180px;
}

.feature img {
    margin-bottom: 0.7em;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.program-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5em;
}

.card {
    background-color: #2a2a2a; /* Darker card background */
    border: 1px solid #444;
    border-radius: 10px;
    padding: 1.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

/* Activity List Styles */
.activity-list {
    max-width: 800px;
    margin: 0 auto;
}

.activity-item {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    margin-bottom: 1em;
    overflow: hidden;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em;
    cursor: pointer;
}

.activity-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.toggle-icon {
    font-size: 2em;
    font-weight: bold;
    transition: transform 0.3s;
}

.activity-content {
    padding: 0 1.5em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.activity-item.active .activity-content {
    max-height: 1000px; /* Large enough to fit image and text */
    padding: 1.5em;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), padding 0.3s ease-in-out;
}

.activity-content img.dropdown-image {
    width: 100%;
    max-width: 350px;
    margin: 1em auto 0 auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    height: auto;
    object-fit: cover;
    /* Add fallback for when image fails to load */
    background-color: #f5f5f5;
    min-height: 200px;
}

.activity-item.active .toggle-icon {
    transform: rotate(45deg);
}

.testimonial {
    text-align: center;
    margin-bottom: 2em;
}

blockquote {
    font-style: italic;
    font-size: 1.2em;
}

cite {
    display: block;
    margin-top: 0.5em;
    font-weight: bold;
}

.faq-item {
    margin-bottom: 1em;
}

#contact-form {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1em; /* Add padding for mobile */
}

#contact-form input, #contact-form textarea {
    padding: 1em;
    margin-bottom: 1em;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: #f4f4f4;
}

#contact-form textarea {
    resize: none !important; /* Specifically prevent textarea resizing */
    min-height: 120px !important; /* Set a fixed minimum height */
    max-height: 120px !important; /* Set a fixed maximum height */
    height: 120px !important; /* Set fixed height */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
}

#contact-form button {
    background-color: #a8b720;
    color: #333;
    padding: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background-color: #8c9a1c;
}

#contact h2 + p {
    text-align: center;
}

#form-status {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  margin-top: 1rem;
  font-weight: 600;
  height: 1.2em; /* Reserve space to avoid layout shift */
  text-align: center;
}

/* Email Contact CTA Section */
#email-contact {
    text-align: center;
    padding: 2em 0;
    background-color: #2a2a2a;
    margin: 2em 0;
    border-radius: 10px;
}

.email-contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.email-contact-content h2 {
    color: #fff;
    margin-bottom: 0.5em;
    font-size: 2em;
}

.email-contact-content p {
    color: #ccc;
    margin-bottom: 1.5em;
    font-size: 1.1em;
}

.email-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background-color: #a8b720;
    color: #333;
    padding: 1em 2em;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(168, 183, 32, 0.3);
}

.email-cta-button:hover {
    background-color: #8c9a1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(168, 183, 32, 0.4);
}

.email-cta-button i {
    font-size: 1.2em;
}

footer {
    background-color: #222; /* Slightly lighter dark for footer */
    color: white;
    text-align: center;
    padding: 2em;
}

.social-media {
    margin-bottom: 1em;
}

.social-media a {
    color: white;
    margin: 0 1em;
    text-decoration: none;
    font-size: 2em; /* Make icons bigger */
    transition: color 0.3s;
}

.social-media a:hover {
    color: #a8b720; /* Lime green on hover */
}

.footer-info p {
    margin: 0.5em 0;
}

.copyright {
    margin-top: 2em;
    font-size: 0.9em;
    color: #aaa;
}

/* New Mobile Menu Styles */
.hamburger-icon {
    display: none; /* Hidden by default, shown in media query */
    width: 30px;
    height: 22px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-right: 20px;
    z-index: 2001; /* Ensure it's above the side menu */
    position: relative;
}

.hamburger-icon .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.4s ease-in-out;
    border-radius: 2px;
}

.hamburger-icon.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-icon.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.98); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
    z-index: 1999; /* Lower than hamburger icon */
}

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

.side-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.side-menu nav li {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.side-menu.active nav li {
    opacity: 1;
    transform: translateX(0);
}

/* Add sequential transition delay for a staggered effect */
.side-menu.active nav ul li:nth-child(1) {
    transition-delay: 0.1s;
}
.side-menu.active nav ul li:nth-child(2) {
    transition-delay: 0.2s;
}
.side-menu.active nav ul li:nth-child(3) {
    transition-delay: 0.3s;
}
.side-menu.active nav ul li:nth-child(4) {
    transition-delay: 0.4s;
}
.side-menu.active nav ul li:nth-child(5) {
    transition-delay: 0.5s;
}
.side-menu.active nav ul li:nth-child(6) {
    transition-delay: 0.6s;
}

.side-menu nav a {
    color: white;
    text-decoration: none;
    font-size: 1.8em; /* Reduced font size for overlay menu */
    font-weight: 600;
    display: block;
    padding: 15px;
    transition: color 0.3s;
}

.side-menu nav a:hover {
    color: #a8b720;
}

/* Remove obsolete styles */
.mobile-header,
.mobile-menu-icon,
.close-menu-icon {
    display: none;
}

/* FAQ Section Background Video */
#faq {
    position: relative;
    overflow: hidden;
}
.faq-video-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.faq-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
}
.faq-video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,26,26,0.7);
    z-index: 2;
}
.faq-content {
    position: relative;
    z-index: 3;
    padding-left: 2em;
    padding-right: 2em;
}

#faq h2, #faq .faq-item {
    color: #fff;
}

.comunidad-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 700px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em 3em;
}
.comunidad-list li {
    background: none;
    color: #fff;
    font-size: 1.5em;
    margin: 0;
    padding: 0.2em 0.8em;
    border-radius: 0.5em;
    box-shadow: none;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
    display: inline-block;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.comunidad-list li:hover {
    background: rgba(168,183,32,0.18);
    color: #a8b720;
}

.comunidad-content {
    position: relative;
    z-index: 3;
    padding: 3em 2em 2em 2em;
    max-width: 900px;
    margin: 0 auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
    text-align: center;
}
.comunidad-content h2 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 1.5em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#comunidad {
    position: relative;
    padding: 8em 0;
    margin-left: calc(-1em);
    margin-right: calc(-1em);
    width: calc(100% + 2em);
    text-align: center;
    overflow: hidden;
    color: #fff; /* Ensure text is visible on dark background */
    min-height: 100vh; /* Make section full height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #1a1a1a;
}

#comunidad::before,
#comunidad::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: #1a1a1a;
    z-index: 2;
}

#comunidad::before {
    top: 0;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
}

#comunidad::after {
    bottom: 0;
    clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

#comunidad .image-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#comunidad .image-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        #1a1a1a 0%, 
        rgba(26, 26, 26, 0.6) 15%, 
        rgba(26, 26, 26, 0) 35%, 
        rgba(26, 26, 26, 0) 65%, 
        rgba(26, 26, 26, 0.6) 85%, 
        #1a1a1a 100%
    );
    z-index: 2;
}

#comunidad .image-carousel .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

#comunidad .image-carousel .carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

#comunidad .comunidad-content {
    position: relative;
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.5); /* Add a semi-transparent overlay to improve text readability */
    padding: 2em;
    border-radius: 10px;
}

.floating-whatsapp {
    position: fixed;
    bottom: 80px; /* Increased from 20px to avoid Android nav bar */
    right: 20px;
    background-color: #25D366; /* WhatsApp Color */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 2.5em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999; /* Increased z-index to ensure visibility */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s, visibility 0.4s, transform 0.4s ease-out;
}

.floating-whatsapp.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-whatsapp:hover {
    background-color: #1EBE57;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transition: all 0.3s ease-out;
}

.floating-whatsapp i {
    position: relative;
    top: 1px;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for multiple elements */
.stagger-delay-1 {
    transition-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
}

.stagger-delay-4 {
    transition-delay: 0.4s;
}

.stagger-delay-5 {
    transition-delay: 0.5s;
}

/* Floating animation for special elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for call-to-action elements */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced card hover with scroll animation */
.card.fade-in {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.card.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.card.fade-in.visible:hover {
    transform: translateY(-10px);
}

/* Feature boxes with enhanced animations */
.feature.scale-in {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.feature.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Activity items with slide animations */
.activity-item.fade-in {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.activity-item.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop styles - override mobile-first approach */
@media (min-width: 769px) {
    :root {
        --header-height: 90px; /* Desktop header height */
    }
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden; /* Prevent horizontal scrolling on mobile */
    }

    main {
        padding: 0.5em;
        overflow-x: hidden; /* Prevent horizontal scrolling on mobile */
    }

    .top-header {
        justify-content: space-between; /* Space between logo and hamburger */
        position: fixed; /* Keep fixed positioning on mobile too */
        top: 0;
        z-index: 2000; /* Above the menu overlay */
        width: 100%;
        padding: 0 10px; /* Add some padding for mobile */
        height: var(--header-height); /* Use CSS variable for consistency */
        transform: translateY(0);
        transition: transform 0.3s ease-in-out;
    }

    .top-header.hidden {
        transform: translateY(-100%);
    }

    .desktop-nav {
        display: none; /* Hide desktop nav */
    }

    .hamburger-icon {
        display: block; /* Show hamburger icon */
        z-index: 2001; /* Above the menu overlay */
        position: relative; /* Ensure it stays above overlay */
    }

    .hero {
        height: 100vh; /* Use standard vh on mobile */
        min-height: 100vh; /* Ensure minimum height */
        max-height: 100vh; /* Prevent overflow */
    }

    .hero-content h1 {
        font-size: 2.5em; /* Adjust font size for mobile */
    }

    .hero-content p {
        font-size: 1.2em; /* Adjust font size for mobile */
    }

    .features {
        flex-direction: column; /* Stack features vertically */
        align-items: center;
        gap: 2em;
    }

    section {
        padding: 2.5em 0.5em; /* Adjust section padding */
        scroll-margin-top: var(--header-height);
    }

    #about {
        margin: 2em 0; /* Reduce top margin on mobile */
    }

    #comunidad {
        margin-left: calc(-0.5em);
        margin-right: calc(-0.5em);
        width: calc(100% + 1em);
        padding: 4em 0; /* Reduce padding on mobile */
        min-height: 80vh; /* Reduce height on mobile */
    }

    #comunidad .comunidad-content {
        padding: 1.5em 1em; /* Reduce padding on mobile */
        margin: 0 1em; /* Add margin for better spacing */
        background-color: rgba(0, 0, 0, 0.7); /* Increase opacity for better text visibility */
    }

    #comunidad .comunidad-content h2 {
        font-size: 2em; /* Slightly smaller on mobile */
        margin-bottom: 1em;
    }

    .comunidad-list {
        font-size: 1.1em; /* Slightly smaller on mobile */
    }

    .comunidad-list li {
        margin: 0.8em 0; /* Reduce spacing between items */
        padding: 0.8em; /* Add padding for better touch targets */
        background-color: rgba(168, 183, 32, 0.1); /* Subtle background for better visibility */
        border-radius: 8px;
        border-left: 3px solid #a8b720;
    }
    
    /* Reduce animation distance on mobile */
    .fade-in {
        transform: translateY(20px);
    }
    
    .fade-in-left {
        transform: translateX(-30px);
    }
    
    .fade-in-right {
        transform: translateX(30px);
    }
    
    .slide-up {
        transform: translateY(30px);
    }

    .scroll-down-arrow {
        bottom: 80px; /* Increased from 50px to avoid Android nav bar overlap */
        z-index: 10; /* Ensure it stays above all content */
    }

    .scroll-down-arrow a {
        font-size: 1.8em; /* Slightly smaller on mobile */
        padding: 10px; /* Add touch-friendly padding */
    }

    /* Mobile contact form adjustments */
    #contact-form {
        max-width: 100%;
        padding: 0 0.5em;
    }
}
