/* Estilos generales */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores principal */
    --primary-red-dark: #9A1815;  /* Rojo oscuro */
    --primary-red: #7D0809;       /* Rojo principal */
    --secondary-beige: #BBA38E;   /* Beige oscuro */
    --secondary-cream: #E6D7BE;   /* Crema claro */
    --dark: #070705;              /* Negro */
    --accent-blue: #457B9D;       /* Azul acento */
    
    /* Colores adicionales para la interfaz */
    --text-color: #333333;
    --light-text: #ffffff;
    --light-bg: #f9f7f4;
    --border-color: #e5e0d8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --overlay: rgba(7, 7, 5, 0.7);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    font-size: 1.6rem;
    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 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 10rem 0;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    transition: var(--transition);
}

h1 {
    font-size: 4.8rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 3.6rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.6rem;
    font-size: 1.6rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 1.6rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-red-dark);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--light-text);
    border: 2px solid var(--primary-red);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(125, 8, 9, 0.3);
    border-color: var(--primary-red-dark);
}

/* Secciones del Header */
.section-header {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
}

.section-header h2 {
    color: var(--primary-red);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 3px;
    background-color: var(--secondary-beige);
    transition: var(--transition);
}

.section-header:hover h2::after {
    width: 10rem;
}

.section-header p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin: 0 auto;
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.section-header:hover p {
    opacity: 1;
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(7, 7, 5, 0.9);
    transition: var(--transition);
    padding: 0.5rem 4rem; /* Valor positivo y razonable */
    height: 10rem;
}

header.scrolled {
    padding: 1.5rem 4rem;
    background-color: rgba(7, 7, 5, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo-container a img {
    height: 10rem;
    width: auto;
    margin-right: 1rem;
    transition: var(--transition);
}

.logo-container:hover img {
    transform: rotate(5deg);
}

.logo-container h1 {
    color: var(--light-text);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.main-menu {
    display: flex;
    align-items: center;
}

.main-menu li {
    margin-left: 3rem;
    position: relative;
}

.main-menu a {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    transition: var(--transition);
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-beige);
    transition: var(--transition);
}

.main-menu a:hover::after,
.main-menu a.active::after {
    width: 100%;
}

.main-menu a:hover {
    color: var(--secondary-beige);
    transform: translateY(-2px);
}

.main-menu a.active {
    color: var(--secondary-beige);
}

.lang-switch {
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    color: none;
}


.mobile-toggle {
    display: none;
    border: none;
    font-size: 2.4rem;

}
.mobile-toggle:hover {
    transform: rotate(90deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 10rem; 
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
}

.hero-content {
    position: relative;
    color: var(--light-text);
    max-width: 80rem;
    margin-left: 10rem;
    z-index: 1;
}

.hero-content h2 {
    font-size: 5.6rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    max-width: 60rem;
}

/* Hero interno para páginas secundarias */
.hero-inner {
    height: 40vh;
    min-height: 30rem;
    background-image: url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 10rem;
}

.hero-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
}

.hero-inner .hero-content {
    position: relative;
    color: var(--light-text);
    z-index: 1;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.hero-inner .hero-content h2 {
    font-size: 4.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.breadcrumb {
    font-size: 1.6rem;
    color: var(--light-text);
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0.4rem;
    margin-top: 1rem;
}

.breadcrumb a {
    color: var(--secondary-beige);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-cream);
}

/* Estilos para la sección de clientes */
.clientes-section {
    padding: 8rem 0;
    background-color: var(--light-bg);
}

.clients-slider {
    overflow: hidden;
    position: relative;
    padding: 3rem 0;
    margin: 0 auto;
    max-width: 1200px;
}

.clients-track {
    display: flex;
    transition: transform 0.5s ease;
}

.client-slide {
    min-width: 25%; /* Mostrar 4 items en desktop */
    padding: 0 2rem;
    transition: all 0.3s ease;
}

.client-logo {
    height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 2rem;
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-logo:hover {
    transform: scale(1.1);
    box-shadow: var(--hover-shadow);
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Estilos para las etiquetas de líneas */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.line-tag {
    position: absolute;
    top: 1.5rem;
    left: 0;
    background-color: var(--primary-red);
    color: var(--light-text);
    padding: 0.5rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    z-index: 2;
    border-top-right-radius: 0.4rem;
    border-bottom-right-radius: 0.4rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .line-tag {
    transform: translateX(0);
}

/* Estilos para la galería de líneas */
.gallery-section {
    padding: 10rem 5rem;
    background-color: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
    height: 25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-0.8rem);
    box-shadow: var(--hover-shadow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(125, 8, 9, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item::before {
    content: '+';
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.4rem;
    font-weight: 700;
    z-index: 1;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* About Section / Quiénes Somos */
.quienes-somos {
    padding: 10rem 5rem;
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 5rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2.6rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
}

.about-text p {
    margin-bottom: 3rem;
    font-size: 1.6rem;
}

.about-text ul {
    margin-bottom: 3rem;
}

.about-text ul li {
    margin-bottom: 1rem;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
}

.about-text ul li:before {
    content: "\2022";
    color: var(--primary-red);
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-right: 0.5em;
}

.about-image {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Filosofía Section - Versión Moderna */
.filosofia-section {
    background-color: var(--light-bg);
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos en fondo */
.filosofia-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 30%;
    background-color: rgba(154, 24, 21, 0.05);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    z-index: 1;
}

.filosofia-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 30%;
    background-color: rgba(187, 163, 142, 0.1);
    clip-path: polygon(0 100%, 0 0, 100% 100%);
    z-index: 1;
}

.filosofia-container {
    position: relative;
    z-index: 2;
    max-width: 1140px;
    margin: 0 auto;
}

/* Diseño principal con línea divisoria central */
.filosofia-main {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 6rem;
}

.filosofia-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--primary-red) 10%, 
        var(--primary-red) 90%, 
        transparent);
    z-index: 1;
}

/* Estilo para cada bloque de filosofía */
.filosofia-item {
    display: flex;
    margin-bottom: 8rem;
    position: relative;
    width: 100%;
}

.filosofia-item:last-child {
    margin-bottom: 0;
}

/* Alternancia de posiciones (izquierda/derecha) */
.filosofia-item:nth-child(odd) {
    justify-content: flex-end;
}

.filosofia-item:nth-child(odd) .filosofia-content {
    padding-right: 7rem;
    text-align: right;
    align-items: flex-end;
}

.filosofia-item:nth-child(even) .filosofia-content {
    padding-left: 7rem;
    text-align: left;
    align-items: flex-start;
}

/* Diseño para el contenido de cada bloque */
.filosofia-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s ease-out;
}

.filosofia-item:hover .filosofia-content {
    transform: translateY(-10px);
}

/* Conectores con la línea central */
.filosofia-item::before {
    content: '';
    position: absolute;
    top: 2.5rem;
    width: 5rem;
    height: 2px;
    background-color: var(--primary-red);
    z-index: 2;
}

.filosofia-item:nth-child(odd)::before {
    left: calc(50% - 5rem);
}

.filosofia-item:nth-child(even)::before {
    right: calc(50% - 5rem);
}

/* Círculos en la línea central */
.filosofia-item::after {
    content: '';
    position: absolute;
    top: 1.8rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid var(--primary-red);
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 5px rgba(154, 24, 21, 0.1);
}

.filosofia-item:hover::after {
    transform: scale(1.2);
    background-color: var(--primary-red);
    box-shadow: 0 0 0 8px rgba(154, 24, 21, 0.2);
}

.filosofia-item:nth-child(odd)::after {
    left: calc(50% - 15px);
}

.filosofia-item:nth-child(even)::after {
    right: calc(50% - 15px);
}

/* Iconos en cada bloque */
.filosofia-icon {
    margin-bottom: 2rem;
    width: 6rem;
    height: 6rem;
    background-color: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.filosofia-item:hover .filosofia-icon {
    transform: rotate(10deg);
    box-shadow: 0 15px 35px rgba(154, 24, 21, 0.3);
}

.filosofia-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(45deg, var(--primary-red), var(--secondary-beige));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.filosofia-icon i {
    font-size: 2.5rem;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.filosofia-item:hover .filosofia-icon i {
    transform: scale(1.2);
}

/* Títulos y textos */
.filosofia-content h3 {
    color: var(--primary-red);
    font-size: 2.6rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
}

.filosofia-content h3::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    height: 3px;
    width: 6rem;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-beige));
    transition: width 0.3s ease;
}

.filosofia-item:nth-child(odd) .filosofia-content h3::after {
    right: 0;
}

.filosofia-item:hover .filosofia-content h3::after {
    width: 10rem;
}

.filosofia-content p {
    font-size: 1.6rem;
    line-height: 1.7;
    color: #555;
}

/* Estilos especiales para la lista de pilares */
.pilares-list {
    list-style: none;
    counter-reset: pilares-counter;
}

.pilares-list li {
    position: relative;
    margin-bottom: 1.2rem;
    padding-left: 3rem;
    font-size: 1.5rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    color: #555;
    text-align: left;
}

.filosofia-item:nth-child(odd) .pilares-list li {
    padding-left: 0;
    padding-right: 3rem;
    text-align: right;
}

.pilares-list li::before {
    counter-increment: pilares-counter;
    content: counter(pilares-counter);
    position: absolute;
    top: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background-color: var(--primary-red);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.filosofia-item:nth-child(even) .pilares-list li::before {
    left: 0;
}

.filosofia-item:nth-child(odd) .pilares-list li::before {
    right: 0;
}

.pilares-list li:hover {
    color: var(--primary-red);
}

.pilares-list li:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(154, 24, 21, 0.4);
}

/* Estilos para la sección Trayectoria */
.trayectoria-section {
    padding: 8rem 0;
    background-color: white;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary-beige);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 5rem;
}

/* Estilos para los items de línea de tiempo izquierdos y derechos */
.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

/* Contenido de los items de línea de tiempo */
.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

/* Punto central en la línea de tiempo */
.timeline-dot {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: var(--primary-red);
    border-radius: 50%;
    z-index: 1;
    top: 15px;
    border: 4px solid var(--secondary-beige);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--primary-red-dark);
    transform: scale(1.2);
}

/* Posicionamiento de los puntos para items izquierdos y derechos */
.timeline-item.left .timeline-dot {
    right: -12px;
}

.timeline-item.right .timeline-dot {
    left: -12px;
}

/* Fecha en la línea de tiempo */
.timeline-date {
    background-color: var(--primary-red);
    color: white;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* Títulos dentro de la línea de tiempo */
.timeline-content h3 {
    color: var(--text-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

/* Texto dentro de la línea de tiempo */
.timeline-content p {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Imágenes en la línea de tiempo */
.timeline-image {
    margin-top: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    transition: transform 0.5s ease;
}

.timeline-item:hover .timeline-image img {
    transform: scale(1.05);
}

/* Servicios Section */
.servicios {
    padding: 10rem 5rem;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 3rem;
}

.servicio-card {
    background-color: #ffffff;
    border-radius: 0.8rem;
    padding: 4rem 3rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid transparent;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
    border-bottom: 3px solid var(--primary-red);
}

.servicio-card i {
    font-size: 4rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
}

.servicio-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.servicio-card p {
    font-size: 1.5rem;
    color: #666;
}

/* Equipo Section - Modificado para 3 columnas */
.equipo-section {
    padding: 8rem 0;
    background-color: var(--light-bg);
}

.equipo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactamente 3 columnas */
    gap: 3rem;
    margin-top: 5rem;
    max-width: 1200px; /* Ancho máximo para mejor control */
    margin-left: auto;
    margin-right: auto;
}

.equipo-card {
    background-color: #fff;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.equipo-card:hover {
    transform: translateY(-0.8rem);
    box-shadow: var(--hover-shadow);
}

.equipo-img {
    height: 35rem;
    overflow: hidden;
    position: relative;
}

.equipo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.equipo-card:hover .equipo-img img {
    transform: scale(1.05);
}

.equipo-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.equipo-card:hover .equipo-social {
    opacity: 1;
    transform: translateY(0);
}

.equipo-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: white;
    border-radius: 50%;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.equipo-social a:hover {
    background-color: var(--primary-red);
    color: white;
    transform: translateY(-5px);
}

.equipo-info {
    padding: 2.5rem;
}

.equipo-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.equipo-cargo {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: block;
    position: relative;
    padding-bottom: 1rem;
}

.equipo-cargo::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3rem;
    height: 2px;
    background-color: var(--secondary-beige);
    transition: width 0.3s ease;
}

.equipo-card:hover .equipo-cargo::after {
    width: 50%;
}

.equipo-desc {
    font-size: 1.5rem;
    color: #666;
}



/* Contacto Section */
.contacto {
    padding: 10rem 5rem;
    background-color: var(--light-bg);
}

.contacto-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 5rem;
    max-width: 120rem;
    margin: 0 auto;
}

.contacto-form {
    background-color: #ffffff;
    padding: 4rem;
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-size: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.2);
}

.contacto-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contacto-info h3 {
    font-size: 2.4rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-red);
    margin-right: 1.5rem;
    margin-top: 0.5rem;
}

.info-content h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.info-content p, 
.info-content a {
    font-size: 1.5rem;
    color: #777;
}

.info-content a:hover {
    color: var(--primary-red);
}

.contacto-social {
    margin-top: 4rem;
}

.contacto-social h4 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: #f5f5f5;
    border-radius: 50%;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.social-icons a i {
    font-size: 1.8rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-red);
}

.social-icons a:hover i {
    color: var(--light-text);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light-text);
    padding: 8rem 5rem 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 5rem;
    margin-bottom: 5rem;
}

.footer-logo h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
    transition: var(--transition);
}

.footer-logo:hover h2 {
    color: var(--secondary-beige);
}

.footer-logo p {
    font-size: 1.5rem;
    color: #aaa;
    max-width: 30rem;
    transition: var(--transition);
}

.footer-logo:hover p {
    color: #ddd;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: var(--light-text);
    position: relative;
    padding-bottom: 1rem;
}

.footer-links h3::after,
.footer-social h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 5rem;
    height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.footer-links h3:hover::after,
.footer-social h3:hover::after,
.footer-contact h3:hover::after {
    width: 8rem;
}

.footer-links ul li {
    margin-bottom: 1.2rem;
}

.footer-links ul li a {
    color: #aaa;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.footer-links ul li a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-beige);
    padding-left: 2rem;
}

.footer-links ul li a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-social p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-red);
    transform: scale(0);
    transition: var(--transition);
    border-radius: 50%;
}

.social-icons a:hover::before {
    transform: scale(1);
}

.social-icons a i {
    font-size: 1.8rem;
    color: var(--light-text);
    transition: var(--transition);
    z-index: 1;
}

.social-icons a:hover i {
    transform: scale(1.2);
}

.footer-contact p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.footer-contact p:hover {
    color: #ddd;
    transform: translateX(5px);
}

.footer-contact p i {
    margin-right: 1rem;
    color: var(--primary-red);
    transition: var(--transition);
}

.footer-contact p:hover i {
    transform: rotate(15deg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #777;
    font-size: 1.4rem;
    transition: var(--transition);
}

.footer-bottom p:hover {
    color: #aaa;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 6rem;
    height: 6rem;
    background-color: #25D366;
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* Estilos para el lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: -3rem;
    right: -3rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-lightbox:hover {
    transform: scale(1.2);
    color: var(--primary-red);
}

/* Botón Volver Arriba */
.scroll-top-btn {
    position: fixed;
    bottom: 3rem;
    right: 10rem; /* Separado del botón de WhatsApp */
    width: 5rem;
    height: 5rem;
    background-color: var(--primary-red);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-5px);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(3rem);
    transition: all 0.6s ease;
}

.animate-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Media queries para responsividad */
@media (max-width: 1200px) {
    html {
        font-size: 56.25%; /* 1rem = 9px */
    }

    .hero-content {
        margin-left: 5rem;
    }
    
    .client-slide {
        min-width: 33.333%; /* 3 items en pantallas grandes */
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    }
}

@media (max-width: 992px) {
    html {
        font-size: 50%; /* 1rem = 8px */
    }

    header {
        padding: 2rem;
    }

    header.scrolled {
        padding: 1.5rem 2rem;
    }

    .proyectos, .servicios, .contacto, .quienes-somos, .gallery-section {
        padding: 8rem 3rem;
    }
    
    .client-slide {
        min-width: 50%; /* 2 items en tablets */
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }
    
    .gallery-item {
        height: 22rem;
    }
    
    .hero-content h2 {
        font-size: 4.8rem;
    }
    
    /* Adaptación filosofía */
    .filosofia-main::before {
        left: 30px;
    }
    
    .filosofia-item {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filosofia-item:nth-child(odd) {
        justify-content: flex-start;
    }
    
    .filosofia-content {
        width: calc(100% - 60px);
        margin-left: 60px;
    }
    
    .filosofia-item:nth-child(odd) .filosofia-content,
    .filosofia-item:nth-child(even) .filosofia-content {
        padding-left: 2rem;
        padding-right: 0;
        text-align: left;
        align-items: flex-start;
    }
    
    .filosofia-item::before {
        left: 30px;
        width: 30px;
    }
    
    .filosofia-item:nth-child(odd)::before,
    .filosofia-item:nth-child(even)::before {
        left: 30px;
    }
    
    .filosofia-item::after {
        left: 30px;
    }
    
    .filosofia-item:nth-child(odd)::after,
    .filosofia-item:nth-child(even)::after {
        left: 30px;
    }
    
    .filosofia-item:nth-child(odd) .filosofia-content h3::after {
        left: 0;
        right: auto;
    }
    
    .filosofia-item:nth-child(odd) .pilares-list li {
        padding-left: 3rem;
        padding-right: 0;
        text-align: left;
    }
    
    .filosofia-item:nth-child(odd) .pilares-list li::before,
    .filosofia-item:nth-child(even) .pilares-list li::before {
        left: 0;
        right: auto;
    }
    
    /* Adaptación timeline */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 16px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    /* Seleccionamos tanto nav como main-nav para mantener compatibilidad */
    nav, .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--dark);
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 10rem 2rem;
    }
    
    nav.active, .main-nav.active {
        right: 0;
    }
    
    .main-menu {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-menu li {
        margin: 1rem 0;
        width: 100%;
    }

    .hero-content {
        margin: 0 auto;
        text-align: center;
        padding: 0 2rem;
    }
    
    .hero-content h2 {
        font-size: 4.2rem;
    }

    .contacto-form {
        padding: 3rem;
    }
    
    .client-slide {
        min-width: 100%; /* 1 item en móviles */
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item {
        height: 25rem;
    }
    
    .line-tag {
        transform: translateX(0);
    }
    
    .about-content, .servicios-grid {
        gap: 3rem;
    }
    
    .whatsapp-btn {
        bottom: 2rem;
        right: 2rem;
        width: 5rem;
        height: 5rem;
        font-size: 2.4rem;
    }
    
    .scroll-top-btn {
        bottom: 2rem;
        right: 8rem;
        width: 4.5rem;
        height: 4.5rem;
    }
    
    .equipo-grid {
        grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
        max-width: 60rem;
        margin-left: auto;
        margin-right: auto;
    }
}
/* Media queries específicas para el equipo */
@media (max-width: 992px) {
    .equipo-grid {
        grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
        gap: 2.5rem;
    }
    
    .equipo-img {
        height: 28rem; /* Más altura en tablets */
    }
}

@media (max-width: 768px) {
    .equipo-grid {
        grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
        max-width: 60rem;
        margin-left: auto;
        margin-right: auto;
        gap: 2rem;
    }
    
    .equipo-img {
        height: 30rem; /* Aún más altura en móviles */
    }
    
    .equipo-img img {
        object-fit: contain; /* Cambia a contain para mostrar la imagen completa */
        background-color: #f8f8f8; /* Fondo sutil para las áreas vacías */
    }
    
    .equipo-info {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .equipo-grid {
        grid-template-columns: 1fr;
        max-width: 35rem;
        gap: 1.5rem;
    }
    
    .equipo-img {
        height: 35rem; /* Máxima altura para móviles pequeños */
    }
    
    .equipo-img img {
        object-fit: contain;
        background-color: #f8f8f8;
    }
    
    .equipo-info {
        padding: 1.5rem;
        text-align: center;
    }
    
    .equipo-cargo::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .equipo-card:hover .equipo-cargo::after {
        width: 6rem;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links h3::after,
    .footer-social h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social .social-icons {
        justify-content: center;
    }
    .footer-logo p {
        text-align: center;
        max-width: 50rem;
    }

    .footer-logo {
        text-align: center;
        width: 100%;
    }

    .footer-contact p {
        justify-content: center;
    }
    .section-header h2 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 3.6rem;
    }

    .contacto-form {
        padding: 2rem;
    }

    .proyectos, .servicios, .contacto, .quienes-somos, .gallery-section {
        padding: 6rem 2rem;
    }
    
    .gallery-item {
        height: 22rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .filosofia-icon {
        width: 5rem;
        height: 5rem;
    }
    
    .filosofia-icon i {
        font-size: 2rem;
    }
    
    .filosofia-content h3 {
        font-size: 2.2rem;
    }
    
    .timeline-content {
        padding: 15px 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
        padding-right: 15px;
    }
    
    .timeline-dot {
        width: 20px;
        height: 20px;
    }
    
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 12px;
    }
    
    .equipo-grid {
        grid-template-columns: 1fr;
    }
}
