:root {
    --primary: #1a1a1a;
    --logo-red: #D42B1E;
    --logo-green: #067D48;
    --gradient: linear-gradient(135deg, var(--logo-red), var(--logo-green));
    --white: #ffffff;
    --beige-light: #fdfdfd;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--white);
    color: var(--primary);
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* --- NAVEGACIÓN --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.logo img { height: 50px; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { 
    text-decoration: none; color: var(--primary); 
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase; 
    letter-spacing: 1px; transition: 0.3s;
}

.btn-contact {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 12px 25px;
    border-radius: 2px;
    transition: var(--transition);
}

/* --- HERO --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    background: #000;
}

/* Las imágenes de fondo y la animación de cada .hero-slide se generan
   dinámicamente en index.php a partir de las propiedades de la API
   (ver la función hero_slides_markup() en helpers.php). */
.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
}

.hero-slide.static { opacity: 0.7; }

.hero-content { position: relative; z-index: 5; }
.hero-content h1 { font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 20px; }

/* --- SECCIÓN EDITORIAL --- */
.section { padding: 100px 8%; }
.featured-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.featured-image-container img { width: 100%; height: 600px; object-fit: cover; border-radius: 4px; }

.price { 
    font-size: 1.4rem; font-weight: 700; 
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* --- GRID PROPIEDADES --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; margin-top: 50px; }
.card { background: var(--white); border-radius: 4px; overflow: hidden; transition: var(--transition); border: 1px solid #eee; }
.card:hover { transform: translateY(-15px); box-shadow: 0 30px 60px rgba(0,0,0,0.08); }
.card-img-box { position: relative; height: 300px; overflow: hidden; }
.card-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 1s; }
.card:hover .card-img-box img { transform: scale(1.1); }
.card-tag { position: absolute; top: 20px; left: 20px; background: var(--white); padding: 5px 15px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.card-content { padding: 30px; }

/* --- FORMULARIO DE CAPTACIÓN --- */
.contact-box { background: var(--beige-light); padding: 80px 8%; }
.form-wrapper { max-width: 900px; margin: 0 auto; background: white; padding: 50px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; color: var(--logo-green); }
input, select { padding: 15px; border: 1px solid #e0e0e0; border-radius: 4px; font-family: inherit; }
.btn-submit { 
    grid-column: span 2; background: var(--gradient); color: white; border: none; 
    padding: 20px; font-weight: 700; text-transform: uppercase; cursor: pointer; letter-spacing: 2px;
}

/* --- MODAL --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 2000; align-items: center; justify-content: center;
}
.modal-content { background: white; padding: 60px; text-align: center; max-width: 500px; border-radius: 4px; position: relative; }
.close-modal { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 1.5rem; }

/* --- FOOTER --- */
footer { 
    background: #050505; 
    color: white; 
    padding: 100px 8% 40px; 
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo sutil */
footer::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--logo-green);
    filter: blur(150px);
    opacity: 0.1;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr 1fr; 
    gap: 80px; 
    margin-bottom: 80px; 
    position: relative;
    z-index: 2;
}

/* Contenedor del Logo con técnica de Glassmorphism */
.footer-logo-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: inline-block;
    border-radius: 4px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.footer-logo-card:hover {
    transform: translateY(-5px);
    background: #ffffff;
}
.footer-logo-card img { height: 45px; }

.footer-info p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
    max-width: 300px;
}

.footer-column h4 {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 30px;
    height: 1px;
    background: currentColor;
}

/* Enlaces atractivos */
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}
.footer-links a::before {
    content: '→';
    margin-right: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    color: var(--logo-red);
}
.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}
.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.contact-info a {
    color: white;
    text-decoration: none;
    display: block;
    margin-top: 10px;
    font-weight: 300;
    transition: 0.3s;
}
.contact-info a:hover { color: var(--logo-green); }

/* Crédito de desarrollo minimalista */
.dev-credit { 
    margin-top: 60px; 
    padding-top: 30px; 
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 0.75rem; 
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
}

.dev-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}
.dev-brand:hover { color: rgba(255,255,255,0.8); }
.dev-logo { 
    height: 14px; 
    opacity: 0.4;
    filter: grayscale(1) brightness(2); 
    transition: 0.3s;
}
.dev-brand:hover .dev-logo { opacity: 1; filter: grayscale(0) brightness(1.5); }