* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #faf8f3;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Importante para evitar scroll horizontal */
}

:root {
    --primary-color: #d4512a;
    --secondary-color: #8b4513;
    --accent-color: #f4a460;
    --green-color: #228b22;
    --dark-green: #006400;
    --cream: #faf8f3;
    --gold: #daa520;
    --earth-brown: #8b4513;
    --text-dark: #2c1810;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "🏔️";
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--gold);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section - CORREGIDO */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/pobla.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100%;
    max-width: 100vw; /* Previene desbordamiento */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    width: 90%;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Reducido el tamaño mínimo */
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.hero p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 200px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.cta-btn.secondary {
    background: transparent;
    border: 2px solid white;
}

.cta-btn.secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto;
    border-radius: 2px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card p {
    color: #666;
    line-height: 1.6;
}

/* Map Section */
.map-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

iframe {
    max-width: 100%;
    height: auto;
    width: 100%;
}

/* Responsive Design - MEJORADO */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2rem 1rem;
    }

    /* Hero ajustes para móvil */
    .hero {
        height: 100vh;
        min-height: 600px;
        padding-top: 60px;
    }

    .hero-content {
        width: 95%;
        padding: 1rem;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        margin-bottom: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-btn {
        min-width: 250px;
        padding: 12px 30px;
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    nav {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Asegurar que no haya scroll horizontal */
    body, html {
        overflow-x: hidden;
        max-width: 100%;
    }
}

/* Media query adicional para pantallas muy pequeñas */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .cta-btn {
        min-width: 200px;
        padding: 10px 25px;
    }
    
    section {
        padding: 1.5rem 0.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* Footer */
        footer {
            background: var(--text-dark);
            color: white;
            padding: 3rem 2rem 1rem;
            text-align: center;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .footer-section h4 {
            color: var(--gold);
            margin-bottom: 1rem;
        }

        .footer-section a {
            color: white;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-section a:hover {
            color: var(--gold);
        }

        .footer-bottom {
            border-top: 1px solid #444;
            padding-top: 1rem;
            margin-top: 2rem;
        }