/* ========== ESTILOS PRINCIPALES ========== */
:root {
    --navy: #0b2340;
    --sky: #cfeefc;
    --accent: #0f6fb1;
    --gold: #ffd700;
    --card-bg: rgba(255,255,255,0.04);
    --glass: rgba(255,255,255,0.06);
    --text: #e9f2fb;
    --muted: #bcd6ee;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-family: 'Roboto', Arial, sans-serif;
}

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

.admin-content {
    color: #1a1a2e;
}
html, body {
    height: 100%;
    background: linear-gradient(135deg, var(--navy) 0%, #082034 50%, #041826 100%);
    color: var(--text);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.site {
    max-width: 1400px;
    margin: 20px auto;
    padding: 30px;
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

/* ========== PANEL DE ADMINISTRADOR ========== */
.admin-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
}

.admin-btn {
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #ffed4e;
    transform: scale(1.05);
}

/* ========== FORMULARIO CLIENTES ========== */
.client-form-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
}

.client-form-section h3 {
    color: var(--sky);
    margin-top: 0;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.form-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 15px;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.upload-area {
    border: 2px dashed rgba(255,255,255,0.2);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.02);
}

.upload-area i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--muted);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,0,0,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
}

.submit-btn {
    background: var(--accent);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: 100%;
}

.submit-btn:hover {
    background: var(--sky);
    color: var(--navy);
    transform: translateY(-2px);
}

/* ========== HEADER ========== */
header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.logo-container {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--sky), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 25px rgba(11, 172, 255, 0.3);
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.brand-text h1 {
    margin: 0;
    font-size: 28px;
    background: linear-gradient(135deg, var(--sky), var(--text));
    -webkit-background-clip: text;
        background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.brand-text p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 300;
}

.contact-header {
    text-align: right;
}

.contact-header .muted {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.contact-header div {
    font-size: 15px;
    font-weight: 500;
}

/* ========== GALERÍA SLIDER ========== */
.slider-container {
    position: relative;
    overflow: hidden;
    margin-top: 25px;
    border-radius: 16px;
    height: 270px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    height: 100%;
}

.gallery-item {
    position: relative;
    width: 250px !important;
    height: 250px !important;
    flex-shrink: 0;
    margin-right: 10px;
}

.slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background-color: white;
}

.slider-track img:hover {
    transform: scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(11, 172, 255, 0.3);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.9;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.slider-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: var(--sky);
    color: var(--navy);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

/* ========== PROYECTOS ========== */
.projects-gallery-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
}

.projects-gallery-container {
    position: relative;
    overflow: hidden;
    margin-top: 25px;
    border-radius: 16px;
    height: 270px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

.projects-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    height: 100%;
}

.project-item {
    position: relative;
    width: 250px !important;
    height: 250px !important;
    flex-shrink: 0;
    margin-right: 10px;
}

.projects-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background-color: white;
}

.projects-track img:hover {
    transform: scale(1.05);
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}

.projects-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gold);
    border: none;
    color: var(--navy);
    font-size: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.9;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.projects-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: #ffed4e;
    color: var(--navy);
}

.projects-prev {
    left: 15px;
}

.projects-next {
    right: 15px;
}

/* ========== VIDEOS ========== */
.videos-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
}

.dropzone {
    border: 2px dashed rgba(255,255,255,0.2);
    padding: 30px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.dropzone:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.04);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.video-card {
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Contenedor para mantener el mismo alto/estética aunque el video sea vertical (grabado con celular) */
.video-media{
    width:100%;
    aspect-ratio: 16 / 9;
    overflow:hidden;
    border-radius:10px;
    background: rgba(255,255,255,0.03);
}
.video-media video{
    width:100%;
    height:100%;
    object-fit: cover; /* recorta para que todos se vean parejos */
    border-radius:10px;
    display:block;
}

/* ========== AGENTES ========== */
.agents-section {
    margin-top: 50px;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.agent-card {
    background: linear-gradient(135deg, var(--card-bg), rgba(255,255,255,0.02));
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.agent-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
}

.agent-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.agent-card:hover img {
    transform: scale(1.1);
    border-color: var(--accent);
}

/* ========== PROPIEDADES ========== */
.categories {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
}

.category-selectors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category-selector {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}

.category-selector.active {
    background: var(--accent);
    color: white;
}

.category-properties {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-property {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.category-property:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.category-property img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

/* ========== BOTONES FLOTANTES ========== */
.whatsapp-float, .facebook-float, .tiktok-float {
    position: fixed;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
}

.whatsapp-float {
    bottom: 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.facebook-float {
    bottom: 90px;
    background: linear-gradient(135deg, #1877F2, #0D5FD7);
}

.tiktok-float {
    bottom: 160px;
    background: linear-gradient(135deg, #000000, #333333);
    border: 2px solid #ffffff;
}

.whatsapp-float:hover, .facebook-float:hover, .tiktok-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .site {
        margin: 10px;
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .slider-container {
        height: 280px;
    }
    
    .whatsapp-float, .facebook-float, .tiktok-float {
        width: 50px;
        height: 50px;
        right: 15px;
    }
    
    .whatsapp-float {
        bottom: 15px;
    }
    
    .facebook-float {
        bottom: 80px;
    }
    
    .tiktok-float {
        bottom: 145px;
    }
    
    .form-container {
        grid-template-columns: 1fr;
    }
    
    .category-selectors {
        flex-direction: column;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .category-properties {
        grid-template-columns: 1fr;
    }
}
/* ===== Mobile fallback for sliders (prevents invisible carousels on some devices) ===== */
@media (max-width: 768px) {
  .slider-container,
  .projects-gallery-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .slider-track,
  .projects-track {
    transition: none !important;
    transform: none !important;
  }

  .gallery-item {
    width: 80vw !important;
    height: 240px !important;
    scroll-snap-align: start;
  }

  .slider-btn,
  .projects-nav {
    display: none !important;
  }
}

/* ===== Map contact block styling ===== */
.map-section .contact-block,
.map-section .controls {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 14px 16px;
  border-radius: 14px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.map-section .contact-line{
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  padding: 10px 0;
}
.map-section .contact-line i{ color: rgba(255,255,255,0.75); width:18px; text-align:center; }
.map-section .contact-sep{
  height:1px;
  background: rgba(255,255,255,0.08);
}

/* =========================
   Mobile slider hardening
   ========================= */
@media (max-width: 768px) {
  .slider-container { overflow: hidden; }
  .slider-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .gallery-item {
    scroll-snap-align: start;
    flex: 0 0 78vw;
    max-width: 78vw;
  }
  .slider-btn { display: none !important; }
}


/* ===== Hero topbar (Portada según diseño) ===== */
.hero-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 18px;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(0,0,0,.06);
}

.hero-logo{height:42px;width:auto;display:block;filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));}
.hero-menu{display:flex;gap:18px;flex-wrap:wrap;justify-content:center}
.hero-menu a{color:#102a43;text-decoration:none;font-weight:900;opacity:1}

.hero-menu a:hover{opacity:1;text-decoration:underline}

.hero-cta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}
.hero-phone{display:none;}

.hero-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:12px;background:#0b2340;color:#fff;text-decoration:none;font-weight:900;box-shadow:0 8px 22px rgba(0,0,0,.18)}

.hero-btn:hover{background:rgba(255,255,255,0.18)}
.hero-accent{display:inline-block}
@media (max-width: 900px){
  .hero-cta{justify-content:center}
}


/* Banners por categoría */
.cat-banner{margin:10px 0 0 0;}
.cat-banner img{width:100%;height:160px;object-fit:contain;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);}

.wa-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding:10px 14px;border-radius:999px;background:#25D366;color:#fff;font-weight:700;text-decoration:none;font-size:14px;}
.wa-btn:hover{filter:brightness(0.95);}


/* Mini carrusel automático por proyecto (thumbnails) */
.project-block-thumbs{overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; padding-bottom:6px;}
.thumb-track{display:flex;gap:12px;align-items:center; scroll-snap-type:x mandatory;}
.thumb-track img{flex:0 0 auto; width:240px; height:240px; object-fit:contain; border-radius:16px; background:rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.12); scroll-snap-align:start;}
@keyframes scrollLeft {
0%{transform:translateX(0)}
100%{transform:translateX(-50%)}
}
/* Duplicamos visualmente para loop (JS mejora). Si no hay duplicación, se mantiene suave. */



/* ===== HERO PORTADA FULLSCREEN + DROPDOWN ===== */
.hero-banner{
  width:100%;
  min-height:100vh;
  padding:22px 22px 40px;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

.hero-overlay{
  flex:1;
  display:flex;
  align-items:flex-end;
}

.hero-overlay-inner{
  width:100%;
  padding:0 6px 10px;
}

.hero-dropdown{position:relative; display:flex; align-items:center;}
.hero-dropbtn{
  appearance:none;
  border:0;
  background:transparent;
  color:#0b2340;
  font-weight:700;
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.hero-dropbtn:focus{outline:2px solid rgba(15,111,177,.35); outline-offset:2px;}
.hero-dropbtn:hover{background:rgba(11,35,64,.06);}
.hero-dropmenu{
  position:absolute;
  top: 100%!important;
  margin-top: -2px;
  left:0;
  min-width:290px;
  padding:10px;
  border-radius:14px;
  background:rgba(255,255,255,0.98);
  border:1px solid rgba(11,35,64,.12);
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  display:none;
  z-index:50;
}
.admin-content h3 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    padding: 0 10px;
    font-size: 16px;
    color: #0b2340;
}
.hero-dropmenu a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  color:#0b2340;
  text-decoration:none;
  font-weight:600;
  opacity:.95;
}
.hero-dropmenu a:hover{background:rgba(15,111,177,.10);}
.hero-dropdown.open .hero-dropmenu{display:block;}

/* Fallback (sin JS): abrir el menú al pasar el mouse */
.hero-dropdown:hover .hero-dropmenu{display:block;}
.hero-dropdown:hover .hero-dropbtn{background:rgba(11,35,64,.06);}

@media (max-width: 860px){
  .hero-topbar{flex-wrap:wrap; justify-content:center;}
  .hero-brand{margin-right:auto;}
  .hero-cta{width:100%; justify-content:space-between;}
  .hero-dropmenu{left:50%; transform:translateX(-50%);}
}


/* Fallback: ensure portada is full screen */
.hero-banner{min-height:100vh;}


/* ===== Nuevos Eventos (Front) ===== */
.events-grid-front{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;margin-top:14px;}
.event-card-front{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.10);border-radius:18px;overflow:hidden;box-shadow:0 14px 38px rgba(0,0,0,.20);}
.event-card-img{width:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.22);padding:10px;}
.event-card-img img{width:100%;height:auto;max-height:560px;object-fit:contain;border-radius:14px;}
.event-card-body{padding:14px 14px 16px;}
.event-card-title{font-weight:800;margin-bottom:6px;}
.event-card-desc{opacity:.92;line-height:1.35;}
@media (max-width:560px){
  .event-card-img img{max-height:420px;}
}
/* ===== Mejoras móviles: menú superior + dropdown seleccionable ===== */
.hero-burger{display:none; border:none; background:rgba(11,35,64,.08); color:#0b2340; padding:10px 12px; border-radius:12px; cursor:pointer;}
.hero-burger i{font-size:18px;}
@media (max-width: 860px){
  .hero-burger{display:inline-flex; align-items:center; justify-content:center;}
  .hero-menu{display:none; width:100%; flex-direction:column; align-items:stretch; gap:10px; padding-top:10px;}
  .hero-topbar.nav-open .hero-menu{display:flex;}
  .hero-menu a{padding:12px 12px; border-radius:12px; background:rgba(255,255,255,.92); border:1px solid rgba(0,0,0,.06);}
  .hero-dropdown{width:100%;}
  .hero-dropbtn{width:100%; justify-content:space-between; background:rgba(255,255,255,.92); border:1px solid rgba(0,0,0,.06); padding:12px 12px;}
  .hero-dropmenu{max-height:60vh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;}
}

/* Videos completos (sin recorte) */
.video-player{
  width:100%;
  aspect-ratio:16/9;
  height:auto;
  object-fit:contain;
  background:#000;
  border-radius:16px;
}
/* Imágenes completas (sin recorte) en secciones clave */
.slider-track img,
.project-item img,
.event-card-img img,
.prop-mini-img img{
  object-fit: contain !important;
  background: rgba(255,255,255,0.06);
}


/* ===== Fix carrusel "Proyectos Destacados" en móviles ===== */
@media (max-width: 768px) {
  .projects-gallery-container {
    height: auto;
    padding: 10px 0;
  }

  /* Permitir swipe horizontal en móvil */
  .projects-track {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 5px 10px;
  }

  /* Ocultar scrollbar (sin romper el scroll) */
  .projects-track::-webkit-scrollbar { display: none; }
  .projects-track { scrollbar-width: none; }

  .project-item {
    width: 80vw !important;
    height: 220px !important;
    margin-right: 12px;
  }

  /* Botones opcionales: si molestan en móvil, ocultarlos */
  .projects-btn { display: none; }
  
/* ========== SECCIÓN CONSTRUCTORA ========== */
.constructora-section {
    margin-top: 40px;
    padding: 36px 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.constructora-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
    margin-top: 28px;
}

.constructora-art {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0,0,0,0.3);
    max-width: 100%;
}

.constructora-arte-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    object-fit: contain;
}

.constructora-art-placeholder {
    width: 100%;
    min-height: 340px;
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--muted);
    border: 2px dashed rgba(255,255,255,0.1);
}

.constructora-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

.constructora-logo {
    width: 160px;
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.2);
    display: block;
}

.constructora-logo-placeholder {
    width: 160px;
    height: 90px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--muted);
}

.constructora-desc {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.constructora-desc strong {
    color: var(--sky);
}

.constructora-servicios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    width: 100%;
}

.constructora-serv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.constructora-serv-item i {
    color: #00d9a7;
    font-size: 15px;
    flex-shrink: 0;
}

.constructora-slogan {
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin: 0;
}

.constructora-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 12px;
    padding: 13px 22px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    color: #fff !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    margin-top: 6px;
}

.constructora-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
    color: #fff !important;
}

/* Responsive */
@media (max-width: 860px) {
    .constructora-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .constructora-servicios {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .constructora-servicios {
        grid-template-columns: 1fr;
    }
    .constructora-logo {
        width: 130px;
    }
}

.constructora-logo {
    width: 160px !important;
    max-width: 160px !important;
    height: auto !important;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.2);
    display: block;
}

@media (max-width: 860px) {
    .constructora-inner {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .constructora-art {
        width: 100%;
    }

    .constructora-arte-img {
        width: 100% !important;
        max-width: 480px !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
        border-radius: 16px !important;
    }

    .constructora-logo {
        width: 140px !important;
        max-width: 140px !important;
    }

    .constructora-info {
        width: 100% !important;
        align-items: flex-start !important;
    }

    .constructora-servicios {
        grid-template-columns: 1fr !important;
    }

    .constructora-cta {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .constructora-arte-img {
        max-width: 100% !important;
    }

    .constructora-logo {
        width: 120px !important;
        max-width: 120px !important;
    }
}
}
/* ========== LIGHTBOX ========== */
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#lightbox-overlay.active {
    display: flex;
    animation: lb-fade-in 0.25s ease;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    #lightbox-overlay.active { animation: none; }
    #lb-img { transition: none !important; }
}

#lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    transition: opacity 0.2s ease;
    background: rgba(255,255,255,0.04);
    display: block;
}

#lb-img.loading { opacity: 0.3; }

#lb-close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100001;
}
#lb-close:hover { background: rgba(255,255,255,0.25); }

.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 22px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100001;
}
.lb-arrow:hover { background: rgba(255,255,255,0.28); }
.lb-arrow:disabled { opacity: 0.2; cursor: default; }

#lb-prev { left: 16px; }
#lb-next { right: 16px; }

#lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-family: 'Roboto', Arial, sans-serif;
    background: rgba(0,0,0,0.4);
    padding: 6px 16px;
    border-radius: 999px;
    z-index: 100001;
    pointer-events: none;
}

#lb-caption {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-family: 'Roboto', Arial, sans-serif;
    text-align: center;
    max-width: 600px;
    z-index: 100001;
    pointer-events: none;
}

/* Cursor pointer en imágenes con lightbox */
.lb-trigger { cursor: zoom-in !important; }