/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #006837;
    --color-secondary: #4CAF50;
    --color-accent: #FFC107;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #ffffff;
    --color-bg-light: #f5f5f5;
    --color-border: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

/* Header y Navegación */
header {
    background-color: var(--color-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

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

.top-bar a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
}

nav {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section with Carousel */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 104, 55, 0.85) 0%, rgba(76, 175, 80, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.btn-hero {
    padding: 15px 40px;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    border-radius: 5px;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active,
.dot:hover {
    background: white;
    transform: scale(1.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero responsivo */
@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-nav {
        font-size: 1.5rem;
        padding: 10px 15px;
    }
    
    .hero-prev {
        left: 10px;
    }
    
    .hero-next {
        right: 10px;
    }
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--color-accent);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn:hover {
    background-color: #FFD54F;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 104, 55, 0.3);
}

.btn-primary:hover {
    background-color: #005028;
    box-shadow: 0 8px 25px rgba(0, 104, 55, 0.4);
}

/* Secciones */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--color-bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Grid de Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 2rem;
}

.card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 600;
}

.card-text {
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.card-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 15px;
    flex-wrap: wrap;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sobre Nosotros */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 3rem;
}

.about-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.values-list {
    list-style: none;
    margin-top: 2rem;
}

.values-list li {
    padding: 10px 0 10px 30px;
    position: relative;
    margin-bottom: 10px;
}

.values-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Proyectos */
.project-card {
    position: relative;
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Aliados */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    margin-top: 3rem;
}

.logo-item {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.logo-item img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

/* Testimonios */
.testimonial {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial:before {
    content: '"';
    font-size: 4rem;
    color: var(--color-secondary);
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.testimonial-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Formulario de Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 3rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item p {
    color: var(--color-text-light);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.stat-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 3rem;
    color: var(--color-primary);
    font-weight: bold;
    display: block;
}

.stat-label {
    color: var(--color-text-light);
    margin-top: 10px;
}

/* Mapa */
.map-container {
    margin-top: 3rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container img {
    width: 100%;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .logos-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
