/* --- Variables y Estilos Base --- */
:root {
    --primary-orange: #FF6B35;
    --primary-black: #000000;
    --gradient-1: linear-gradient(135deg, #FF6B35 0%, #FF8A50 100%);
}
body {
    background-color: var(--primary-black);
    color: #E0E0E0;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
p { color: #BDBDBD; }
h1, h2, h3, h4, h5, h6 { color: #FFFFFF; }

/* --- Fondos y Efectos --- */
.hero-bg {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(255,107,53,0.3) 100%), url('https://page1.genspark.site/v1/base64_upload/09e48515cd5bb2d106f6d2a7fac88aac');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.geometric-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255,107,53,0.1) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(255,107,53,0.1) 0%, transparent 40%);
    z-index: 0;
}
.floating-particles { position: absolute; width: 100%; height: 100%; overflow: hidden; z-index: 1; }
.particle { position: absolute; width: 4px; height: 4px; background: var(--primary-orange); border-radius: 50%; animation: float 12s ease-in-out infinite; }
.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1.5s; }
.particle:nth-child(3) { left: 30%; animation-delay: 3s; }
.particle:nth-child(4) { left: 40%; animation-delay: 4.5s; }
.particle:nth-child(5) { left: 50%; animation-delay: 6s; }
.particle:nth-child(6) { left: 60%; animation-delay: 7.5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 9s; }
.particle:nth-child(8) { left: 80%; animation-delay: 10.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }
@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* --- Barra de Navegación Arreglada --- */
.navbar { backdrop-filter: blur(10px); background: rgba(0,0,0,0.8); transition: all 0.3s ease; }
.navbar.scrolled { background: rgba(0,0,0,0.95); box-shadow: 0 5px 20px rgba(0,0,0,0.3); }
.nav-link {
    color: #E0E0E0;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
    font-weight: 500;
}
.nav-link:hover { color: var(--primary-orange); }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-orange);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* --- Botones --- */
.futuristic-btn {
    position: relative; background: var(--gradient-1); border: none; color: white !important;
    padding: 15px 40px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 50px; cursor: pointer; overflow: hidden; transition: all 0.3s ease;
    display: inline-block; text-decoration: none;
}
.futuristic-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255,107,53,0.4); }
.futuristic-btn:disabled { background: #aaa; cursor: not-allowed; }

/* --- Tarjetas (Servicios, Proyectos) --- */
.service-card .service-icon { font-size: 3rem; color: var(--primary-orange); margin-bottom: 1rem; transition: all 0.3s ease; }
.service-card:hover .service-icon { transform: scale(1.2) rotate(10deg); color: #FF8A50; }
.project-card {
    position: relative; overflow: hidden; border-radius: 20px; transition: all 0.5s ease; cursor: pointer;
    background-color: #1A202C;
}
.project-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.project-card img {
    width: 100%; height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.project-card:hover img { transform: scale(1.05); }
.project-card .card-content {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, transparent 100%);
    opacity: 0; transform: translateY(20px); transition: all 0.4s ease;
}
.project-card:hover .card-content { transform: translateY(0); opacity: 1; }

/* --- Efecto para Galería --- */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: all 0.5s ease;
    cursor: pointer;
    background-color: #1A202C;
}
.gallery-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.gallery-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 107, 53, 0.6) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    border-radius: 20px;
    z-index: 1;
}
.gallery-card:hover::after { opacity: 1; }
.gallery-card img {
    width: 100%; height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: saturate(100%);
}
.gallery-card:hover img {
    transform: scale(1.05);
    filter: saturate(140%);
}

/* --- Sección Premium Living --- */
#premium-living {
    /* La clase bg-gray-900 del HTML funcionará como color de respaldo */
    /* La capa de degradado oscuro asegura que el texto blanco sea legible sobre la imagen */
    background-image: linear-gradient(to bottom, rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.9)), url('https://i.imgur.com/NF3qmtE.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.feature-icon {
    font-size: 3.5rem;
    color: var(--primary-orange);
    transition: all 0.3s ease;
}
.feature-icon:hover {
    transform: scale(1.2);
    color: #FF8A50;
}

/* --- Formulario de Contacto Mejorado --- */
.form-input {
    width: 100%;
    background-color: rgba(45, 55, 72, 0.5);
    border: 1px solid #4A5568;
    color: #FFFFFF;
    padding: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.4);
    background-color: rgba(45, 55, 72, 0.8);
}
#form-status { font-weight: 600; }

/* --- Animaciones de Scroll y Utilidades --- */
.fade-in, .slide-up { opacity: 0; transition: all 0.8s ease-out; }
.fade-in { transform: translateY(30px); }
.slide-up { transform: translateY(50px); }
.fade-in.visible, .slide-up.visible { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; } 
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Lightbox Actualizado --- */
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(5px); z-index: 1000;
    align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#lightbox-img { 
    max-width: 100%;
    max-height: 80vh; /* Ajusta para dejar espacio para la descripción */
    object-fit: contain; 
    border-radius: 8px;
}
#lightbox-caption {
    color: #ddd;
    margin-top: 15px;
    text-align: center;
    max-width: 70ch;
    font-size: 1.1rem;
    line-height: 1.6;
}
.close-lightbox { 
    position: absolute; top: -10px; right: 5px;
    color: white; font-size: 45px; font-weight: bold;
    cursor: pointer; transition: color 0.3s;
    z-index: 1001;
}
.close-lightbox:hover { color: var(--primary-orange); }

/* Botones de Navegación del Lightbox */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}
.prev-btn { left: 10px; border-radius: 3px 0 0 3px; }
.next-btn { right: 10px; border-radius: 0 3px 3px 0; }
.prev-btn:hover, .next-btn:hover { background-color: rgba(255, 107, 53, 0.8); }

/* --- Contact Info --- */
.contact-item i {
    color: var(--primary-orange);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}