/* ======== VARIABLES Y ESTILOS GLOBALES ======== */
:root {
    --primary-color: #0d47a1; /* Azul oscuro profesional */
    --secondary-color: #1565c0; /* Azul más claro */
    --accent-color: #ffab00; /* Naranja/ámbar para acentos y botones */
    --dark-color: #222;
    --light-color: #f4f4f4;
    --text-color: #333;
    --white-color: #fff;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Poppins', sans-serif; /* Usaremos una fuente más moderna, necesita importarse o usar una de sistema */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--light-color);
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

/* ======== ENCABEZADO Y NAVEGACIÓN ======== */
.header {
    background-color: var(--white-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: var(--header-height);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* regla para ajustar el estilo del logo en el menu */
.nav-logo {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
	display: flex; 
    align-items: center;
}

.nav-logo img {
    height: 45px; /* <-- ¡Este es el valor clave! Ajústalo a tu gusto */
    width: auto; /* Mantiene la proporción de la imagen */
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}


/* ======== SECCIÓN HERO aqui esta el fondo de la seccion inicioo======== */
.hero {
    position: relative;
    height: 100vh;
    background: url('img/fondo_barco.webp') no-repeat center center/cover;
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--dark-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    display: inline-block;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #ffc400;
    transform: translateY(-3px);
}

/* ======== SERVICIOS ======== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white-color);
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ======== PROYECTOS ======== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 71, 161, 0.9), rgba(21, 101, 192, 0.7));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s;
    padding: 1rem;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ======== NOSOTROS ======== */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
}


/* ======== CONTACTO ======== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.map-container {
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

/* ======== FOOTER ======== */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
}

/* ======== RESPONSIVE DESIGN ======== */
@media(max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-menu {
        /* Aquí se podría implementar un menú hamburguesa con JavaScript */
        display: none;
    }
    
    .about-container, .contact-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}


/* ======== ESTILOS DEL CARRUSEL DE PROYECTOS (3 EN 3) ======== */
.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 2rem auto 0 auto;
}

.carousel-slides {
    position: relative;
    overflow: hidden;
}

/* Cada grupo de 3 proyectos es un slide */
.slide-group {
    display: none; /* Oculta todos los grupos por defecto */
    width: 100%;
    animation: fadeEffect 0.8s; /* Animación de desvanecimiento */
}

.slide-group.active-slide {
    display: block; /* Muestra solo el grupo activo */
}

/* Reutilizamos la cuadrícula de proyectos dentro de cada slide */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Siempre 3 columnas */
    gap: 2rem;
}

.project-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 500px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease-out;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: var(--white-color);
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--white-color);
}
.project-overlay p {
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Botones de navegación */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    border: none;
    cursor: pointer;
    padding: 0.8rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.carousel-button:hover {
    background-color: var(--white-color);
    transform: translateY(-50%) scale(1.1);
}

.prev-button {
    left: -25px; /* Posiciona los botones fuera del contenedor principal */
}

.next-button {
    right: -25px;
}

/* Animación de desvanecimiento */
@keyframes fadeEffect {
    from {opacity: .4}
    to {opacity: 1}
}

/* Ajustes responsivos */
@media(max-width: 1200px) {
    .prev-button { left: 10px; }
    .next-button { right: 10px; }
}

@media(max-width: 992px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr; /* 2 columnas en tabletas */
    }
}

@media(max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
}

.unit-body {
	flex: 0 1 auto;
}

/* ======== ESTILOS DEL AVISO EMERGENTE (MODAL) ======== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white-color);
    padding: 2rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 450px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close-btn:hover {
    color: var(--dark-color);
}

#modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Estilos para el ícono de éxito */
#modal-icon.success i {
    color: #28a745; /* Verde */
}

/* Estilos para el ícono de error */
#modal-icon.error i {
    color: #dc3545; /* Rojo */
}

#modal-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}


/* --- ESTILO TIPO GEMINI PARA EL TÍTULO --- */

.hero-gemini-style {
    font-family: 'Outfit', sans-serif;
    font-size: 5rem; /* Tamaño grande e impactante */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px; /* Espaciado cerrado, muy moderno */
    margin-bottom: 1rem;
    text-align: left;
    
    /* Efecto de degradado tipo Gemini */
    background: linear-gradient(90deg, #4285f4, #9b72cb, #d96570); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-accent {
    font-size: 3.5rem;
    font-weight: 500;
    display: block;
    /* Color blanco o un gris muy claro para contraste */
    -webkit-text-fill-color: #ffffff; 
    opacity: 5.9;
}

.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 350;        /* Controla el grosor del texto. */
    font-size: 1.5rem;       /* Tamaño grande */
    color: #ffffff;
    max-width: 600px;
    margin-bottom: 2.5rem;   /* Agrega espacio inferior al elemento. */
    text-align: left;
}

/* Ajuste para móviles */
@media(max-width: 768px) {
    .hero-gemini-style {
        font-size: 3rem;
    }
    .subtitle-accent {
        font-size: 2rem;
    }
}

/* --- ESTILO DE MARCA TIPO LUCASSI.COM.MX --- */

.hero-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900; /* Extra grueso, estilo logo */
    font-size: 5rem;  /* Tamaño grande */
    text-transform: uppercase; /* Siempre mayúsculas */
    letter-spacing: 1px; /* Letras un poco más juntas para solidez */
    margin-bottom: 0;     /* Pegado al subtítulo */
    line-height: 1;
    color: var(--white-color);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5); /* Sombra suave para resaltar sobre el fondo */
}

.hero-tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 550; /* Grosor medio */
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 6px; /* Letras muy separadas (tracking) para elegancia */
    color: #ffffff;      /*#e0e0e0 Un blanco ligeramente grisáceo */
    margin-bottom: 2rem;
    display: block;
    /*text-shadow: 1px 1px 5px rgba(0,0,0,0.5); */
	text-shadow: 2px 2px 10px rgba(0,0,0,0.5);  Sombra suave para resaltar sobre el fondo 
}

/* Ajuste para celulares */
@media(max-width: 768px) {
    .hero-brand {
        font-size: 3.5rem;
    }
    .hero-tagline {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }
}

/* ======== BOTÓN VOLVER ARRIBA ======== */
#scrollTopBtn {
    position: fixed; /* Fijo en la pantalla */
    bottom: 30px;
    right: 30px;
    z-index: 999; /* Por encima de todo, excepto el modal */
    
    background-color: var(--accent-color); /* Color ámbar/naranja de tu marca */
    color: var(--dark-color);
    
    border: none;
    outline: none;
    cursor: pointer;
    
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Forma circular */
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    
    /* Estado inicial: Oculto */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Ligeramente desplazado hacia abajo */
    transition: all 0.3s ease-in-out;
}

/* Clase para mostrar el botón */
#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background-color: #ffc400; /* Un tono más claro al pasar el mouse */
    transform: translateY(-5px); /* Pequeño salto al hacer hover */
}

/* ======== BOTÓN DE IDIOMA ======== */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(13, 71, 161, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white-color) !important;
}

@media(max-width: 768px) {
    .lang-toggle {
        display: inline-flex;
        margin-top: 1rem;
    }
}