/* Base Styles & CSS Variables */
:root {
    --color-primary: #0D4260;
    --color-primary-dark: #131E27;
    --color-accent: #1A6B96;
    --color-accent-dark: #0D4260;
    --color-orange: #E95E0C;
    --color-orange-dark: #c04905;
    --text-dark: #1A1A1A;
    --text-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-light: #F4F7F6;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.text-center {
    text-align: center;
}

.highlight-primary {
    color: var(--color-primary);
}

.highlight-accent {
    color: var(--color-accent);
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: #858585;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--color-orange);
    color: var(--bg-white);
}

.btn-accent:hover {
    background-color: var(--color-orange-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--bg-white);
}

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

.btn-light:hover {
    background-color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-nav {
    background-color: #F0F2F5;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.btn-nav:hover {
    background-color: #E4E7EC;
    transform: translateY(-2px);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
    box-shadow: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0;
}

/* Logos visibility toggling */
.navbar .logo-color-wrapper { display: none; }
.navbar .logo-white-wrapper { display: flex; align-items: center; gap: 10px; transition: var(--transition); }

.navbar.scrolled .logo-color-wrapper { display: flex; align-items: center; gap: 10px; }
.navbar.scrolled .logo-white-wrapper { display: none; }

.navbar #lang-toggle {
    color: var(--text-light);
    border-color: var(--text-light);
    transition: var(--transition);
}

.navbar.scrolled #lang-toggle {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo .logo-text {
    height: 24px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    transition: color 0.3s ease;
}

.navbar.scrolled .nav-links a {
    color: var(--color-primary-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: -1rem;
    background-color: var(--bg-white);
    min-width: 250px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block !important;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    font-size: 0.95rem;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--color-accent) !important;
}

/* Nested Dropdown Menu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .arrow-right {
    float: right;
    font-size: 0.9rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.dropdown-menu-nested {
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 100%;
    background-color: var(--bg-white);
    min-width: 250px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1001;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown-submenu:hover .dropdown-menu-nested {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.dropdown-menu-nested li {
    display: block;
}

.dropdown-submenu:hover > a {
    background-color: var(--bg-light);
    color: var(--color-accent) !important;
}

.dropdown-submenu:hover > a .arrow-right {
    color: var(--color-accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

.navbar.scrolled .menu-toggle .bar {
    background-color: var(--color-primary-dark);
}

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-image: url('../img/bim_construction_hero.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(19, 30, 39, 0.95) 0%, rgba(19, 30, 39, 0.3) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px; /* Keep text contained on the left */
    margin: 0;
    margin-left: max(calc((100vw - 1200px) / 2), 2rem); /* Align with container */
}

.hero-content h1 {
    color: var(--text-light);
    text-transform: uppercase;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Sections General */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

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

.grid {
    display: grid;
    gap: 2rem;
}

/* Beneficios Section */
.beneficios-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.beneficio-card {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 2rem;
    border: 1px solid rgba(13, 66, 96, 0.05);
    transition: var(--transition);
}

.beneficio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.beneficio-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
}

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

.color-primary {
    color: var(--color-primary);
}

.color-accent {
    color: var(--color-accent);
}

.beneficio-text h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.beneficio-text p {
    margin-bottom: 0;
    font-size: 1rem;
    color: #666;
}

/* Servicios Section (Lateral List) */
.servicios-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.servicios-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.servicio-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.servicio-item:hover, .servicio-item.active {
    background-color: var(--bg-white);
    border-left-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
    transform: translateX(10px);
}

.servicio-icon {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.servicio-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.servicio-item span {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.wireframe-box {
    background: linear-gradient(135deg, rgba(13, 66, 96, 0.05), rgba(26, 107, 150, 0.05));
    border: 2px dashed var(--color-primary);
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.5rem;
}

/* Coordination Section */
.coordination-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 4rem;
}

.feature-box {
    padding: 2rem;
    border-left: 4px solid var(--color-accent);
    background-color: var(--bg-white);
    border-radius: 0 10px 10px 0;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.feature-box h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.clickable-service {
    cursor: pointer;
    position: relative;
}

.clickable-service:hover {
    background-color: var(--color-primary);
    color: var(--bg-white);
}

.clickable-service:hover h4,
.clickable-service:hover .servicio-icon {
    color: var(--color-accent);
}

.service-preview {
    color: var(--color-accent);
    font-weight: 600;
    transition: var(--transition);
}

.clickable-service:hover .service-preview {
    color: var(--bg-white);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-light);
    padding: 8rem 0;
}

.cta-section h2 {
    color: var(--text-light);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.cta-section .btn-primary {
    background-color: var(--bg-white);
    color: var(--color-primary-dark);
}

.cta-section .btn-primary:hover {
    background-color: var(--bg-light);
}

/* Footer */
.footer {
    background-color: #131E27;
    color: var(--text-light);
    padding: 5rem 0 2rem;
}

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

.footer-logo {
    height: 50px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

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

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-socials {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.footer-socials a {
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.footer-socials a:hover {
    color: var(--bg-white);
    background: var(--color-accent);
    transform: translateY(-3px);
}

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

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    
    .hero-container {
        margin-left: 2rem;
        margin-right: 2rem;
    }
    
    .servicios-layout {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .servicios-image { order: -1; margin-bottom: 2rem; }
    
    .beneficio-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .coordination-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .coordination-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
        gap: 1.5rem; /* Better spacing for mobile */
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: transparent;
        display: none;
        text-align: center;
        padding: 0.5rem 0 0 0;
        min-width: 100%;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu-nested {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: transparent;
        display: none;
        text-align: center;
        padding: 0.5rem 0 0 0;
        min-width: 100%;
    }

    .dropdown-submenu:hover .dropdown-menu-nested,
    .dropdown-submenu:active .dropdown-menu-nested {
        display: block;
    }
    
    .dropdown-submenu .arrow-right {
        display: none; /* Hide the arrow on mobile as it opens downwards */
    }
    
    .navbar .btn {
        display: none;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Scrolling Banner */
.scrolling-banner {
    width: 100%;
    padding: 3rem 0;
    position: relative;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
}

.scrolling-banner-container {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.scrolling-banner-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.scrolling-banner-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    min-width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.scroll-arrow:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.scroll-arrow.prev {
    left: 1rem;
}

.scroll-arrow.next {
    right: 1rem;
}

.scroll-arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-card {
    width: 350px;
    background-color: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-shrink: 0;
    text-align: left;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.project-card h4 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--color-primary);
    margin-bottom: 0;
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 30, 39, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

/* Specialties Grid inside Modal */
.specialties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

@media (max-width: 600px) {
    .specialties-grid {
        grid-template-columns: 1fr;
    }
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--color-accent);
    transition: var(--transition);
}

.spec-item:hover {
    transform: translateX(5px);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.spec-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #858585;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--color-accent);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-cotizacion .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-cotizacion label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.form-cotizacion input,
.form-cotizacion select,
.form-cotizacion textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-cotizacion input:focus,
.form-cotizacion select:focus,
.form-cotizacion textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.hover-reveal-card:hover .project-img { opacity: 1 !important; transform: scale(1.05); }
.hover-reveal-card .project-img { transition: opacity 0.4s ease, transform 0.4s ease; }

.hover-reveal-card:hover .project-img-wrapper { height: 450px !important; }
.hover-reveal-card:hover .project-img { object-fit: contain !important; transform: none !important; }

/* =========================
   RESPONSIVE DESIGN
========================= */

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

body {
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Tablets */
@media (max-width: 992px) {

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

    .hero {
        padding: 40px 20px;
        text-align: center;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Celulares */
@media (max-width: 768px) {

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 15px;
        line-height: 1.6;
    }

    .menu {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .cards {
        display: grid;
        grid-template-columns: 1fr;
    }
}
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}


