/* ==========================================
   1. ESTILOS GENERALES Y CONFIGURACIÓN
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif; /* Tipografía técnica y legible */
}

body {
    background-color: #12151c; /* Gris pizarra ultra oscuro y técnico */
    color: #ffffff;
    overflow-x: hidden;
}

/* ==========================================
   2. BARRA DE NAVEGACIÓN (HEADER)
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: #1a1e26; /* Gris oscuro sólido y formal */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Ajuste para resaltar tu logo circular */
.logo-img {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #ffffff; 
    padding: 3px;              
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #ffffff;
}

/* Menú de Enlaces e Integración del Desplegable */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: #e2e8f0; /* Blanco grisáceo muy elegante */
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

/* Estructura del Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger i {
    font-size: 0.75rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

/* Caja del menú desplegable (Gris técnico a juego) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1a1e26; /* Mismo gris formal de la barra superior */
    min-width: 260px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    top: 100%; 
    left: 25px; 
    padding-top: 10px; 
    padding-bottom: 8px;
    z-index: 1100;
}

/* Enlaces individuales dentro de la lista */
.dropdown-content a {
    color: #94a3b8; /* Gris medio para las opciones secundarias */
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    margin-left: 0; 
    font-size: 0.9rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
}

.dropdown-content a:last-child {
    border-bottom: none; 
}

/* Comportamientos al pasar el cursor (Hover) */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-content a:hover {
    background-color: #242936; /* Resaltado en un gris un poco más claro */
    color: #a855f7;            /* Destello morado sutil solo al seleccionar */
    padding-left: 25px;        
}

.nav-menu a.active, .nav-menu a:hover {
    color: #a855f7; /* El morado se usa solo para indicar interacción o selección */
}

/* ==========================================
   3. SECCIÓN PRINCIPAL (HERO)
   ========================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #12151c url('obra-fondo.jpg') no-repeat center center/cover;
    padding: 0 20px;
}

/* Filtro oscuro neutro sobre la foto para matar el exceso de morado */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 21, 28, 0.85), rgba(26, 30, 38, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin-top: 80px;
}

/* Título estilizado */
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic; 
    font-weight: 600;
    font-size: 3.8rem;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

/* Párrafo descriptivo */
.hero-content p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    color: #94a3b8; /* Gris claro técnico muy elegante y limpio */
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ==========================================
   4. BOTÓN DE ACCIÓN
   ========================================== */
.btn-primary {
    display: inline-block;
    background-color: #2563eb; /* Tu azul rey original */
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

/* ==========================================
   5. BOTÓN FLOTANTE DE WHATSAPP
   ========================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366; 
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a; 
}


/* ==========================================
   6. SECCIÓN DE PÁGINAS DE SERVICIOS
   ========================================== */
.service-container {
    padding-top: 120px; /* Espacio para que la barra de navegación fija no tape el contenido */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 60px;
    background-color: #12151c; /* Fondo gris pizarra técnico */
}

.service-layout {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    gap: 50px; /* Separación entre el texto y el formulario */
    align-items: flex-start;
}

/* Columna Izquierda: Información del Servicio */
.service-info {
    flex: 1;
}

.service-info h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 25px;
    line-height: 1.2;
}

.service-info .intro-text {
    font-size: 1.15rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 30px;
}

.service-info strong {
    color: #a855f7; /* Resaltes en morado de acento */
    font-weight: 600;
}

.scope-box {
    background-color: #1a1e26; /* Gris sólido del menú */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.scope-box p {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 15px;
    line-height: 1.6;
}

.scope-box ul {
    list-style: none; /* Quitamos los puntos por defecto */
    padding-left: 0;
}

.scope-box li {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 12px;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

/* Viñeta morada personalizada para el estilo técnico */
.scope-box li::before {
    content: "▪";
    position: absolute;
    left: 0;
    color: #a855f7;
    font-size: 1.2rem;
    top: -2px;
}

.scope-box li strong {
    color: #ffffff;
}

.service-info .closing-text {
    font-size: 1.1rem;
    color: #94a3b8;
    font-style: italic;
}

/* Columna Derecha: Caja del Formulario */
.service-form-box {
    flex: 1;
    background-color: #1a1e26;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 120px; /* Se queda fijo al hacer scroll si el texto de la izquierda es largo */
}

.service-form-box h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.service-form-box > p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 30px;
}

/* Estilos de las cajas de texto (Campos de entrada) */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    background-color: #12151c; /* Fondo oscuro interno para las cajas */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 14px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a855f7; /* Borde morado al hacer clic en la caja */
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* Botón de Enviar dentro del Formulario */
.form-submit-btn {
    width: 100%;
    text-align: center;
    padding: 16px;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

/* Ajuste de Diseño Responsivo para Celulares */
@media (max-width: 968px) {
    .service-layout {
        flex-direction: column;
        gap: 40px;
    }
    .service-info h1 {
        font-size: 2.3rem;
    }
    .service-form-box {
        position: static;
        width: 100%;
        padding: 30px 20px;
    }
}

/* ==========================================
   7. DESPLEGABLE DE CONTACTO INTELIGENTE
   ========================================== */
/* Alínea el menú de contacto hacia la derecha para que no se corte en la pantalla */
.contact-dropdown {
    right: 0;
    left: auto !important; 
    min-width: 280px;
}

.copy-trigger {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Pequeña etiqueta oculta que avisa que se puede copiar */
.copy-alert {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.copy-trigger:hover .copy-alert {
    color: #a855f7; /* Cambia a tu morado de acento al pasar el mouse */
    background-color: rgba(168, 85, 247, 0.15);
}

/* Estilo cuando el texto ya ha sido copiado con éxito */
.copy-trigger.copied .copy-alert {
    color: #25d366 !important; /* Verde de éxito */
    background-color: rgba(37, 211, 102, 0.15) !important;
}

/* ==========================================
   8. NOTIFICACIÓN FLOTANTE (TOAST) DISCRETA
   ========================================== */
.toast-notification {
    position: fixed;
    bottom: -50px; /* Inicia oculto abajo de la pantalla */
    left: 50%;
    transform: translateX(-50%); /* Centrado horizontal perfecto */
    background-color: #1a1e26; /* Mismo gris formal de tus tarjetas */
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 30px; /* Bordes redondeados elegantes */
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 2000; /* Se asegura de estar por encima de todo */
    opacity: 0;
    pointer-events: none;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

/* Clase de activación que el JavaScript enciende de forma temporal */
.toast-notification.show {
    bottom: 40px; /* Sube sutilmente a su posición visible */
    opacity: 1;
}

/* ==========================================
   9. PÁGINA NUEVO PROYECTO (VITRINA TÉCNICA)
   ========================================== */
.project-showcase-container {
    padding-top: 120px; /* Evita que la barra superior tape el contenido */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Encabezado interno */
.showcase-header {
    text-align: center;
    margin-bottom: 40px;
}

.showcase-header h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
}

.showcase-header p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
}

/* BARRA HORIZONTAL DE BOTONES (Organizada en una sola fila limpia) */
.services-button-bar {
    display: flex;
    justify-content: space-between; /* Distribuye los 5 botones de forma uniforme */
    gap: 15px; /* Espacio intermedio entre cada botón */
    margin-bottom: 60px;
    width: 100%;
}

/* Ajustes individuales para que los botones mantengan la estética del index */
.service-action-btn {
    flex: 1; /* Hace que los 5 botones tengan exactamente el mismo ancho */
    text-align: center;
    font-size: 0.85rem; /* Letra un poco más compacta para que quepan bien en horizontal */
    padding: 14px 10px;
    white-space: normal; /* Permite que el texto se parta en dos renglones si es necesario */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

/* DISTRIBUCIÓN INFERIOR EN 2 COLUMNAS (Uno al lado del otro) */
.media-columns-layout {
    display: flex;
    gap: 40px; /* Separación física entre la columna de video y la de fotos */
    width: 100%;
}

.media-column {
    flex: 1; /* Asigna un 50% de espacio exacto a cada columna */
    display: flex;
    flex-direction: column;
}

.media-column h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    border-left: 4px solid #a855f7; /* Sutil detalle morado al inicio del título */
    padding-left: 12px;
}

/* CUADROS GRISES DE RESERVA (En Construcción) */
.media-placeholder-box {
    background-color: #1a1e26; /* Gris formal de tus tarjetas */
    border: 2px dashed rgba(255, 255, 255, 0.1); /* Borde punteado técnico estilo plano */
    border-radius: 8px;
    height: 350px; /* Altura del recuadro para reservar el espacio */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Letrero flotante interno de En Construcción */
.media-placeholder-box::before {
    content: "⚠️ SECCIÓN EN CONSTRUCCIÓN";
    position: absolute;
    top: 20px;
    background-color: #242936;
    color: #a855f7; /* Texto morado tecnológico */
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.placeholder-text-info {
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 80%;
}

/* AJUSTE PARA DISPOSITIVOS MÓVILES (Se acomodan uno abajo del otro solo en pantallas pequeñas) */
@media (max-width: 968px) {
    .services-button-bar {
        flex-direction: column;
        gap: 12px;
    }
    .media-columns-layout {
        flex-direction: column;
        gap: 40px;
    }
    .media-placeholder-box {
        height: 280px;
    }
}

/* ==========================================
   10. RESPONSIVE - DISPOSITIVOS MÓVILES
   ========================================== */

/* ---------- TABLETS / MÓVILES GRANDES (≤ 968px) ---------- */
@media (max-width: 968px) {
    /* NAVBAR */
    .navbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .logo-container { gap: 10px; }
    .logo-img { height: 38px; width: 38px; }
    .brand-name {
        font-size: 0.9rem;
        letter-spacing: 0.8px;
    }
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    .nav-menu a {
        margin-left: 0;
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    /* DROPDOWNS: se anclan a la izquierda para no salirse */
    .dropdown-content {
        left: 0;
        right: auto;
        min-width: 220px;
    }
    .contact-dropdown {
        left: 0 !important;
        right: auto !important;
        min-width: 240px;
    }

    /* HERO */
    .hero-section {
        min-height: 100vh;
        height: auto;
        padding: 160px 18px 60px;
    }
    .hero-content { margin-top: 0; }
    .hero-content h1 {
        font-size: 2.4rem;
        line-height: 1.15;
        margin-bottom: 18px;
    }
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 28px;
    }
    .btn-primary { padding: 14px 28px; font-size: 0.95rem; }

    /* WHATSAPP FLOTANTE */
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 18px;
        right: 18px;
    }
    .whatsapp-icon-svg { width: 26px; height: 26px; }

    /* CONTENEDORES CON NAVBAR FIJA */
    .service-container,
    .project-showcase-container {
        padding-top: 200px;
        padding-left: 18px;
        padding-right: 18px;
    }
    .service-info h1,
    .showcase-header h1 { font-size: 2rem; }
    .service-form-box {
        position: static;
        width: 100%;
        padding: 25px 18px;
    }

    /* TOAST */
    .toast-notification {
        max-width: calc(100% - 30px);
        text-align: center;
        font-size: 0.88rem;
        padding: 12px 20px;
    }
}

/* ---------- MÓVILES PEQUEÑOS (≤ 480px) ---------- */
@media (max-width: 480px) {
    .brand-name {
        font-size: 0.78rem;
        letter-spacing: 0.5px;
        line-height: 1.15;
    }
    .hero-content h1 { font-size: 1.85rem; }
    .hero-content p  { font-size: 0.92rem; }
    .service-info h1,
    .showcase-header h1 { font-size: 1.7rem; }
    .showcase-header p  { font-size: 0.95rem; }
    .service-action-btn {
        font-size: 0.8rem;
        padding: 12px 10px;
    }
    .media-placeholder-box { height: 240px; }
    .toast-notification { font-size: 0.82rem; padding: 10px 16px; }
}

/* Los dropdowns SOLO se abren por hover en dispositivos con mouse */
@media (hover: none) {
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown.open .dropdown-content  { display: block; }
    .dropdown.open .dropdown-trigger i { transform: rotate(180deg); }
}