/*
Theme Name: Sargar Arquitectura
Author: Sargar
Description: Tema personalizado híbrido de alto rendimiento.
Version: 1.3
*/

/* =========================================
   1. VARIABLES GLOBALES (Paleta Sargar)
   ========================================= */
:root {
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --accent-gold: #d4af37;
  --accent-gold-hover: #b5952f;
  --font-main: 'Helvetica Neue', Arial, sans-serif;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
}

/* =========================================
   2. RESETEO BÁSICO
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   3. ESTRUCTURA GLOBAL Y CABECERA
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.site-header {
    background-color: #0a0a0a;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
}

.logo-container a, .logo-container h1 {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 28px;
    letter-spacing: 2px;
    margin: 0;
}

.logo-container span {
    color: var(--accent-gold);
}

/* =========================================
   4. SECCIÓN PORTADA (HERO)
   ========================================= */
.hero-section {
    background-color: #0a0a0a;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    color: var(--text-primary);
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 1px;
}

.hero-content h1 span {
    color: var(--accent-gold);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--text-secondary);
}

/* Botón Dorado */
.btn-sargar {
    display: inline-block;
    background-color: var(--accent-gold);
    color: #000000;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-gold);
}

.btn-sargar:hover {
    background-color: transparent;
    color: var(--accent-gold);
}

/* =========================================
   5. ÁREA DINÁMICA (Para Editor Nativo)
   ========================================= */
.contenido-dinamico {
  padding: var(--spacing-xl) 0;
}

/* =========================================
   6. PIE DE PÁGINA (Footer)
   ========================================= */
.site-footer {
    background-color: #000000;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #222;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =========================================
   7. ANIMACIONES DE FLOTACIÓN (Fade Up)
   ========================================= */
.animar-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animar-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.retraso-1 { transition-delay: 0.1s; }
.retraso-2 { transition-delay: 0.3s; }
.retraso-3 { transition-delay: 0.5s; }

/* =========================================
   8. DISEÑO ARQUITECTÓNICO DE GALERÍA (DINÁMICO Y PREMIUM)
   ========================================= */
.wp-block-gallery {
    gap: 20px !important; 
}

.wp-block-gallery .wp-block-image,
.wp-block-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px !important; 
    margin: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.wp-block-gallery .wp-block-image img,
.wp-block-image img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    display: block;
    width: 100%;
    height: 320px !important; /* Altura uniforme para que todas queden alineadas */
    object-fit: cover !important; 
}

.wp-block-gallery .wp-block-image:hover img,
.wp-block-image:hover img {
    transform: scale(1.06) !important;
}

/* Caja de Título y Descripción Dinámica (Efecto Hover) */
.wp-block-gallery .wp-block-image figcaption,
.wp-block-image figcaption {
    position: absolute !important;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.8) 70%, rgba(10,10,10,0) 100%) !important;
    padding: 30px 20px 20px 20px !important;
    color: var(--text-primary) !important;
    text-align: left !important;
    opacity: 0; 
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    pointer-events: none; 
    border-bottom: 3px solid var(--accent-gold);
    margin: 0 !important;
    
    /* RESTRICCIÓN DE 4 LÍNEAS MÁXIMO */
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

.wp-block-gallery .wp-block-image:hover figcaption,
.wp-block-image:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}
/* =========================================
   9. CLASES DEL MODAL DE PANTALLA COMPLETA
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95); 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease;
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* =========================================
   10. ADAPTACIÓN A TELÉFONOS (Responsive)
   ========================================= */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .site-header {
        flex-direction: column;
        gap: 15px;
    }
    .sargar-overlay {
        bottom: 0;
        background: rgba(10, 10, 10, 0.8);
    }
} /* <--- Esta era la llave de cierre que faltaba */

/* =========================================
   11. NAVEGACIÓN PRINCIPAL (Ataque Directo al HTML)
   ========================================= */
/* Atacar directamente a la etiqueta <nav> dentro del <header> */
header nav ul, 
header nav div > ul {
    list-style: none !important;
    display: flex !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
}

header nav li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Transformación absoluta del enlace (a) dentro de la navegación */
header nav a {
    color: #ffffff !important; 
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease !important;
}

header nav a:hover {
    color: #d4af37 !important;
}