/* --------------------------------------------------- */
/* 1. VARIABLES CSS (CUSTOM PROPERTIES) PARA FÁCIL MODIFICACIÓN */
/* --------------------------------------------------- */
:root {
    --color-primary: #1a1a1a; /* Negro/Gris oscuro principal */
    --color-secondary: #c5a47e; /* Dorado/Naranja secundario */
    --color-background: #f8f9fa; /* Fondo claro */
    --color-text-light: #ffffff;
    --color-text-dark: #333333;
    --font-family-headings: 'Playfair Display', serif;
    --font-family-base: 'Montserrat', sans-serif;
    --spacing-section: 80px;
}

/* --------------------------------------------------- */
/* 2. ESTILOS GENERALES Y UTILIDADES */
/* --------------------------------------------------- */
body {
    font-family: var(--font-family-base);
    color: var(--color-text-dark);
    background-color: var(--color-text-light);
    overflow-x: hidden; /* Previene el desbordamiento horizontal por las animaciones */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 700;
}

.section {
    padding-top: var(--spacing-section);
    padding-bottom: var(--spacing-section);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--color-primary);
}

/* --------------------------------------------------- */
/* 3. BOTONES PERSONALIZADOS */
/* --------------------------------------------------- */
.btn-brand {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-secondary);
}

.btn-brand:hover {
    background-color: transparent;
    color: var(--color-secondary);
    transform: translateY(-3px);
}

.btn-outline-brand {
        background-color: transparent;
    color: var(--color-text-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-text-light);
}

.btn-outline-brand:hover {
    background-color: var(--color-text-light);
    color: var(--color-primary);
}


/* --------------------------------------------------- */
/* 4. ENCABEZADO Y NAVEGACIÓN (HEADER) */
/* --------------------------------------------------- */

.header__logo-img {
    height: 95px;
    object-fit: contain;
}

.header__nav {
    background-color: transparent;
    transition: background-color 0.4s ease-in-out;
}

.header__nav.scrolled {
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
}

.header__logo {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-light) !important;
}

.header__nav-link {
    color: var(--color-text-light) !important;
    font-weight: 500;
    margin: 0 15px;
    position: relative;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

/* Cambiar el color del ícono del menú hamburguesa a blanco */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* --------------------------------------------------- */
/* 5. SECCIÓN HERO */
/* --------------------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    text-align: center;
    overflow: hidden;
}

.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;
}

.hero__title {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Media Queries para hacer el título del Hero responsivo */
@media (max-width: 992px) {
    .hero__title {
        font-size: 3rem; /* Tamaño para tabletas */
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem; /* Tamaño para móviles */
    }
}

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para el carrusel del Hero */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-carousel .carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-carousel .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------- */
/* 6. SECCIÓN NOSOTROS (ABOUT) */
/* --------------------------------------------------- */
.about__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.about__list-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.about__list-icon {
    color: var(--color-secondary);
    margin-right: 15px;
    font-size: 1.2rem;
}

/* --------------------------------------------------- */
/* 7. SECCIÓN SERVICIOS */
/* --------------------------------------------------- */
.services {
    background-color: var(--color-background);
}

.service-card {
    background-color: var(--color-text-light);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card__icon {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

/* --------------------------------------------------- */
/* 8. SECCIÓN PROYECTOS */
/* --------------------------------------------------- */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3; /* Establece una relación de aspecto (ej. 4:3) */
    display: flex; /* Asegura que el contenido se alinee correctamente */
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* La imagen cubre todo el espacio sin deformarse */
    transition: transform 0.4s ease;
}

.project-card:hover .project-card__image {
    transform: scale(1.1);
}

.project-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
    color: var(--color-text-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.project-card__title {
    margin-bottom: 5px;
}

.project-card .btn-info-project {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    margin-top: 15px;
    align-self: flex-start; /* Alinea el botón a la izquierda */
}

.project-card:hover .btn-info-project {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para el Modal de Proyectos */
.project-modal .modal-content {
    border-radius: 8px;
    border: none;
}

.project-modal .modal-header {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-bottom: none;
}

.project-modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.project-modal .modal-title {
    font-family: var(--font-family-headings);
}

.project-modal .nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.project-modal .nav-tabs .nav-link {
    color: var(--color-text-dark);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
}

.project-modal .nav-tabs .nav-link.active {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
    background-color: transparent;
}

.project-modal .tab-pane {
    padding: 20px 5px;
}

.project-modal .carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.spec-item {
    /* Estilos para convertirlo en un bloque/tarjeta */
    display: flex;
    align-items: center;
    background-color: var(--color-background);
    padding: 20px;
    border-radius: 8px;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease; /* Transición suave para el hover */
}

.spec-item i {
    font-size: 1.8rem;
    color: var(--color-secondary);
    margin-right: 15px;
    min-width: 40px; /* Usamos min-width para asegurar alineación */
}

.spec-item div {
    display: flex;
    flex-direction: column;
}

.spec-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--color-secondary);
}

/* Versión pequeña del spec-item para el modal de ubicación */
.spec-item-sm {
    display: flex;
    align-items: center;
    padding: 10px; /* Padding reducido */
    border-radius: 6px;
    background-color: var(--color-background);
    margin-bottom: 10px; /* Espacio entre elementos */
}

.spec-item-sm i {
    font-size: 1.2rem; /* Icono más pequeño */
    color: var(--color-secondary);
    margin-right: 10px;
    min-width: 25px;
}

.spec-item-sm div {
    font-size: 0.9rem; /* Texto más pequeño */
    line-height: 1.2;
}

.modal-map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    border-radius: 8px;
}

.modal-map-container .map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.modal-contact-form .form-control {
    background-color: var(--color-background);
}

/* --------------------------------------------------- */
/* 9. SECCIÓN CTA (LLAMADA A LA ACCIÓN) */
/* --------------------------------------------------- */
.cta {
    background-image: url('https://picsum.photos/1920/800?grayscale&blur=2'); /* <!-- IMAGEN_DE_FONDO_CTA --> */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    text-align: center;
    color: var(--color-text-light);
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta__title {
    font-size: 2.8rem;
}

/* --------------------------------------------------- */
/* 10. SECCIÓN CONTACTO */
/* --------------------------------------------------- */
.contact__info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact__info-icon {
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-right: 20px;
    width: 30px;
}

.contact__form .form-control {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    padding: 15px 0;
    background: transparent;
}

.contact__form .form-control:focus {
    box-shadow: none;
    border-color: var(--color-secondary);
}

/* --------------------------------------------------- */
/* 11. PIE DE PÁGINA (FOOTER) */
/* --------------------------------------------------- */
.footer {
    background-color: var(--color-primary);
    color: rgba(255,255,255,0.7);
}

.footer__logo {
        font-family: var(--font-family-headings);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-decoration: none;
}

.footer__social-icon {
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer__social-icon:hover {
    color: var(--color-secondary);
}

.footer__copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 20px;
}


/* ============================================= */
/* ESTILOS PARA MODAL DE PROYECTOS (FULLSCREEN RESPONSIVE) */
/* ============================================= */
.project-modal .modal-dialog {
    /* En dispositivos pequeños (móviles), el modal ocupará casi todo el ancho */
    width: auto;
    margin: 0.5rem;
}

.project-modal .modal-content {
    /* Forzamos una altura grande para el modal */
    height: 80vh;
    max-height: 80vh;
}

.project-modal .modal-body {
    /* Hacemos que solo el cuerpo del modal sea desplazable si el contenido es muy largo */
    overflow-y: auto;
}

/* En dispositivos más grandes (tablets, laptops, desktops), hacemos el modal más ancho */
@media (min-width: 768px) {
    .project-modal .modal-dialog {
        max-width: 80vw; /* Ocupa el 95% del ancho de la pantalla */
        margin: 1.75rem auto; /* Margen vertical estándar de Bootstrap */
    }
}


.hero-carousel .carousel-item img{
    width: 100%;
    height: 100vh;
    object-fit: cover; /* La imagen cubre el contenedor sin deformarse */
    object-position: center;
}