/* ============================================
   RESET Y BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(105, 168, 67, 0.25);
    color: #1a3a0f;
}

/* ============================================
   CONTENEDOR
   ============================================ */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.3s ease;
}

.header--scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* NAV */
nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 8px;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
    letter-spacing: 0.01em;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: #69A843;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

nav a:hover {
    color: #69A843;
    background-color: rgba(105, 168, 67, 0.06);
}

nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(165deg, #eef5ec 0%, #f8faf7 45%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(105, 168, 67, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #1a3a0f;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.1rem;
    color: #6b6b6b;
    margin-bottom: 35px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero > * {
    position: relative;
    z-index: 1;
}


/* BOTÓN */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #69A843 0%, #4c7c31 100%);
    color: #fff;
    padding: 14px 36px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(105, 168, 67, 0.35), 
                0 2px 8px rgba(105, 168, 67, 0.2);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(105, 168, 67, 0.4), 
                0 5px 15px rgba(105, 168, 67, 0.25);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* ============================================
   SECCIONES
   ============================================ */
.services,
.trust,
.contact {
    padding: 90px 20px;
    text-align: center;
}

.services {
    background: #ffffff;
    overflow: hidden;
}

.services h2,
.trust h2,
.contact h2 {
    font-size: 2.3rem;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
    color: #1a3a0f;
}

.services h2::after,
.trust h2::after,
.contact h2::after {
    content: "";
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #69A843, #8bc34a);
    display: block;
    margin: 16px auto 0;
    border-radius: 4px;
}

.section-subtitle {
    color: #888;
    font-size: 1rem;
    margin-top: -30px;
    margin-bottom: 50px;
}

/* ============================================
   GRID Y CARDS
   ============================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;

    max-width: 1100px; /* 🔥 evita que se estire demasiado */
    margin: 0 auto;
}

.trust .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 🔥 SOLO 3 columnas */
    gap: 30px;
    max-width: 900px; /* 🔥 limita el ancho como el mockup */
}  

.card {
    background: #fff;
    border-radius: 18px;
    padding: 35px 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04),
                0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #69A843, #8bc34a);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    border-radius: 16px 16px 0 0;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(105, 168, 67, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08),
                0 8px 20px rgba(105, 168, 67, 0.12);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(105, 168, 67, 0.1), rgba(105, 168, 67, 0.05));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #69A843;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(105, 168, 67, 0.15), rgba(105, 168, 67, 0.08));
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.card p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.6;
}

/* ============================================
   TRUST
   ============================================ */
.trust {
    background: linear-gradient(180deg, #f5f7f4 0%, #eef5ec 100%);
    position: relative;
}

.trust .card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.trust .card::before {
    background: linear-gradient(90deg, #4c7c31, #69A843);
}

/* ============================================
   FORMULARIO
   ============================================ */
.contact {
    background: linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(105, 168, 67, 0.03), transparent);
    pointer-events: none;
}

.contact form {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06),
                0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
}

.form-group {
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #69A843;
}

.contact input,
.contact textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: #2c3e50;
    background: #fafafa;
    transition: all 0.3s ease;
}

.contact input::placeholder,
.contact textarea::placeholder {
    color: #aaa;
}

.contact input:hover,
.contact textarea:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}

.contact input:focus,
.contact textarea:focus {
    border-color: #69A843;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(105, 168, 67, 0.1);
    outline: none;
}

.contact textarea {
    min-height: 140px;
    resize: vertical;
}

/* BOTÓN FORM */
.contact button {
    background: linear-gradient(135deg, #69A843 0%, #4c7c31 100%);
    color: white;
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 6px 20px rgba(105, 168, 67, 0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact button::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.contact button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(105, 168, 67, 0.4);
}

.contact button:hover::after {
    transform: translateX(4px);
}

.contact button:active {
    transform: translateY(0);
}

.contact button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alertas */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert::before {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-success {
    background: #edf7ed;
    color: #1e4620;
    border-color: #c8e6c9;
}

.alert-success::before {
    content: '✓';
}

.alert-error {
    background: #fdeded;
    color: #5f2120;
    border-color: #f5c6cb;
}

.alert-error::before {
    content: '✕';
}

.alert-warning {
    background: #fff8e1;
    color: #663c00;
    border-color: #ffe082;
}

.alert-warning::before {
    content: '⚠';
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #1a3a0f;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer p {
    letter-spacing: 0.02em;
}

/* ============================================
   ANIMACIONES DE ENTRADA
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1,
.hero p,
.hero .btn-primary {
    animation: fadeInUp 0.8s ease forwards;
}

.hero p {
    animation-delay: 0.15s;
    opacity: 0;
}

.hero .btn-primary {
    animation-delay: 0.3s;
    opacity: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px 60px;
    }
    
    .hero h1 {
        font-size: clamp(1.9rem, 6vw, 2rem);
    }
    
    .hero p {
        font-size: 1rem;
    }

    .header-flex {
        flex-direction: column;
        gap: 12px;
        padding: 14px 0;
    }

    nav {
        gap: 4px;
    }
    
    nav a {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .services,
    .trust,
    .contact {
        padding: 60px 20px;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
        gap: 20px;
    }
    
    .card {
        padding: 32px 24px;
    }
    
    .contact form {
        padding: 28px;
        margin: 0 10px;
    }
}

/* ============================================
   SCROLLBAR PERSONALIZADA
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #69A843, #4c7c31);
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4c7c31, #3d6327);
}