* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #15843C;
    --dark-gray: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --text-gray: #666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
}

.navbar {
    /* Dynamic Breathing Background */
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(235, 247, 240, 0.95) 50%, 
        rgba(255, 255, 255, 0.95) 100%
    );
    background-size: 200% 200%;
    animation: navbarBreath 15s ease infinite;
    
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: padding 0.3s ease;
}

@keyframes navbarBreath {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative; /* Added for absolute positioning of the button */
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Springy effect */
}

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

.logo-img {
    width: 210px;
    height: 55px;
    object-fit: contain;
}

.logo-text {
    font-size: 0.75rem;
    color: var(--dark-gray);
    line-height: 1.2;
    font-weight: 400;
}

.logo-text strong {
    font-weight: 700;
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    margin: 0;
    padding: 0;
    padding-right: 200px; /* Reserve space for the absolute button */
}

/* Style for the button item inside the menu */
.nav-buttons-item {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Thicker line */
    bottom: -2px;
    left: 0;
    background-color: var(--primary-red);
    border-radius: 2px; /* Rounded edges */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother expansion */
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-red);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: #0a421e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 124, 39, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-gray);
    border: 1px solid var(--dark-gray);
}

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

.btn-outline {
    background-color: var(--white);
    color: var(--dark-gray);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: transparent;
    color: var(--white);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-gray);
    transition: all 0.3s;
}

.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://images.unsplash.com/photo-1528164344705-47542687000d?q=80&w=2000') center/cover no-repeat;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.features {
    padding: 5rem 2rem;
    background-color: var(--light-gray);
}

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

.features-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--dark-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.feature-description {
    color: var(--text-gray);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .navbar-container {
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .nav-menu,
    .nav-buttons {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: left 0.3s;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transform: none; /* Reset desktop centering transform */
    }

    .nav-buttons {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        padding: 0;
        box-shadow: none;
        margin-top: 2rem;
    }

    .menu-toggle:checked ~ .nav-menu {
        left: 0;
    }

    .menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    .features {
        padding: 3rem 1rem;
    }

    .features-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: var(--white);
    padding: 4rem 2rem 2rem;
    margin-top: 0; /* Removed large top margin to prevent white gap */
}

/* Remover margen superior del footer cuando viene después de CTA section */
.cta-section-new + .footer {
    margin-top: 0;
}

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

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s;
}

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

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-logo-header img {
    width: 180px;
    height: auto;
    opacity: 0.9;
}

.footer-areoni {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.footer-areoni img {
    width: 60px;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-areoni:hover img {
    opacity: 1;
}

.footer-areoni-bubble {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    color: var(--dark-gray);
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10;
}

.footer-areoni-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--white);
}

.footer-areoni-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
    animation: bubblePop 0.5s ease-out;
}

@keyframes bubblePop {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.5);
    }
    50% {
        transform: translateX(-50%) translateY(-8px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px) scale(1);
    }
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.footer-contact-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--primary-red);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.footer-social a:hover {
    background-color: var(--primary-red);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

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

    .footer-social {
        justify-content: center;
    }

    .nav-buttons-item {
        position: static;
        transform: none;
        margin-top: 2rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-buttons-item .btn {
        width: 100%;
    }
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-red); /* Green */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 1; /* Always visible */
    visibility: visible;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollToTop.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    background-color: #E87216; /* Orange */
    transform: translateY(-5px);
}

#scrollToTop svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
