/* ==================================== */
/* Archivo Principal de Estilos        */
/* Sistema Modularizado y Optimizado   */
/* ==================================== */


@import "_variables.css";
@import "_base.css";
@import "_components.css";
@import "_header.css";
@import "_footer.css";
@import "_property.css";
@import "_commercial.css";
@import "_plot.css";
@import "_land.css";
@import "_plans.css";
@import "_print.css";
@import "_responsive.css";
@import "_animations.css";
@import "_utilities.css";


/* ==================================== */
/* Variables y Configuración Global   */
/* ==================================== */

:root {
    --primary-dark: #051020;
    --primary: #0a1f30;
    --secondary: #D4AF37;
    --secondary-dark: #B8860B;
    --secondary-light: #F4E4A6;
    --success: #28a745;
    --gold: #D4AF37;
    --gold-light: #F4E4A6;
    --gold-dark: #B8860B;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-dark: 0 8px 25px rgba(0,0,0,0.15);
    
    /* Nuevas variables para mejor consistencia */
    --text-primary: #333;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-light: #ecf0f1;
    --border-medium: #ddd;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
    
    /* Transiciones estandarizadas */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================================== */
/* Reset y Estilos Base Optimizados    */
/* ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevenir layout shifts en imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mejorar rendimiento de animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================================== */
/* Utilidades                          */
/* ==================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-center { 
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grid { display: grid; }
.grid-center {
    display: grid;
    place-items: center;
}

/* ==================================== */
/* Componentes de Botones Optimizados  */
/* ==================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 14px;
    font-family: inherit;
    line-height: 1;
}

.btn:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.btn-cliente {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-cliente:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.tool-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.tool-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.energy-certificate-btn {
    background: var(--success);
    color: white;
    border: none;
}

.energy-certificate-btn:hover {
    background: #218838;
}

.open-plan-btn {
    background: #007bff;
    color: white;
    border: none;
}

.open-plan-btn:hover {
    background: #0069d9;
}

.footer-btn {
    background: var(--secondary);
    color: var(--primary-dark);
}

.footer-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* ==================================== */
/* Botones de Compartir Optimizados    */
/* ==================================== */

.share-btn-full {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.share-btn-full:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.share-facebook-full { background: #3b5998; }
.share-instagram-full { background: #e4405f; }
.share-tiktok-full { background: #000000; }
.share-whatsapp-full { background: #25d366; }

.share-btn-full:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    filter: brightness(1.1);
}

/* ==================================== */
/* Galería de Propiedades Optimizada   */
/* ==================================== */

.property-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
    height: 500px;
}

.main-image {
    grid-row: 1 / 3;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    aspect-ratio: 16/9;
}

.main-image:hover img {
    transform: scale(1.02);
}

.gallery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 8px 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.property-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-dark);
    color: white;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.thumbnails {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.thumbnail {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    height: 242.5px;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-normal);
    aspect-ratio: 1;
}

.thumbnail:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(5, 16, 32, 0.8);
    color: white;
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
}

/* ==================================== */
/* Secciones Comunes Optimizadas       */
/* ==================================== */

.section-card {
    margin: 30px 0;
    padding: 25px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--secondary);
}

.vivienda-features,
.rent-conditions,
.property-type-section,
.property-description,
.equipment-section,
.distribution-section,
.condition-section,
.community-section,
.investment-potential,
.property-details,
.similar-properties,
.property-share-full,
.agent-contact-full,
.multiple-units 


.section-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vivienda-icon {
    color: var(--secondary);
}

/* ==================================== */
/* Características Optimizadas         */
/* ==================================== */

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.condition-item-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.condition-item-feature i {
    font-size: 1.2rem;
    color: var(--secondary);
    width: 25px;
    flex-shrink: 0;
}

.condition-label {
    font-weight: 600;
    color: var(--primary-dark);
}

.condition-value {
    font-weight: 700;
    color: var(--primary-dark);
    margin-left: auto;
}

/* ==================================== */
/* Estados y Calidades Optimizados     */
/* ==================================== */

.condition-status {
    padding: 5px 10px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
}

.status-excellent {
    background: #d4edda;
    color: #155724;
}

.status-good {
    background: #fff3cd;
    color: #856404;
}

.status-basic {
    background: var(--bg-light);
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-rustic {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ==================================== */
/* Footer Optimizado                   */
/* ==================================== */

.site-footer {
    background: var(--primary-dark) !important;
    color: white !important;
    padding: 60px 0 0;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-buttons .footer-btn {
    background: var(--secondary) !important;
    color: var(--primary-dark) !important;
}

/* ==================================== */
/* Mejoras de Accesibilidad            */
/* ==================================== */

@media (prefers-reduced-motion: no-preference) {
    .btn:hover,
    .share-btn-full:hover,
    .footer-btn:hover {
        transition: all var(--transition-normal);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-dark: #000000;
        --secondary: #ffd700;
        --text-primary: #000000;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Base dark styles pueden agregarse aquí */
}

/* ==================================== */
/* Utilidades de Espaciado             */
/* ==================================== */

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ==================================== */
/* Estilos Específicos de Página       */
/* ==================================== */

/* Aquí puedes agregar estilos específicos que no encajan en los módulos */
/* Estos estilos sobrescriben o complementan los estilos modulares */

/* Asegurar compatibilidad con estilos existentes */
.property-gallery .main-image img {
    width: 100% !important;
    max-width: 100% !important;
}

.site-footer {
    background: var(--primary-dark) !important;
    color: white !important;
}

.footer-buttons .footer-btn {
    background: var(--secondary) !important;
    color: var(--primary-dark) !important;

}

.property-gallery {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.property-gallery .main-image img {
  width: 100%;
  height: auto;
  display: block;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.property-gallery {
  overflow: hidden; /* Esto crea un contexto de formato de bloque y contiene los elementos flotantes */
}

.property-gallery {
  position: relative;
  margin-bottom: 30px;
  overflow: hidden;
  width: 100%;
}

.main-image {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}


/* ==================================== */
/* Fin del Archivo CSS Optimizado      */
/* ==================================== */