/* ===========================================
   Merendero Los Amigos - Modern UI 2024
   =========================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #F4A261;
    --primary-dark: #e8944f;
    --secondary: #3FA87E;
    --secondary-dark: #359469;
    --accent: #24577A;
    --accent-light: #2d6a94;
    --cream: #FFF8EE;
    --cream-dark: #FFF4D6;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(244, 162, 97, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.5);
    color: white;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 17px;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--gray-200);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.btn-white {
    background: white;
    color: var(--accent);
}

.btn-white:hover {
    background: var(--gray-100);
    color: var(--accent);
}

/* ============ HEADER ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

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

.header.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.header.scrolled .logo {
    color: var(--gray-900);
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-list a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-list a:hover {
    color: white;
}

.nav-list a:hover::after {
    width: 100%;
}

.header.scrolled .nav-list a {
    color: var(--gray-700);
}

.header.scrolled .nav-list a:hover {
    color: var(--gray-900);
}

.btn-header {
    padding: 10px 20px;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 100;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header.scrolled .menu-toggle span {
    background: var(--gray-900);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(36, 87, 122, 0.92) 0%,
        rgba(36, 87, 122, 0.75) 50%,
        rgba(63, 168, 126, 0.6) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 120px 0 80px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero h1 {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    color: white;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero h1 span {
    color: var(--primary);
}

.hero-content > p {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============ STATS ============ */
.stats {
    background: var(--accent);
    padding: 0;
    margin-top: -1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.stat-item {
    padding: 48px 32px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    display: block;
    font-size: 56px;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* ============ SECTION COMMON ============ */
.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--cream);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-tag.light {
    background: rgba(255,255,255,0.15);
    color: white;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-header h2 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray-500);
    max-width: 500px;
}

.section-header.center p {
    margin: 0 auto;
}

/* ============ TESTIMONIOS ============ */
.testimonios {
    padding: 100px 0;
    background: var(--gray-50);
}

.testimonios-slider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.testimonio-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

.testimonio-card.featured {
    position: relative;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
}

.testimonio-quote {
    position: absolute;
    top: 24px;
    right: 24px;
    color: white;
    opacity: 0.2;
}

.testimonio-card.featured p {
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.testimonio-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.testimonio-author strong {
    display: block;
    font-size: 16px;
}

.testimonio-author span {
    font-size: 14px;
    opacity: 0.7;
}

.testimonios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.testimonio-card.small {
    padding: 28px;
}

.testimonio-card.small p {
    font-size: 15px;
    color: var(--gray-700);
    margin-bottom: 16px;
    font-style: italic;
}

.testimonio-card.small strong {
    font-size: 14px;
    color: var(--gray-900);
}

/* ============ NOSOTROS ============ */
.nosotros {
    padding: 100px 0;
    background: white;
}

.nosotros-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.nosotros-text h2 {
    font-size: clamp(32px, 4vw, 44px);
    margin-bottom: 24px;
}

.nosotros-text > p {
    font-size: 17px;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.7;
}

.nosotros-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--cream);
    border-radius: var(--radius);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.feature span {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
}

.nosotros-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.main {
    grid-row: span 2;
}

/* ============ GALERIA MARQUEE ============ */
.galeria-section {
    padding: 60px 0;
    background: var(--cream);
    overflow: hidden;
}

.galeria-marquee {
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 20px;
    animation: marquee 40s linear infinite;
    width: max-content;
}

.marquee-track img {
    height: 220px;
    width: auto;
    border-radius: var(--radius);
    object-fit: cover;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ AYUDAR ============ */
.ayudar {
    padding: 100px 0;
    background: white;
}

.ayudar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.ayudar-card {
    background: var(--gray-50);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

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

.ayudar-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.ayudar-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.ayudar-card.highlight h3,
.ayudar-card.highlight p {
    color: white;
}

.card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon.orange {
    background: rgba(244, 162, 97, 0.15);
    color: var(--primary);
}

.card-icon.green {
    background: rgba(63, 168, 126, 0.15);
    color: var(--secondary);
}

.card-icon.blue {
    background: rgba(36, 87, 122, 0.15);
    color: var(--accent);
}

.card-icon.white {
    background: rgba(255,255,255,0.2);
    color: white;
}

.ayudar-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.ayudar-card p {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.6;
}

.ayudar-card .btn {
    width: 100%;
}

/* ============ CONTACTO ============ */
.contacto {
    padding: 100px 0;
    background: var(--accent);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.contacto-info h2 {
    color: white;
    font-size: clamp(32px, 4vw, 44px);
    margin-bottom: 16px;
}

.contacto-info > p {
    color: rgba(255,255,255,0.7);
    font-size: 17px;
    margin-bottom: 40px;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.info-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.info-card strong {
    display: block;
    color: white;
    font-size: 14px;
    margin-bottom: 4px;
}

.info-card p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    line-height: 1.5;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: #25D366;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    color: white;
}

.contacto-mapa {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-xl);
}

.contacto-mapa iframe {
    width: 100%;
    height: 100%;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--gray-900);
    padding: 60px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer .logo {
    color: white;
}

.footer-brand p {
    color: var(--gray-500);
    margin-top: 8px;
    font-size: 15px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--gray-500);
    font-size: 15px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .testimonios-slider {
        grid-template-columns: 1fr;
    }

    .testimonios-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ayudar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nosotros-content {
        gap: 48px;
    }
}

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

    .header {
        padding: 12px 0;
    }

    .header .container {
        padding: 0 16px;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--accent);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99;
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .nav-list a {
        font-size: 24px;
        color: white;
    }

    .nav-list a::after {
        display: none;
    }

    .btn-header {
        display: none;
    }

    .menu-toggle {
        display: flex;
        z-index: 100;
    }

    .menu-toggle.open span {
        background: white;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        min-height: 100svh;
    }

    .hero-content {
        padding: 120px 0 80px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-content > p {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-scroll {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 24px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

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

    .stat-number {
        font-size: 40px;
    }

    .stat-label {
        font-size: 14px;
    }

    .testimonios {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .testimonios-grid {
        grid-template-columns: 1fr;
    }

    .testimonio-card {
        padding: 24px;
    }

    .testimonio-card.featured {
        padding: 28px;
    }

    .testimonio-card.featured p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .testimonio-author {
        gap: 12px;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .nosotros {
        padding: 60px 0;
    }

    .nosotros-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nosotros-gallery {
        order: -1;
        max-height: 300px;
    }

    .nosotros-gallery .gallery-item {
        max-height: 150px;
    }

    .nosotros-gallery .gallery-item.main {
        grid-row: span 1;
    }

    .nosotros-text h2 {
        font-size: 28px;
    }

    .nosotros-text > p {
        font-size: 15px;
    }

    .nosotros-features {
        flex-direction: column;
        gap: 12px;
    }

    .feature {
        padding: 10px 16px;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
    }

    .feature span {
        font-size: 13px;
    }

    .galeria-section {
        padding: 40px 0;
    }

    .marquee-track img {
        height: 150px;
    }

    .ayudar {
        padding: 60px 0;
    }

    .ayudar-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ayudar-card {
        padding: 28px 24px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .ayudar-card h3 {
        font-size: 18px;
    }

    .ayudar-card p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .contacto {
        padding: 60px 0;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contacto-mapa {
        height: 250px;
        order: -1;
    }

    .contacto-info h2 {
        font-size: 28px;
    }

    .contacto-info > p {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .info-cards {
        gap: 12px;
        margin-bottom: 24px;
    }

    .info-card {
        padding: 16px;
        gap: 12px;
    }

    .info-icon {
        width: 44px;
        height: 44px;
    }

    .whatsapp-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        padding-bottom: 32px;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .footer-bottom p {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 30px;
    }

    .stat-number {
        font-size: 36px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .testimonio-card.featured p {
        font-size: 15px;
    }

    .contacto-info h2,
    .nosotros-text h2 {
        font-size: 24px;
    }
}
