/* =========================================
   1. VARIABLES & CONFIGURACIÓN BASE
   ========================================= */
:root {
    /* Paleta de Colores NF Construarte */
    --nf-cyan: #1a4332;         /* Identidad Principal, Títulos, Fondos Footer */
    --nf-lime: #AECC53;         /* ACCIÓN: Botones, Links importantes, Hover */
    --nf-dark: #353534;         /* Texto principal, Franja Copyright */
    --nf-gray: #f4f6f8;         /* Fondos de sección (Estilo limpio) */
    --nf-white: #ffffff;
    
    /* Efectos Visuales */
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(2, 137, 137, 0.15);
    --transition: all 0.3s ease;
    
    /* Estructura */
    --radius-md: 12px;
    --radius-lg: 20px;
    --container-width: 1200px;
}

/* Reset Básico */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--nf-dark);
    background-color: var(--nf-gray);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Suavizado de fuentes */
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* Utilidades de Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-padding { padding: 4rem 0; }
.text-center { text-align: center; }

/* =========================================
   2. HEADER (Navegación)
   ========================================= */
.main-header {
    background: var(--nf-white);
    position: sticky; /* Se queda fijo al bajar */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    height: 80px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img { height: 55px; width: auto; }

/* Menú Desktop */
.nav-desktop ul { display: flex; gap: 2rem; }

.nav-link {
    font-weight: 500;
    color: var(--nf-dark);
    position: relative;
    font-size: 0.95rem;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active { color: var(--nf-cyan); }

/* Línea animada debajo de los links */
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--nf-lime); transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* Botón Destacado en Header */
.btn-header {
    background-color: var(--nf-cyan);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}
.btn-header:hover { 
    background-color: var(--nf-dark); 
    color: var(--nf-lime); 
    transform: translateY(-2px);
}

/* =========================================
   3. HERO SECTION & BUSCADOR
   ========================================= */
.hero {
    position: relative;
    height: 80vh; /* Altura impactante */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('img/caicedonia.jpg') center/cover no-repeat;
    margin-bottom: 3rem; /* Espacio para el buscador flotante si sobresale */
}

/* Overlay oscuro para legibilidad */
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Caja de Buscador Flotante (Estilo Portal Inmobiliario) */
.search-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-top: 2rem;
    align-items: flex-end;
}

.search-group { flex: 1; min-width: 200px; text-align: left; }

.search-label {
    display: block; font-size: 0.75rem; font-weight: 700;
    color: var(--nf-cyan); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px;
}

.search-select {
    width: 100%; padding: 0.8rem; border: 1px solid #e5e7eb;
    border-radius: 8px; font-family: inherit; color: var(--nf-dark);
    background-color: #f9fafb;
}

.btn-search {
    background: var(--nf-lime);
    color: var(--nf-dark);
    font-weight: 800;
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(174, 204, 83, 0.4); 
}

/* =========================================
   4. TARJETAS DE PROYECTOS (Grid)
   ========================================= */
.grid-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.card-project {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.card-project:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}

.card-project:hover .card-image img { transform: scale(1.08); }

/* Etiqueta de precio */
.price-tag {
    position: absolute; bottom: 15px; right: 15px;
    background: var(--nf-white);
    color: var(--nf-cyan);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }

.card-location {
    font-size: 0.8rem; color: #999; text-transform: uppercase; 
    letter-spacing: 1px; margin-bottom: 0.5rem; font-weight: 600;
}

.card-title { 
    font-size: 1.35rem; font-weight: 700; color: var(--nf-dark); margin-bottom: 1rem; 
}

.card-features {
    display: flex; gap: 1.2rem; margin-bottom: 1.5rem;
    font-size: 0.9rem; color: #666;
}

.card-features span { display: flex; align-items: center; gap: 6px; }
.card-features i { color: var(--nf-lime); }

.card-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid #f0f0f0; }

.btn-card {
    display: block; width: 100%; text-align: center;
    background: white; border: 2px solid var(--nf-cyan);
    color: var(--nf-cyan); padding: 0.8rem; border-radius: 8px;
    font-weight: 600; transition: var(--transition);
}

.btn-card:hover { background: var(--nf-cyan); color: white; }

/* =========================================
   5. FOOTER DUAL (Nuevo Diseño)
   ========================================= */
.main-footer {
    display: flex;
    flex-direction: column;
    margin-top: 4rem;
}

/* Parte Superior (Cian) */
.footer-top {
    background-color: var(--nf-cyan);
    color: var(--nf-white);
    padding: 4rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

/* Corrección del Logo en Footer */
.footer-logo {
    height: 90px; /* Tamaño cómodo */
    width: auto;
   
    padding: 10px 15px; /* Espacio interno (aire) alrededor del logo */
    border-radius: 8px; /* Bordes redondeados suaves */
    margin-bottom: 1.5rem;
    display: inline-block; /* Comportamiento de bloque para respetar padding */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Sombra sutil para darle relieve */
    /* IMPORTANTE: Eliminamos el 'filter' que lo ponía blanco feo */
}

.footer-desc { opacity: 0.85; font-size: 0.95rem; line-height: 1.8; max-width: 320px; }

.footer-title {
    color: var(--nf-lime);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li { margin-bottom: 0.8rem; }
.footer-links a, .footer-links li { 
    display: flex; align-items: center; gap: 10px; opacity: 0.9; 
}

.footer-links a:hover {
    color: var(--nf-lime);
    padding-left: 5px; /* Efecto movimiento */
}

/* Parte Inferior (Franja Oscura - Copyright) */
.footer-bottom {
    background-color: var(--nf-dark); /* Gris Oscuro */
    color: #9ca3af; /* Gris suave */
    padding: 1.5rem 0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-socials { display: flex; gap: 1.5rem; }

.footer-socials a {
    color: var(--nf-white); font-size: 1.1rem; transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--nf-lime); transform: translateY(-3px);
}

/* =========================================
   6. RESPONSIVE (Móvil y Tablet)
   ========================================= */
@media (max-width: 992px) {
    .nav-desktop { display: none; } /* Ocultar menú escritorio */
    .mobile-menu-trigger { display: block; } /* Mostrar hamburguesa (si se agrega HTML) */
    
    .hero-title { font-size: 2.5rem; }
    .search-box { flex-direction: column; gap: 1rem; }
    .btn-search { width: 100%; }
}

@media (max-width: 768px) {
    .hero { height: 60vh; margin-bottom: 6rem; /* Espacio extra para el buscador */ }
    .hero-title { font-size: 2rem; }
    
    .search-box { 
        margin-top: 1rem;
        /* Sacar el buscador un poco de la imagen en móvil */
        position: absolute; 
        bottom: -90px; 
        width: 90%;
        left: 5%;
    }
    
    .footer-bottom .container {
        justify-content: center;
        text-align: center;
        flex-direction: column-reverse;
    }
}

/* === ESTILOS NUEVOS PARA PROYECTOS === */

/* 1. Contenedor de Pestañas (Estilo Switch Moderno) */
.tabs-nav {
    display: flex;
    justify-content: center;
    background: #e5e7eb; /* Fondo gris suave */
    padding: 5px;
    border-radius: 50px;
    margin: 0 auto 3rem auto;
    max-width: 400px; /* Ancho controlado */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 40px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

/* Estado Activo (Botón Blanco con Sombra) */
.tab-btn.active {
    background: white;
    color: var(--nf-cyan); /* Tu color corporativo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

/* 2. Estilo para Proyectos Entregados (Elegante) */
.project-sold {
    position: relative;
    opacity: 0.9;
}

/* Filtro gris que se quita al pasar el mouse */
.project-sold .card-image img {
    filter: grayscale(100%);
    transition: filter 0.3s;
}
.project-sold:hover .card-image img {
    filter: grayscale(0%);
}

/* Sello de Vendido */
.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(2, 137, 137, 0.9); /* Cian semi-transparente */
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 3. Utilidad para ocultar (Crucial para que funcionen las tabs) */
.hidden {
    display: none !important;
}