* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #9a160c;
    --primary-blue: #2ea3f2;
    --dark-bg: #1a1a1a;
    --light-bg: #f7f7f7;
    --accent-gold: #c9a961;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #ffffff;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --max-width: 1080px;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 14px;
    font-weight: 500;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Header y Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 1000;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e0e0e0;
    animation: slideDown 0.6s ease-out;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-img {
    height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    padding: 1rem 1.2rem;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    display: block;
}

.nav-menu > li > a::after {
    display: none;
}

.nav-menu > li > a:hover {
    color: var(--primary-red);
}

/* Submenu styles */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    padding: 0;
}

.sub-menu a {
    padding: 0.6rem 1.2rem;
    font-size: 13px;
    text-transform: none;
    transition: all 0.2s ease;
    color: var(--text-gray);
}

.sub-menu a:hover {
    background: #f5f5f5;
    color: var(--primary-red);
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section with Slider */
.hero-slider {
    position: relative;
    margin-top: 72px;
    min-height: 60vh;
}

.hero-slider .carousel,
.hero-slider .carousel-inner,
.hero-slider .carousel-item {
    height: 60vh;
    min-height: 400px;
}

.hero-slider .carousel-item img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.hero-overlay .hero-content {
    pointer-events: all;
    max-width: 800px;
    padding: 2rem;
}

.hero-overlay .hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.hero-overlay .hero-content p {
    font-size: 1.3rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.hero-overlay .cta-button {
    font-size: 1rem;
    padding: 1rem 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    z-index: 15;
    width: 5%;
    opacity: 0.7;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    opacity: 1;
}

.hero-slider .carousel-indicators {
    z-index: 15;
}

.hero-slider .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Legacy hero (keep for compatibility) */
.hero {
    min-height: 60vh;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(154, 22, 12, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 72px;
    padding: 3rem 2rem;
}

.hero-content {
    max-width: 700px;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-blue);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 3px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
}

/* Sección Empresa */
.empresa-section {
    padding: var(--spacing-lg) 2rem var(--spacing-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-red);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-red);
}

.empresa-content {
    display: block;
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.empresa-text p {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 1.2rem;
    color: var(--text-gray);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Sección Proyectos Ejecutados */
.proyectos-section {
    padding: var(--spacing-lg) 0;
    background: var(--light-bg);
}

.proyectos-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-map-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.map-wrapper {
    position: relative;
}

.map-wrapper img {
    width: 100%;
    max-width: 380px;
    height: auto;
}

.stats-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 4rem;
}

.stat-card {
    background: transparent;
    padding: 0.5rem;
    border-radius: 0;
    text-align: center;
    transition: all 0.4s ease;
    border: none;
    box-shadow: none;
}

.stat-card::before {
    display: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: none;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 400;
    color: var(--primary-red);
    margin-bottom: 0.2rem;
    position: relative;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
}

@media (max-width: 968px) {
    .stats-map-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .stat-number {
        font-size: 3.5rem;
    }
}

@media (max-width: 576px) {
    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }
}

/* Servicios */
.servicios-section {
    padding: var(--spacing-lg) 2rem;
    background: var(--light-bg);
}

.servicio-card {
    background: white;
    padding: 1.8rem;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 3px solid var(--primary-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(154, 22, 12, 0.15), transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.servicio-card:hover::before {
    left: 100%;
}

.servicio-card:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.servicio-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(154, 22, 12, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.servicio-card:hover .servicio-icon {
    background: var(--primary-red);
}

.servicio-card:hover .servicio-icon i {
    color: white !important;
}

.servicio-card h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--primary-red);
    font-weight: 600;
}

.servicio-card p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 13px;
}

/* Cuencas Section */
.cuencas-section {
    padding: var(--spacing-lg) 2rem;
    background: #ffffff;
}

.cuencas-grid-maps {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

@media (max-width: 1024px) {
    .cuencas-grid-maps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .cuencas-grid-maps {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cuenca-map-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 3px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cuenca-map-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.map-container {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.country-map-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.cuenca-map-card:hover .country-map-img {
    transform: scale(1.05);
}

.cuenca-map-card h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cuenca-map-card p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Footer */
footer a {
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-red) !important;
}

footer h5 {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

footer address p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 968px) {
    nav {
        position: relative;
        justify-content: flex-start;
    }

    .mobile-menu-toggle {
        display: flex;
        order: -1;
        margin-right: 10px;
    }

    .logo-container {
        margin-left: 0;
    }

    .logo-img {
        height: 40px;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        right: auto;
        width: 300px;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 0;
    }

    .nav-menu > li > a {
        padding: 1rem 0;
        color: var(--text-dark);
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(154, 22, 12, 0.05);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: none;
        box-shadow: none;
    }

    .nav-menu > li:hover .sub-menu,
    .nav-menu > li.active .sub-menu {
        max-height: 300px;
    }

    .sub-menu a {
        padding: 0.75rem 1rem;
        color: #666;
    }

    .sub-menu a:hover {
        padding-left: 1.5rem;
        background: rgba(154, 22, 12, 0.1);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

/* Scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }


/* Números con efecto hover sutil */
.stat-card:hover .stat-number {
    transform: scale(1.02);
}

/* Scroll suave global */
html {
    scroll-behavior: smooth;
}


/* Transiciones suaves */
a, button {
    transition: all 0.3s ease;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    margin-left: 1.5rem;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-dark);
}

.lang-dropdown-btn:hover {
    border-color: var(--primary-red);
    background: #f9f9f9;
}

.lang-dropdown-btn .arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.lang-dropdown:hover .lang-dropdown-btn .arrow {
    transform: rotate(180deg);
}

.lang-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
}

.lang-dropdown:hover .lang-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-content a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-dropdown-content a:hover {
    background: #f5f5f5;
    color: var(--primary-red);
}

.lang-dropdown-content a.active {
    background: var(--primary-red);
    color: white;
}

.lang-dropdown-content a:first-child {
    border-radius: 6px 6px 0 0;
}

.lang-dropdown-content a:last-child {
    border-radius: 0 0 6px 6px;
}

@media (max-width: 968px) {
    .lang-dropdown {
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        margin-left: 0;
    }
}

.chat-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #ff6a00;
    color: white;
    font-size: 26px;
    border: none;
    cursor: pointer;
    z-index: 9999;
}

/* Botón de navegación scroll */
.scroll-nav-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(154, 22, 12, 0.4);
    transition: all 0.3s ease;
}

.scroll-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(154, 22, 12, 0.5);
}

.scroll-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
}

.scroll-nav-btn.up svg {
    transform: rotate(180deg);
}

.chat-modal {
    display: none;
    position: fixed;
    bottom: 95px;
    left: 30px;
    width: 320px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,.4);
    z-index: 10000;
}

.chat-box {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-header {
    background: #111;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
}

.chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-msg {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 14px;
}

.chat-msg.bot {
    background: #2b2b2b;
    color: white;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-msg.user {
    background: #ff6a00;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    margin-left: auto;
}

.advisor-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.advisor-btn:hover {
    background: #20ba5a;
    transform: scale(1.05);
}

.chat-footer {
    display: flex;
    border-top: 1px solid #333;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    border: none;
}

.chat-footer button {
    background: #ff6a00;
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

