/* Ubicación: /public_html/assets/css/style.css */

/* ==========================================================================
   1. VARIABLES DE DISEÑO (Design Tokens)
   ========================================================================== */
:root {
    /* Paleta de Colores YOPE (Rojo, Blanco, Gris) */
    --yope-red: #E31C5F;
    --yope-red-dark: #BD1E59;
    --yope-red-light: rgba(227, 28, 95, 0.08);
    --yope-white: #FFFFFF;
    --yope-gray-100: #F7F7F7;    /* Fondos de sección */
    --yope-gray-200: #EBEBEB;    /* Bordes suaves y líneas */
    --yope-gray-300: #DDDDDD;    /* Bordes definidos */
    --yope-gray-700: #717171;    /* Texto secundario / Muted */
    --yope-black: #222222;       /* Texto principal */

    /* Elevación y Bordes */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Animaciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. ESTILOS BASE Y RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--yope-white);
    color: var(--yope-black);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ==========================================================================
   3. COMPONENTES GLOBALES (Botones y Formularios)
   ========================================================================== */
.btn-primary {
    background: var(--yope-red);
    color: var(--yope-white);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
}

.btn-primary:hover {
    background: var(--yope-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 28, 95, 0.25);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--yope-gray-300);
    border-radius: var(--radius-sm);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    background: var(--yope-white);
}

.form-control:focus {
    border-color: var(--yope-red);
    box-shadow: 0 0 0 4px rgba(227, 28, 95, 0.1);
}

/* ==========================================================================
   4. HEADER Y NAVEGACIÓN
   ========================================================================== */
header {
    background: var(--yope-white);
    border-bottom: 1px solid var(--yope-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--yope-red);
    letter-spacing: -1px;
}

.logo span { color: var(--yope-black); }

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
}

.user-menu a:not(.btn-primary) {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
}

.user-menu a:not(.btn-primary):hover {
    background: var(--yope-gray-100);
}

/* ==========================================================================
   5. PÁGINA DE INICIO (HOME)
   ========================================================================== */
.hero {
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -1.5px;
}

/* Buscador Home */
.search-bar {
    background: var(--yope-white);
    border: 1px solid var(--yope-gray-300);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    display: flex;
    max-width: 850px;
    margin: 0 auto;
    padding: 8px 8px 8px 24px;
    transition: var(--transition);
    align-items: center;
}

.search-bar:focus-within {
    box-shadow: var(--shadow-lg);
}

.search-item {
    flex: 1;
    padding: 8px 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--yope-gray-200);
}

.search-item:last-of-type { border-right: none; }

.search-item label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--yope-black);
    margin-bottom: 2px;
}

.search-item input {
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--yope-gray-700);
    width: 100%;
    background: transparent;
}

.search-btn-container { padding-left: 12px; }

/* Grid de Propiedades */
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.grid-propiedades {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px 24px;
    padding-bottom: 80px;
}

.card-propiedad { display: block; cursor: pointer; }

.card-img-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--yope-gray-200);
}

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

.card-propiedad:hover .card-img-wrapper img { transform: scale(1.08); }

.card-body h3 { font-size: 16px; font-weight: 700; color: var(--yope-black); }
.card-body p { font-size: 14px; color: var(--yope-gray-700); }
.card-body .precio { margin-top: 4px; font-weight: 700; color: var(--yope-black); }

/* Espacio AdSense */
.adsense-placeholder {
    background: var(--yope-gray-100);
    border: 2px dashed var(--yope-gray-300);
    color: var(--yope-gray-700);
    text-align: center;
    padding: 24px;
    margin: 40px 0;
    border-radius: var(--radius-md);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* ==========================================================================
   6. PÁGINAS DE AUTENTICACIÓN (LOGIN/REGISTRO)
   ========================================================================== */
.auth-page {
    background-color: var(--yope-gray-100);
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: var(--yope-white);
    width: 100%;
    max-width: 500px;
    padding: 48px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.auth-container h1 { text-align: center; font-size: 28px; color: var(--yope-red); margin-bottom: 8px; }
.auth-container .subtitle { text-align: center; color: var(--yope-gray-700); margin-bottom: 32px; }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }

.host-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--yope-gray-100);
    border: 2px solid var(--yope-gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.host-card:hover { border-color: var(--yope-red); }
.host-card input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--yope-red); margin-top: 4px; }
.host-card-content p { font-size: 14px; }

.btn-submit {
    width: 100%;
    background: var(--yope-red);
    color: var(--yope-white);
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    transition: var(--transition);
}

.auth-footer { text-align: center; margin-top: 32px; font-size: 14px; color: var(--yope-gray-700); }
.auth-footer a { color: var(--yope-red); font-weight: 700; }

/* ==========================================================================
   7. PANEL DE ADMINISTRACIÓN (DASHBOARD)
   ========================================================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 80px);
    background-color: var(--yope-gray-100);
}

.admin-sidebar {
    background: var(--yope-white);
    border-right: 1px solid var(--yope-gray-200);
    padding: 24px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    font-weight: 600;
    color: var(--yope-gray-700);
    border-left: 4px solid transparent;
}

.admin-nav-item:hover { background: var(--yope-gray-100); color: var(--yope-black); }
.admin-nav-item.active {
    color: var(--yope-red);
    background: var(--yope-red-light);
    border-left-color: var(--yope-red);
}

.admin-content { padding: 40px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--yope-white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--yope-gray-200);
}

.stat-card h4 { font-size: 12px; text-transform: uppercase; color: var(--yope-gray-700); margin-bottom: 12px; }
.stat-card .value { font-size: 32px; font-weight: 800; color: var(--yope-red); }

.admin-card {
    background: var(--yope-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--yope-gray-200);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    min-width: 800px;
}

.admin-table th { text-align: left; padding: 16px; font-size: 12px; text-transform: uppercase; color: var(--yope-gray-700); border-bottom: 2px solid var(--yope-gray-200); }
.admin-table td { padding: 18px 16px; border-bottom: 1px solid var(--yope-gray-100); font-size: 14px; }

.status-badge { padding: 6px 12px; border-radius: var(--radius-full); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.status-activa { background: #E6FCF5; color: #0CA678; }
.status-confirmada { background: #E6FCF5; color: #0CA678; }
.status-pendiente { background: #FFF9DB; color: #F08C00; }
.status-cancelada { background: #FFF0F0; color: #E31C5F; }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    background: var(--yope-gray-100);
    padding: 60px 0;
    border-top: 1px solid var(--yope-gray-200);
    text-align: center;
}

.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--yope-gray-700); font-size: 14px; }
.footer-links a:hover { color: var(--yope-red); text-decoration: underline; }

/* ==========================================================================
   9. RESPONSIVIDAD (Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
    .admin-layout { grid-template-columns: 80px 1fr; }
    .admin-nav-item span { display: none; }
}

@media (max-width: 768px) {
    .navbar .user-menu a:not(.btn-primary) { display: none; }
    
    .search-bar {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 16px;
        align-items: stretch;
    }

    .search-item { border-right: none; border-bottom: 1px solid var(--yope-gray-200); }
    .search-btn-container { padding: 16px 0 0; width: 100%; }
    .search-btn-container .btn-primary { width: 100%; height: 54px; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-content { padding: 20px; }
    
    .auth-container { padding: 40px 24px; box-shadow: none; border-radius: 0; }
    .auth-page { background: var(--yope-white); padding: 0; }
}