/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #f4f4f4; /* Texto claro para contraste con fondo oscuro */
    /* Fondo aún más oscuro para mayor contraste */
    background-image: linear-gradient(rgba(30, 15, 5, 0.92), rgba(45, 20, 0, 0.92)), url('planos.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #002868; /* USA Blue */
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 1.5rem;
    color: #BF0A30; /* USA Red */
}

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

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #BF0A30;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('albanil.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 70px; /* Offset for fixed header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(101, 67, 33, 0.6); /* Coffee filter */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-logo {
    max-width: 550px; /* Tamaño ajustado nuevamente (reducido un poco más) */
    width: 100%; /* Asegurar respuesta en móviles */
    margin: 0 auto 30px; /* Centrado y margen inferior */
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.hero-brand {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero .slogan {
    font-weight: 700;
    font-size: 1.5rem;
    color: #f4d03f; /* Gold/Yellow */
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: #BF0A30;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #8a0622;
}

/* Sections Common */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.underline {
    width: 80px;
    height: 4px;
    background: #BF0A30;
    margin: 0 auto;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    /* Eliminado container oscuro solicitado por usuario */
    /* background: rgba(0, 0, 0, 0.4); */
    /* padding: 30px; */
    /* border-radius: 10px; */
}

.about-text {
    flex: 1;
    color: #fff; /* Texto blanco */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9); /* Sombra fuerte para legibilidad sobre fondo */
}

.about .section-title h2 {
    color: #fff; /* Título blanco en sección About */
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Services Section */
.services {
    /* Fondo con imagen inges.jpg detrás de las tarjetas, con overlay suave */
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('inges.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333; /* Texto oscuro dentro de servicios */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff; /* Fondo blanco sólido para las tarjetas */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    /* Sombra para contraste */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    border-bottom: 4px solid #002868;
}

/* Cursor pointer for clickable service cards */
.service-card[data-category] {
    cursor: pointer;
    position: relative;
}

/* Add a visual cue for clickable cards */
.service-card[data-category]::after {
    content: 'Ver más';
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #999;
    font-size: 0.9rem;
    transition: color 0.3s;
    border: 1px solid #ccc;
    padding: 2px 8px;
    border-radius: 15px;
}

.service-card[data-category]:hover::after {
    color: #BF0A30;
    border-color: #BF0A30;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: #BF0A30;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.service-areas {
    margin-top: 50px;
    text-align: center;
    padding: 20px;
    background: #f4f4f4;
    border-radius: 8px;
}

.service-areas h3 {
    color: #002868;
    margin-bottom: 10px;
}

/* Gallery Section (Carousel) */
.gallery {
    position: relative;
    background: #333;
    color: #fff;
    padding: 60px 0;
}

.gallery .section-title h2 {
    color: #fff !important;
}

.carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-track-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 33.333%; /* 3 items por defecto */
    box-sizing: border-box;
    padding: 0 5px;
    position: relative; /* Reset position */
}

.carousel-slide img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Imágenes cuadradas */
    object-fit: cover;
    filter: sepia(20%);
    border-radius: 5px;
    display: block;
}

/* Responsive Carousel */
@media (max-width: 900px) {
    .carousel-slide {
        min-width: 50%;
    }
}

@media (max-width: 600px) {
    .carousel-slide {
        min-width: 100%;
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    z-index: 10;
    font-size: 1.5rem;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.carousel-nav {
    display: none; /* Ocultamos los dots por ahora en el layout multi-item */
}

/* Contact Section */
.contact {
    background: #f9f9f9;
    color: #333; /* Texto oscuro en contacto */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #BF0A30;
    width: 40px;
    text-align: center;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #002868;
    color: #fff;
    border-radius: 50%;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #BF0A30;
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0px;
        height: 100vh;
        top: 70px;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        border-left: 1px solid #ddd;
        padding-top: 40px;
    }

    .nav-links.active {
        transform: translateX(0%);
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Humedades Severas Section */
.humedades {
    background: #e0e0e0;
    color: #333;
}

.humedades-top-row {
    display: flex;
    align-items: stretch; /* Alineación stretch para misma altura */
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.humedades-info {
    flex: 2; /* Ocupa más espacio (aprox 66%) */
    text-align: left;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.humedades-info h3 {
    color: #002868;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.humedades-features {
    margin: 20px 0;
    list-style: none;
}

.humedades-features li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.humedades-features i {
    color: #BF0A30;
    margin-top: 5px;
}

.humedades-cta {
    font-weight: bold;
    color: #002868;
    margin-top: 20px;
    font-size: 1.2rem;
    border-top: 2px solid #f4f4f4;
    padding-top: 15px;
}

.humedades-video {
    flex: 1; /* Ocupa menos espacio (aprox 33%) */
    width: 100%;
    min-width: 300px; /* Ancho mínimo para que no se vea ridículamente pequeño */
    display: flex;
    flex-direction: column;
}

/* Header Social Icons */
.nav-social a {
    color: #002868; /* Blue standard */
    font-size: 1.2rem;
}

.nav-social a:hover {
    color: #BF0A30; /* Red hover */
}

.video-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    background: #000;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Continuous Carousel Styles */
.humedades-carousel-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.humedades-track {
    display: inline-flex;
    animation: scroll 30s linear infinite;
    gap: 20px;
}

.humedades-track:hover {
    animation-play-state: paused;
}

.humedades-track .slide {
    flex: 0 0 auto;
    width: 250px; /* Ancho fijo de cada slide */
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.humedades-track .slide:hover {
    transform: scale(1.05);
}

.humedades-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 9 - 20px * 9)); } /* Mueve 9 items + gaps */
}

@media (max-width: 768px) {
    .humedades-top-row {
        flex-direction: column;
        text-align: center;
    }
    
    .humedades-info {
        text-align: center;
    }
}

/* Map Container */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Service Modal Styles */
.service-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.service-modal.active {
    display: flex;
}

.service-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    color: #333;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

#modalTitle {
    color: #002868;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 10px;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.modal-gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.modal-gallery-grid img:hover {
    transform: scale(1.05);
}
