/* ============================================================
   AGROECOLOGÍA - ESTILOS CSS ESTRUCTURADOS
   ============================================================
   
   ESTRUCTURA:
   1. RESET & GENERALES
   2. COMPONENTES GENERALES (aplican a todo)
   3. SECCIONES (HERO, ABOUT, FEATURES, etc.) - ESTILOS MÓVIL
   4. MEDIA QUERIES DESKTOP (min-width: 768px)
   
   ============================================================ */

/* ============================================================
   1. RESET & ESTILOS GENERALES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    color: #333;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================================
   2. COMPONENTES GENERALES
   ============================================================ */

/* BOTONES */
.btn-primary {
    display: inline-block;
    background: #f4b400;
    color: #000;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
}

.btn-primary:hover {
    background: #ffcc00;
}

/* CONTAINER */
.container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   3. SECCIONES - ESTILOS MÓVIL (Base)
   ============================================================ */

/* ========== HERO ========== */
.hero {
    display: flex;
    align-items: center;

    min-height: 100vh;
    padding: 80px 8%;
    /* background: #107F7F; verde */
    background: url('') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(16,127,127,0.9) 40%,
        rgba(16,127,127,0.6) 100%
    );
}

.hero-media {
    width: 100%;
}

.hero-image img {
    height: 500px;
}

.hero-media video {
    width: 100%;
    height: auto;
    display: block;  
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-logo {
    width: 600px;
    margin-bottom: 30px;
}

.hero-banner {
    width: 80%;
    max-width: 450px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-qr {
    text-align: center;
    margin-top: 20px;
}

.hero-qr img {
    margin: 0 auto 8px;
}

/* ========== ABOUT ========== */
.about h2 {
    text-align: center;
    font-size: 28px;
    color: #107F7F;
    margin-bottom: 30px;
}

.about p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.about blockquote {
    background: #f6b500;
    padding: 16px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
}

.logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logos img {
    height: 40px;
}

/* ========== FEATURES ========== */
.features {
    background: #107F7F;
    color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    text-align: center;
}

.feature-item img {
    width: 48px;
    margin: 0 auto 12px;
}

.cycle {
    text-align: center;
    font-weight: bold;
}

/* ========== STORIES ========== */
.stories h2 {
    text-align: center;
    margin-bottom: 40px;
}

.stories-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.story-card {
    flex: 0 0 100%;
    background: #f6b500;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start;
}

.story-card img {
    height: 200px;
    object-fit: cover;
}

.story-card h3 {
    font-size: 16px;
    margin: 12px;
}

.story-card p {
    font-size: 14px;
    margin: 0 12px 12px;
}

.story-btn {
    background: #107F7F;
    color: white;
    text-align: center;
    padding: 12px;
    cursor: pointer;
}

/* ========== CARDS SECCIÓN 2 (Campaña) ========== */
.cards-section {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
    padding: 2rem;
    background: #f3f7f2;
    flex-wrap: wrap;
}

.card {
    background: #eaf3e7;
    border-radius: 18px;
    max-width: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    flex-grow: 1;
}

.card-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #3f4f3c;
}

.card-btn {
    margin-top: auto;
    background: #3e6b3e;
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.card-btn:hover {
    background: #2f5330;
}

/* ========== YOUTUBE CARDS (Historias Reales) ========== */
.youtube-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 2rem;
    background: #eef5ec;
    flex-wrap: wrap;
}

.yt-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    max-width: 320px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.yt-card img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.yt-card h3 {
    margin: 0.5rem 0;
    color: #244b3a;
}

.yt-card p {
    font-size: 0.95rem;
    color: #4d5f57;
}

.yt-btn {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    margin: 1rem 0;
    transition: background 0.3s ease;
    margin-top: auto;
}

.yt-btn:hover {
    background: #c62828;
}

.yt-embed {
    display: none;
    margin-top: 1rem;
}

.yt-embed iframe {
    width: 100%;
    height: 180px;
    border-radius: 12px;
}

/* ========== COMMUNITY BLOCK (Encuentros y Espacios) ========== */
.community-block {
    max-width: 1100px;
    margin: 3rem auto;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.community-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.community-items {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid #e6ece8;
}

.item {
    padding: 2rem 1.5rem;
    text-align: center;
    border-right: none;
    border-bottom: 1px solid #e6ece8;
}

.item:last-child {
    border-bottom: none;
}

.icon {
    font-size: 2rem;
    color: #4b7b4b;
    display: block;
    margin-bottom: 0.8rem;
}

.item h3 {
    margin-bottom: 0.5rem;
    color: #2f4f3a;
    font-weight: 600;
}

.item p {
    font-size: 0.95rem;
    color: #5b6f65;
    line-height: 1.4;
}

.community-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #f6faf5;
}

.community-footer p {
    margin-bottom: 1rem;
    color: #3f554a;

}

/* ========== TESTIMONIALS ========== */
.testimonials {
    background: #f5f5f5;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 40px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.testimonials figure {
    text-align: center;
}

.testimonials figcaption {
    font-size: 16px;
    margin-top: 12px;
}

/* ========== JOIN ========== */
.join {
    background: #107F7F;
    color: white;
    text-align: center;
}

.join p {
    margin-bottom: 24px;
}

.join-qr img {
    width: 140px;
    margin: 20px auto 0;
}

/* ========== EXTRAS / TABS ========== */
.extras {
    padding: 80px 60px;
}

.extras h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #107F7F;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tab {
    padding: 12px 24px;
    border: 2px solid #107F7F;
    background: transparent;
    color: #107F7F;
    cursor: pointer;
    border-radius: 30px;
    font-weight: bold;
}

.tab.active {
    background: #107F7F;
    color: #ffffff;
}

.tab-content {
    display: none;
    max-width: 800px;
    margin: auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
}

.tab-content.active {
    display: block;
}

/* ========== FOOTER ========== */
.footer {
    background: #107F7F;
    color: white;
    text-align: center;
    padding: 40px 20px;
            border-top: 2px solid rgba(255, 255, 255, 0.25);
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    
    flex-wrap: wrap;
    gap: 20px;

    margin: 30px auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    max-width: 1100px;
}

.Footer-Logo {
    max-height: 170px;  /* mejor usar max-height */
    height: auto;
    max-width: 100%;
}

/*ICONS SOCIAL MEDIA*/

.SocialMedia-icon{
    display: flex;
    justify-content: center;
    gap: 5%;
 

}

.SocialMedia-icons {
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 13.5px;

}

.SocialMedia-icon a:hover .SocialMedia-icons {
    transform: translateY(-5px);
    opacity: 0.8;
}



/* ============================================================
   4. MEDIA QUERIES - TABLET (max-width: 900px)
   ============================================================ */

@media (max-width: 900px) {
    .cards-section {
        gap: 1.5rem;
    }

    .community-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .item:nth-child(2) {
        border-right: none;
        border-bottom: 1px solid #e6ece8;
    }

    .item:nth-child(3) {
        border-bottom: 1px solid #e6ece8;
    }


}

/* ============================================================
   5. MEDIA QUERIES - MÓVIL PEQUEÑO (max-width: 500px)
   ============================================================ */

@media (max-width: 500px) {
    .community-items {
        grid-template-columns: 1fr;
    }

    .item {
        border-right: none;
        border-bottom: 1px solid #e6ece8;
    }

    .item:last-child {
        border-bottom: none;
    }

    .footer-logos{
        flex-direction: column;
        gap: 20px;
    }

    .Footer-Logo{
        max-height: 130px;
        width: auto;
    }
}

/* ============================================================
   6. MEDIA QUERIES - DESKTOP (min-width: 768px)
   ============================================================ */

@media (min-width: 768px) {
    
    /* HERO DESKTOP */
    .hero {
        min-height: 100vh;
        display: flex;
        /* flex-direction: row;
        align-items: center; */
        justify-content: space-around;
        padding: 80px 8%;
        gap: 40px;
    }

    .hero-content {
        width: 55%;
        text-align: left;
    }

    .hero-image {
        width: 45%;
        display: flex;
        justify-content: flex-end;
    }

    .hero-image img {
        height: 520px;
        max-width: 100%;
    }

    /* STORIES DESKTOP */
    .stories-slider {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        overflow: visible;
    }

    .story-card {
        width: 100%;
        flex: none;
    }

    /* FEATURES DESKTOP */
    .features-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* TESTIMONIALS DESKTOP */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* COMMUNITY ITEMS DESKTOP */
    .community-items {
        grid-template-columns: repeat(4, 1fr);
    }

    .item {
        border-right: 1px solid #e6ece8;
        border-bottom: none;
    }

    .item:last-child {
        border-right: none;
    }

    .item:nth-child(2) {
        border-right: 1px solid #e6ece8;
    }

    .SocialMedia-icon {
        margin-top: 15px;
        gap: 20px;
    }
    
}

.card-content {
    text-align: center;
}

.card-frase {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: 10px;
    background-color: #2e7d32;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
