/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c30;
    --light-green: #6b9b4a;
    --accent-gold: #daa520;
    --accent-yellow: #f4a430;
    --earth-brown: #8b6f47;
    --light-brown: #a0826d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #6c757d;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(45, 80, 22, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    color: var(--accent-gold);
}

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--bg-white);
    letter-spacing: 2px;
}

.nav-tagline {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-style: italic;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.nav-contact-btn {
    padding: 0.7rem 1.5rem;
    background: var(--accent-gold);
    color: var(--primary-green);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-contact-btn svg {
    width: 18px;
    height: 18px;
}

.nav-contact-btn:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 85vh;
    margin-top: 70px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

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

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 900px;
}

.carousel-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out;
}

.carousel-subtitle {
    font-size: 1.5rem;
    color: var(--accent-gold);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(45, 80, 22, 0.7);
    color: white;
    border: none;
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(45, 80, 22, 0.95);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

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

.indicator.active {
    background: var(--accent-gold);
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

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

/* Section Headers & Decorators */
.section-decorator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.5;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    padding: 0.3rem 1rem;
    background: rgba(218, 165, 32, 0.1);
    border-radius: 20px;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin: 1rem 0;
}

.contact-section .section-header h2 {
    color: white;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-green), var(--accent-gold));
    margin: 1rem auto;
    border-radius: 2px;
}

.title-underline.light {
    background: linear-gradient(90deg, white, var(--accent-gold));
}

/* About Section */
.about-section {
    padding: 6rem 2rem;
    background: var(--bg-white);
    position: relative;
}

.about-section h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Stats Section */
.stats-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Services Section */
.services-section {
    padding: 6rem 2rem;
    background: var(--bg-light);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(74, 124, 48, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 165, 32, 0.03) 0%, transparent 50%);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Centrar último elemento si queda solo */
.service-card:last-child:nth-child(4n+1) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 124, 48, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-top-color: var(--secondary-green);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.1), rgba(74, 124, 48, 0.1));
    border-radius: 50%;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.2), rgba(74, 124, 48, 0.2));
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-gray);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Values Section */
.values-section {
    padding: 6rem 2rem;
    background: white;
    position: relative;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Centrar último elemento si queda solo */
.value-item:last-child:nth-child(5n+1) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.value-item {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-item::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    background: var(--accent-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.value-item:hover {
    background: white;
    box-shadow: 0 5px 15px var(--shadow);
    border-left-color: var(--accent-gold);
    transform: translateX(5px);
}

.value-item:hover::after {
    opacity: 1;
    transform: scale(1);
}

.value-item h4 {
    font-size: 1.3rem;
    color: var(--primary-green);
    margin-bottom: 0.8rem;
}

.value-item p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--secondary-green) 100%);
    color: white;
    position: relative;
}

.contact-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: white;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(44, 62, 80, 0.5);
}

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

.form-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--accent-gold);
    color: var(--primary-green);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.form-submit-btn svg {
    width: 20px;
    height: 20px;
}

.form-submit-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4);
}

.form-submit-btn:active {
    transform: translateY(-1px);
}

/* Success Message */
.form-success {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    animation: fadeInScale 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease 0.2s backwards;
}

.form-success h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.form-success p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Contact Form Responsive */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-submit-btn {
        font-size: 1rem;
    }
}

/* Footer */
.footer {
    background: var(--primary-green);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-gold);
}

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

.footer-logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: white;
}

.footer-tagline {
    color: var(--accent-gold);
    font-style: italic;
    font-size: 0.95rem;
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-info-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.footer-info-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: var(--accent-gold);
    background: rgba(218, 165, 32, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-info-icon svg {
    width: 20px;
    height: 20px;
}

.footer-info-text {
    flex: 1;
}

.footer-info-text p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

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

.footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-main {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-title {
        font-size: 2rem;
    }

    .carousel-subtitle {
        font-size: 1.1rem;
    }

    .about-section h2,
    .services-section h2,
    .values-section h2,
    .contact-section h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stats-grid {
        gap: 1.5rem;
    }

    /* Ocultar flechas del carousel en mobile (se usa swipe) */
    .carousel-control {
        display: none;
    }

    /* Navbar en mobile */
    .nav-container {
        padding: 0.8rem 1rem;
        justify-content: space-between;
    }

    .logo-container {
        gap: 0.7rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-tagline {
        font-size: 0.7rem;
    }

    .nav-contact-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .nav-contact-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .nav-contact-btn span {
        display: none;
    }

    .nav-contact-btn {
        padding: 0.7rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    .nav-contact-btn svg {
        width: 18px;
        height: 18px;
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .carousel-subtitle {
        font-size: 1rem;
    }

    .hero-carousel {
        height: 70vh;
    }
}
