/* ======== VARIABLES GLOBALES Y RESET ======== */
:root {
    --primary-blue: #0056b3; /* Azul profesional */
    --secondary-blue: #007bff; /* Azul para acentos y hover */
    --dark-bg: #1a1a1a;       /* Negro sofisticado */
    --light-bg: #f8f9fa;      /* Gris claro para secciones */
    --white: #ffffff;
    --text-dark: #333;
    --text-light: #e0e0e0;
    --border-color: #ddd;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-blue);
}

ul {
    list-style: none;
}

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

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

/* ======== CLASES DE UTILIDAD ======== */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 4px;
    background-color: var(--primary-blue);
}
.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 700px;
}
.section-subtitle.text-center {
    margin-left: auto;
    margin-right: auto;
}

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

.text-light { color: var(--text-light); }
.text-center { text-align: center; }

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: var(--secondary-blue);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    padding: 12px 26px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    border: 2px solid var(--primary-blue);
}
.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* ======== HEADER Y NAVEGACIÓN ======== */
.header {
    background-color: var(--dark-bg);
    color: var(--white);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}
.logo img {
    height: 45px;
    border-radius: 4px;
}
.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.nav-list {
    display: flex;
    gap: 35px;
}
.nav-link {
    color: var(--white);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 10px 0;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.btn-header-contact {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* ======== HERO (PÁGINA INICIO) ======== */
.hero {
    height: calc(100vh - var(--header-height));
    min-height: 600px;
    background-image: url('../assets/en-trabajo.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.7); /* Overlay oscuro */
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.2;
}
.hero-text {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}
.btn-hero {
    font-size: 1.2rem;
    padding: 18px 35px;
}

/* ======== PAGE HEADER (SUB-PÁGINAS) ======== */
.page-header {
    background-color: var(--dark-bg);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}
.page-title {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 10px;
}
.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* ======== RESUMEN NOSOTROS (INICIO) ======== */
.about-summary-text {
    text-align: left;
}
.about-summary-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.about-summary-image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.icon-list {
    margin: 25px 0;
}
.icon-list li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.icon-list li i {
    color: var(--primary-blue);
    font-size: 1.4rem;
}

/* ======== SERVICIOS ======== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.service-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 4px solid var(--primary-blue);
}
.bg-dark .service-card {
    background-color: #2a2a2a;
    border: 1px solid #444;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.service-card i {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
}
.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}
.bg-dark .service-card h3 {
    color: var(--white);
}
.service-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}
.bg-dark .service-card p {
    color: var(--text-light);
}
.service-link {
    font-weight: 600;
}

/* ======== PROYECTOS ======== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}
.project-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}
.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.project-card-content {
    padding: 25px;
}
.project-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.project-card-content p {
    font-size: 1rem;
    color: #666;
}

/* ======== CLIENTES CARRUSEL ======== */
.clients-carousel {
    overflow: hidden;
    position: relative;
    padding: 30px 0;
}
.carousel-track {
    display: flex;
    width: calc(240px * 12); /* 6 logos * 2 copias * 240px ancho */
    animation: scroll-clients 30s linear infinite;
}
.client-logo {
    flex: 0 0 240px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}
.client-logo img {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}
@keyframes scroll-clients {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Mueve la mitad del ancho total */
}

/* ======== PÁGINA NOSOTROS ======== */
.mission-vision-box {
    text-align: center;
    padding: 40px;
    background-color: #2a2a2a;
    border-radius: 8px;
}
.mission-vision-box i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}
.mission-vision-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.value-card {
    text-align: center;
    padding: 30px;
}
.value-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}
.value-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* ======== PÁGINA CONTACTO ======== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}
.contact-title {
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}
.contact-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-blue);
}

.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-body);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}
.form-group textarea {
    min-height: 140px;
    resize: vertical;
}
#contact-form button {
    width: 100%;
    font-size: 1.1rem;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 1.1rem;
}
.contact-info-list li i {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-top: 5px;
}
.contact-info-list li strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.contact-info-list li p {
    color: #666;
    margin: 0;
}
.map-placeholder {
    margin-top: 40px;
}


/* ======== FOOTER ======== */
.footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding-top: 80px;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
}
.footer-col .logo {
    margin-bottom: 20px;
}
.footer-col .logo h3 {
    font-size: 1.8rem;
    color: var(--white);
}
.footer-col p {
    color: var(--text-light);
    margin-bottom: 25px;
    max-width: 300px;
}
.footer-col h4 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-blue);
}
.footer-col ul li {
    margin-bottom: 12px;
}
.footer-col ul li a,
.footer-col ul li {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-col ul li a:hover {
    color: var(--primary-blue);
}
.footer-col ul li i {
    width: 20px;
    text-align: center;
    color: var(--primary-blue);
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
}
.social-icons a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 25px 0;
    text-align: center;
    color: #aaa;
}

/* ======== ANIMACIONES ======== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Tablets (md) */
@media (max-width: 992px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
    .about-summary-image {
        grid-row: 1; /* Pone la imagen arriba en 'Nosotros' */
        margin-bottom: 30px;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-text {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 2.4rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-info-container {
        margin-top: 50px;
    }
    .btn-header-contact {
        display: none;
    }
}

/* Móviles (sm) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--dark-bg);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }
    .nav.is-active {
        transform: translateX(0);
    }
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 40px;
    }
    .nav-link {
        font-size: 1.5rem;
        display: block;
        padding: 20px 0;
        width: 100%;
        text-align: center;
    }
    .nav-link::after {
        display: none;
    }
    .nav-link:hover, .nav-link.active {
        background-color: var(--primary-blue);
    }
    
    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: 500px;
        height: auto;
        padding: 100px 0;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .section {
        padding: 60px 0;
    }
    .services-grid.full-page-grid,
    .projects-grid.full-page-grid {
        grid-template-columns: 1fr;
    }
}