:root {
    /* Color system */
    --primary: #1E5631;
    --primary-dark: #143B21;
    --primary-light: #3D8B37;
    --secondary: #FF8800;
    --secondary-dark: #E67A00;
    --secondary-light: #FFA94D;
    --accent: #2C85D5;
    --accent-dark: #1A6CB3;
    --accent-light: #5EADFF;
    --dark: #1A1A1A;
    --light: #FFFFFF;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --success: #28a745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.5rem;
    --spacing-6: 2rem;
    --spacing-7: 3rem;
    --spacing-8: 4rem;
    --spacing-9: 6rem;
    --spacing-10: 8rem;

    /* Borders */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-2xl: 2rem;
    --border-radius-pill: 50rem;
    --border-width: 1px;
    --border-width-md: 2px;
    --border-width-lg: 3px;

    /* Shadows */
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
    --shadow-inner: inset 0 1px 2px rgba(0,0,0,.075);
    --shadow-focus: 0 0 0 0.25rem rgba(30, 86, 49, 0.25);

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius-pill);
    padding: 0.75rem 1.5rem;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    text-transform: none;
    border: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--light);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    color: var(--dark);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--light);
}

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

.btn-outline-secondary:hover {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-success {
    background-color: var(--success);
    color: var(--light);
}

.btn-success:hover {
    background-color: #218838;
    color: var(--light);
}

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

.btn-outline-light:hover {
    background-color: var(--light);
    color: var(--dark);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Navigation */
header {
    transition: var(--transition-base);
}

.navbar {
    padding: 1rem 0;
    transition: var(--transition-base);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0;
}

.navbar-brand img {
    max-height: 60px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-pill);
    transition: var(--transition-base);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Hero Section */
#hero {
    position: relative;
    margin-top: 0;
    padding-top: 120px;
}

#hero h1 {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.3s;
}

#hero p.lead {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.6s;
}

#hero p.mb-5 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.9s;
}

#hero .btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 1.2s;
}

/* Pricing Section */
#precios {
    padding: 80px 0;
}

.pricing-card {
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
    border: none;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

.pricing-card.featured {
    transform: scale(1.05);
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-light);
    z-index: 1;
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.card-image {
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    transition: var(--transition-smooth);
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}

.pricing-card:hover .card-image img {
    transform: scale(1.1);
}

.pricing-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.pricing-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-card .display-5 {
    color: var(--primary);
}

.pricing-card ul {
    margin-top: 1.5rem;
}

.pricing-card ul li {
    padding: 0.5rem 0;
    color: var(--gray-700);
}

.badge {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Services Section */
#servicios {
    background-color: var(--gray-100);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

#servicios::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(61, 139, 55, 0.1);
    z-index: 0;
}

#servicios::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(61, 139, 55, 0.1);
    z-index: 0;
}

.service-card {
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.service-card .card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.service-card:hover .card-image img {
    transform: scale(1.1);
}

.service-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(61, 139, 55, 0.1);
}

/* Resources Section */
.resource-card {
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.resource-card .card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.resource-card:hover .card-image img {
    transform: scale(1.1);
}

.resource-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.resource-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Team Section */
#equipo {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

#equipo::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(61, 139, 55, 0.1);
    z-index: -1;
}

.team-card {
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.team-card .card-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.team-card .card-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top;
    transition: var(--transition-smooth);
}

.team-card:hover .card-image img {
    transform: scale(1.1);
}

.team-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.team-card h3 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.team-card p.text-muted {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Statistics Section */
#estadisticas {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 80px 0;
}

.stat-card {
    transition: var(--transition-bounce);
}

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

.counter-value {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--success);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: rgba(255,255,255,0.2);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--success);
    transform: scale(0);
    animation: scaleIn 0.5s var(--transition-bounce) forwards;
}

.timeline-content {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.5s ease forwards;
}

.award-icon {
    color: var(--warning);
    font-size: 2rem;
}

/* Contact Section */
#contacto {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.contact-info {
    transition: var(--transition-smooth);
}

.contact-form {
    transition: var(--transition-smooth);
}

.contact-form:hover, .contact-info:hover {
    box-shadow: var(--shadow);
}

.form-control, .form-select {
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    border: 1px solid var(--gray-300);
    transition: var(--transition-base);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.form-control-lg, .form-select-lg {
    height: calc(3.5rem + 2px);
    font-size: 1rem;
}

textarea.form-control-lg {
    height: auto;
}

/* Footer */
footer {
    background-color: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 2rem;
}

footer h5 {
    color: var(--light);
    margin-bottom: 1.5rem;
}

footer a {
    color: var(--gray-400);
    transition: var(--transition-base);
}

footer a:hover {
    color: var(--light);
    text-decoration: underline;
}

footer .social-link {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    color: var(--gray-400);
    transition: var(--transition-bounce);
}

footer .social-link i {
    margin-right: 0.5rem;
}

footer .social-link:hover {
    color: var(--light);
    transform: translateY(-3px);
}

/* Utility Classes */
.rounded-4 {
    border-radius: var(--border-radius-lg);
}

.bg-success-soft {
    background-color: rgba(40, 167, 69, 0.1);
}

.text-success {
    color: var(--success) !important;
}

/* Additional Pages */
.about-page, .terms-page, .privacy-page {
    padding-top: 100px;
}

.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation triggers for scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--primary);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
    }

    #hero {
        text-align: center;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

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

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    #hero h1 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-dot {
        left: -1.75rem;
    }
}

/* Blob Shapes */
.blob-shape {
    position: absolute;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    animation: morph 15s linear infinite;
    z-index: -1;
    pointer-events: none;
}

.blob-shape-1 {
    top: -200px;
    right: -200px;
    width: 400px;
    height: 400px;
    background-color: rgba(61, 139, 55, 0.05);
}

.blob-shape-2 {
    bottom: -200px;
    left: -200px;
    width: 400px;
    height: 400px;
    background-color: rgba(255, 136, 0, 0.05);
}

@keyframes morph {
    0% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
    25% {
        border-radius: 58% 42% 30% 70% / 55% 45% 45% 55%;
    }
    50% {
        border-radius: 42% 58% 70% 30% / 55% 55% 45% 45%;
    }
    75% {
        border-radius: 58% 42% 30% 70% / 45% 55% 55% 45%;
    }
    100% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
}

/* Glass effect for cards */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Read more links */
.read-more {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    transition: var(--transition-bounce);
}

.read-more:after {
    content: '→';
    margin-left: 0.5rem;
    transition: var(--transition-bounce);
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more:hover:after {
    transform: translateX(5px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}