/* ============================================
   OBRAS — CARRUSEL DE PROYECTOS
   ============================================ */
.obras-container {
    max-width: 1200px;
    margin: 20px auto;  
    padding: 0 20px;
    position: relative;
}

.carousel-controls {
    display: flex;
    align-items: center;  /* Centra verticalmente los botones con las tarjetas */
    justify-content: space-between; /* Distribuye el espacio */
    gap: 15px;            /* Espacio controlado entre botones y carrusel */
    width: 100%;          /* Asegura que use todo el ancho disponible */
}

.carousel-window {
    overflow: hidden;
    flex-grow: 1;         /* Hace que la ventana ocupe TODO el espacio del medio */
    width: auto;          /* Cambiado de 100% para evitar que empuje los botones */
}

.obras-grid {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    padding: 10px 0;
}

/* ============================================
   PROYECTO CARDS
   ============================================ */
.proyecto-card {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #fff;
    margin-bottom: 50px;
}

/* 1. Añadimos la transición a la imagen por defecto */
.proyecto-card img {
    width: 100%;
    height: 550px; 
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease; /* Transición suave para agrandar y oscurecer */
}

/* 2. Efecto al pasar el mouse sobre la tarjeta */
.proyecto-card:hover img {
    transform: scale(1.08); /* Agranda la imagen un 8% */
    filter: brightness(0.50); /* Oscurece la imagen reduciendo el brillo al 75% */
}

.proyecto-card .badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 15px;
    font-weight: 800;
    font-size: 11px;
    border-radius: 3px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(39, 23, 23, 0.15);
    color: #333;
    white-space: nowrap;
}
.card-overlay {
    position: absolute;
    top: 0;         /* Cambiado de bottom: 0 para cubrir toda la tarjeta */
    left: 0;
    width: 100%;
    height: 100%;   /* Ocupa el alto completo */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.proyecto-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay-icon {
    font-size: 1.3rem;
}

.card-overlay-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-overlay-plus {
    color: white;
    font-size: 3.5rem;       /* Tamaño grande para que destaque al medio */
    font-weight: 300;        /* Estilo fino y minimalista */
    line-height: 1;
    pointer-events: none;    /* Evita interferencias con el click */
}

@media (max-width: 768px) {
    .card-overlay {
        opacity: 1;
    }
}


/* ============================================
   FLECHAS DE NAVEGACIÓN
   ============================================ */
.prev-btn, .next-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.prev-btn:hover, .next-btn:hover { 
    background: #fcfcfc; 
}

/* ============================================
   OBRAS MENORES — SECCIÓN INFO
   ============================================ */
.obras-menores-info {
    margin-top: 50px;
    background-color: #f9f7f4;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 100px;
}

.obras-menores-inner {
    display: flex;
    align-items: stretch;
}

.obras-menores-imagen {
    flex: 0 0 55%;
    width: 55%;
    margin-left: 50px;
}

.obras-menores-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.obras-menores-texto {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.obras-menores-texto h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cafe-oscuro);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dorado);
}

.obras-menores-texto p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.obras-menores-texto ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.obras-menores-texto ul li {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}

.obras-menores-texto ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--dorado);
    font-size: 0.85rem;
}

/* ============================================
   MODAL LIGHTBOX
   ============================================ */
.modal-lightbox {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
}

#mainImageModal {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 15px;
}

.thumbnails-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    overflow-x: auto;
    padding: 4px;
}

.thumbnails-container img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border 0.3s;
    flex-shrink: 0;
}

.thumbnails-container img.active,
.thumbnails-container img:hover { 
    border-color: #fff; 
}

.close-modal {
    position: fixed;
    top: 15px; 
    right: 20px;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
    z-index: 2001;
}

.close-modal:hover { opacity: 1; }

/* ============================================
   POLÍTICA DE PRIVACIDAD
   ============================================ */
.politica-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 80px;
}

.politica-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.politica-contenido {
    max-width: 860px;
    margin: 60px auto 0;
    padding: 0 30px;
    font-family: 'Arial', sans-serif;
}

.politica-contenido h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.politica-contenido h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #8B6914;
    margin: 14px auto 36px;
    border-radius: 2px;
}

.politica-contenido > p:first-of-type {
    font-size: 0.97rem;
    color: #555;
    line-height: 1.85;
    margin-bottom: 40px;
    padding: 20px 24px;
    background: #f9f7f4;
    border-left: 4px solid #8B6914;
    border-radius: 0 6px 6px 0;
}

.politica-contenido h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 44px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e2d9;
}

.politica-contenido h2:not(:first-of-type) { 
    margin-top: 50px; 
}

.politica-contenido p {
    font-size: 0.93rem;
    color: #4a4a4a;
    line-height: 1.85;
    margin-bottom: 18px;
    text-align: justify;
    hyphens: auto;
}

.politica-contenido p:last-child { 
    margin-bottom: 0; 
}

.politica-contenido ul {
    margin: 0 0 18px;
    padding-left: 20px;
}

.politica-contenido ul li {
    font-size: 0.93rem;
    color: #4a4a4a;
    line-height: 1.85;
    margin-bottom: 8px;
    text-align: justify;
    hyphens: auto;
}

.politica-contenido ul ul {
    margin-top: 6px;
    margin-bottom: 4px;
    padding-left: 18px;
    list-style: none;
}

.politica-contenido ul ul li {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 4px;
    padding-left: 10px;
    border-left: 2px solid #e8e2d9;
}

.politica-contenido a {
    color: #8B6914;
    word-break: break-all;
    text-decoration: none;
}

.politica-contenido a:hover { 
    text-decoration: underline; 
}

/* ============================================
   MEDIA QUERIES (ORGANIZADAS POR CAPAS)
   ============================================ */

/* --- TABLETS GRANDES (HASTA 992px) --- */
@media (max-width: 992px) {
    .proyecto-card {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }

    .obras-menores-imagen {
        flex: 0 0 50%;
        width: 50%;
    }

    .obras-menores-texto { 
        padding: 30px 25px; 
    }
}

/* --- TABLETS / MÓVILES (HASTA 768px) --- */
@media (max-width: 768px) {
    .proyecto-card img {
        height: 700px;
    }

    .modal-lightbox { padding: 50px 12px 12px; }

    #mainImageModal {
        max-height: 55vh;
    }

    .thumbnails-container img {
        width: 52px;
        height: 44px;
    }

    .close-modal {
        top: 10px;
        right: 12px;
        font-size: 1.8rem;
    }

    .politica-contenido {
        margin: 40px auto 0;
        padding: 0 18px;
    }

    .politica-contenido h1 { font-size: 1.4rem; }
    .politica-contenido h2 { font-size: 1rem; }

    .politica-contenido p,
    .politica-contenido ul li,
    .politica-contenido > p:first-of-type {
        font-size: 0.88rem;
        line-height: 1.8;
    }
}

/* --- MÓVILES MEDIANOS / PEQUEÑOS (HASTA 600px) --- */
@media (max-width: 600px) {
    .proyecto-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .obras-menores-inner { 
        flex-direction: column; 
    }

    .obras-menores-imagen {
        width: 100%;
        flex: unset;
        height: 220px;
    }

    .obras-menores-texto {
        grid-template-columns: 1fr;
        padding: 24px 18px;
    }
}