/* ------------------------------------------- */
/* 0. Importación de Fuentes y Reset */
/* ------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap');

@font-face {
    font-family: 'Kollektif';
    src: url('kollektif/Kollektif.woff') format('woff');   
         
    font-weight: normal; 
    font-style: normal;
    font-display: swap; 
}

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

:root {
    /* Variables para los paddings laterales por tamaño de pantalla */
    --padding-desktop: 40px;
    --padding-tablet: 20px;
    --padding-mobile: 20px;

    /* Variable principal de padding lateral que cambiará con las media queries */
    --current-padding-sides: var(--padding-desktop);
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400; 
    background-color: #F5F5F5;
    color: #575554;
    overflow-x: hidden; /* Mantenemos esto si no quieres scroll horizontal inesperado */
}

/* SCROLLBAR PERSONALIZADO - WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F5F5F5;
}

::-webkit-scrollbar-thumb {
    background-color: #c4c2be;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a8a6a2;
}

/* ------------------------------------------- */
/* 2. Header y Navegación */
/* ------------------------------------------- */
header {
    width: 100%;
    /* Usa la variable para el padding lateral */
    padding: 20px var(--current-padding-sides); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Kollektif', sans-serif;
    font-size: 30px;
    color: #575554;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #575554;
    font-size: 20px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.nav-links a.current {
    text-decoration: underline;
    color: #575554;
    text-underline-offset: 4px; 
    text-decoration-thickness: 1px; 
    text-decoration-color: #575554; 
}

/* MENU ICON (Hamburguesa) */
.menu-icon {
    width: 30px;
    height: 15px;
    cursor: pointer;
    display: none; /* Oculto por defecto en desktop, mostrado en móviles */
    flex-direction: column;
    justify-content: space-between;
    z-index: 101;
}

.menu-icon span {
    height: 2px;
    background: #575554;
    width: 100%;
    transition: all 0.4s ease;
}

.menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ------------------------------------------- */
/* 5. Services Section */
/* ------------------------------------------- */
.services-section {
    padding: 120px var(--current-padding-sides);
    display: block;
    min-height: 100vh;
    background-color: #F5F5F5;
    position: relative;
    overflow: hidden;
}

.services-container {
    width: 100%;
    color: #575554;
}

.section-subtitle {
    font-size: 20px;
    color: #8a8783;
    margin-bottom: 50px;
    text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.main-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(36px, 6vw, 80px);
    text-align: center;
    color: #575554;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Kollektif', sans-serif;
}

.main-title:hover {
    opacity: 0.8;
}

.service-item {
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.service-title {
    font-size: 35px;
    margin-bottom: 0px;
    color: #575554;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
    text-transform: none;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
    line-height: 1;
}

.service-title:hover {
    color: #8a8783;
}

.service-description {
    margin: 10px 0; 
    font-size: 20px;
    color: #8a8783;
    text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    text-transform: none;
    text-decoration: none;
    line-height: 1;
}

.service-divider {
    height: 0.50px;
    background-color: #575554;
    margin: 20px 0; 
}

/* Para evitar un margen extra en el último item y un divisor final innecesario */
.service-item:last-of-type {
    margin-bottom: 0; /* Elimina el margen inferior del último ítem */
}

.service-divider:last-of-type {
    display: none; /* Oculta el último divisor si no quieres uno debajo del último servicio */
}


.service-preview {
    position: absolute;
    top: 50%;
    right: var(--current-padding-sides);
    transform: translateY(-50%) translateX(20px);
    width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 5;
}

.service-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.service-item:hover .service-preview {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ------------------------------------------- */
/* 8. Contact Page Specific Styles */
/* ------------------------------------------- */
.contact-cta {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #F5F5F5;
    padding: 200px var(--current-padding-sides) 40px;
}

.contact-cta h2 {
    font-size: clamp(36px, 6vw, 80px);
    margin-bottom: 20px;
    color: #575554;
    font-weight: 500;
    font-family: 'Kollektif', sans-serif;
}

.contact-section {
    padding: 160px var(--current-padding-sides);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-section p {
    font-size: 20px;
    color: #8a8783;
    margin-bottom: 20px;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.contact-button {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    font-size: 16px;
    background-color: transparent;
    border-radius: 0px;
    color: #575554;
    border: 1px solid #575554;
    text-decoration: none;
    border-radius: 0px;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.contact-button:hover {
    background-color: #575554;
    transform: scale(1.05);
    color: #F5F5F5;
}

/* ------------------------------------------- */
/* 10. Estilos del Menú Desplegable (Dropdown) */
/* ------------------------------------------- */

/* Contenedor principal del dropdown */
.dropdown {
position: relative;
display: inline-block;
padding-bottom: 15px; 
}

/* Contenido del menú desplegable */
.dropdown-content {
display: none;
position: absolute;
top: 100%; 
left: 50%; 
background-color: #F5F5F5;
min-width: 260px;
box-shadow: 0px 8px 16px 0px #5755541a;
z-index: 10;
padding: 5px 0;
border-radius: 0px;
opacity: 0;
visibility: hidden;
transform: translate(-50%, 10px); 
transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
margin-top: -15px; 
}

/* Enlaces dentro del desplegable */
.dropdown-content a {
 font-size: 16px; 
 padding: 10px 20px;
 display: block; 
 text-align: center;
 text-underline-offset: 0; 
}

.dropdown-content a:last-child {
  padding-left: 30px;
  padding-right: 30px;
  line-height: 1.4;
}

.dropdown-content a:hover {
 background-color: #e9e8e6;
 transform: none;
}

/* Muestra el desplegable al pasar el ratón */
.dropdown:hover .dropdown-content {
 display: block;
 opacity: 1;
 visibility: visible;
 transform: translate(-50%, 0); 
}

/* ------------------------------------------- */
/* 4. Footer */
/* ------------------------------------------- */
.main-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px var(--current-padding-sides);
    background-color: transparent;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 0px;
}

.footer-divider {
    height: 0.50px;
    background-color: #575554; /* Color de tu línea de servicios */
    width: 100%; /* O el ancho que desees, por ejemplo, 80% */
    margin: 20px 0; /* Espacio superior e inferior */
}

.footer-button {
    background: none;
    border: none;
    font-size: 14px;
    color: #575554;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-button:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.copyright-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color:after #8a8783;
    margin-top: 0px; 
    font-weight: 300;
}

.copyright-text .footer-button {
    font-size: 12px;
    font-weight: 300;
    color: #8a8783; /* Para que también herede el color si no lo hace automáticamente */
    text-decoration: none; /* Si no quieres subrayado, aunque el texto de copyright no lo tiene por defecto */
}

.copyright-text .footer-button:hover {
    color: #575554; /* Un color diferente al pasar el ratón para este enlace si quieres */
    text-decoration: underline; /* Puedes añadir subrayado solo en hover si quieres */
}


/* ------------------------------------------- */
/* 5. Efectos (Fade-in) */
/* ------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

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

/* ------------------------------------------- */
/* 6. Media Queries */
/* ------------------------------------------- */

/* Tablet y dispositivos más pequeños (ancho máximo 768px) */
@media (max-width: 768px) {
    :root {
        --current-padding-sides: var(--padding-tablet); /* Actualiza la variable para tablet */
    }

    .logo {
        font-size: 20px;
    }

    .menu-icon {
        display: flex; /* Muestra el icono de menú en tablet */
    }

    .nav-links {
        display: none; /* Oculta el menú de navegación principal */
        flex-direction: column; /* Para cuando se muestre el menú de hamburguesa */
        justify-content: center;
        align-items: center;
        background: #F5F5F5;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 99;
        gap: 30px;
    }

    .nav-links.show {
        display: flex; /* Muestra el menú cuando tiene la clase 'show' */
    }

    .contact-section {
        padding: 120px var(--current-padding-sides); /* Ajustado padding vertical para móviles */
    }
    .copyright-text {
       font-size: 11px;
    }
}

/* Móviles (ancho máximo 480px) */
@media (max-width: 480px) {
    :root {
        --current-padding-sides: var(--padding-mobile); /* Actualiza la variable para móvil */
    }
    
    /* El .container-form, header, contact-section y footer ya usan la variable y se adaptarán automáticamente */
    .contact-section h1 {
        font-size: 40px; /* Reducir tamaño del título principal para pantallas muy pequeñas */
    }

    .contact-section p {
        font-size: 18px; /* Reducir tamaño del párrafo para pantallas muy pequeñas */
    }

    .name-group {
        flex-direction: column; /* Apila los campos de nombre y apellido en móviles */
        gap: 0; /* Elimina el espacio entre ellos si se apilan */
    }

    .name-group input {
        margin-bottom: 10px; /* Añade un poco de espacio si se apilan */
    }

        .copyright-text {
       font-size: 10px;
    }
}