/*
Theme Name:     Tohnos Inmobiliaria
Theme URI:      https://tohnos.com
Author:         GovTech Solutions / LC Monroy
Author URI:     https://govtechsolutions.gt
Description:    Tema premium para Inmobiliaria e Inversiones Tohnos, S.A. Diseño corporativo negro #111111 y rojo #C1121F. Propiedades, búsqueda avanzada, WhatsApp, panel de administración.
Version:        1.0.0
Requires at least: 6.0
Tested up to:   6.7
Requires PHP:   8.0
License:        Proprietary
License URI:    https://tohnos.com
Text Domain:    tohnos
Tags:           real-estate, custom-post-types, responsive, tailwind, premium

/* ============================================================
   TOHNOS INMOBILIARIA — Variables y estilos base
   Colores: Negro #111111 · Rojo #C1121F · Gris #6B7280
   ============================================================ */

:root {
    --brand-black:    #111111;
    --brand-red:      #C1121F;
    --brand-red-dark: #9B0E18;
    --brand-gray:     #6B7280;
    --brand-white:    #FFFFFF;
    --brand-cream:    #FAFAF8;
    --shadow-card:    0 2px 12px rgba(0,0,0,.07);
    --shadow-hover:   0 8px 32px rgba(0,0,0,.14);
    --shadow-red:     0 4px 20px rgba(193,18,31,.28);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #fff; color: var(--brand-black); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--brand-red); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--brand-red); border-radius: 10px; }

/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: 'Montserrat', sans-serif; font-weight: 800; line-height: 1.15; color: var(--brand-black); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.grid-3     { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.5rem; }
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ── BOTONES ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 700; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; }
.btn-primary  { background: var(--brand-red); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary:hover  { background: var(--brand-red-dark); box-shadow: none; transform: translateY(1px); color: #fff; }
.btn-dark    { background: var(--brand-black); color: #fff; }
.btn-dark:hover    { background: var(--brand-red); color: #fff; }
.btn-outline { border: 2px solid var(--brand-black); color: var(--brand-black); }
.btn-outline:hover { background: var(--brand-black); color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1DB954; color: #fff; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .75rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── CARDS ───────────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; transition: var(--transition); border: 1px solid #f0f0f0; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

/* ── PROPERTY CARD ───────────────────────────────────────── */
.property-card .img-wrap { position: relative; height: 220px; overflow: hidden; background: #f5f5f5; }
.property-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.property-card:hover .img-wrap img { transform: scale(1.05); }
.property-card .card-body { padding: 1.25rem; }
.property-card .price { font-family: 'Montserrat', sans-serif; font-size: 1.6rem; font-weight: 900; color: var(--brand-red); }
.property-card .title { font-size: .95rem; font-weight: 600; color: var(--brand-black); margin: .35rem 0 .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.property-card .location { font-size: .78rem; color: var(--brand-gray); display: flex; align-items: center; gap: .3rem; }
.property-card .specs { display: flex; gap: 1rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #f0f0f0; font-size: .78rem; color: var(--brand-gray); }
.property-card .badge-wrap { position: absolute; top: .75rem; left: .75rem; display: flex; flex-direction: column; gap: .4rem; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 100px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge-red   { background: var(--brand-red); color: #fff; }
.badge-black { background: var(--brand-black); color: #fff; }
.badge-gold  { background: #FEF3C7; color: #92400E; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-gray  { background: #F3F4F6; color: var(--brand-gray); }

/* ── FORMULARIOS ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-gray); margin-bottom: .4rem; }
.form-control { width: 100%; padding: .75rem 1rem; border: 1.5px solid #E5E7EB; border-radius: var(--radius-sm); font-size: .875rem; font-family: inherit; background: #fff; color: var(--brand-black); transition: border-color .2s; outline: none; appearance: none; }
.form-control:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(193,18,31,.08); }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem; padding-right: 2.5rem; }

/* ── NAVBAR ──────────────────────────────────────────────── */
#tohnos-navbar { position: fixed; top: 0; inset-inline: 0; z-index: 1000; transition: background .3s, box-shadow .3s; }
#tohnos-navbar.scrolled { background: rgba(255,255,255,.97); box-shadow: 0 1px 0 rgba(0,0,0,.07); backdrop-filter: blur(12px); }
#tohnos-navbar.scrolled .nav-link { color: var(--brand-black) !important; }
#tohnos-navbar.scrolled .nav-logo-text { color: var(--brand-black) !important; }
#tohnos-navbar.scrolled .nav-logo-sub  { color: rgba(0,0,0,.4) !important; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-logo-text { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: .9rem; line-height: 1.1; color: #fff; transition: color .3s; }
.nav-logo-red { color: var(--brand-red) !important; }
.nav-logo-sub { font-size: .65rem; letter-spacing: .22em; color: rgba(255,255,255,.5); font-weight: 500; transition: color .3s; }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-link { padding: .5rem 1rem; border-radius: 8px; font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.9); transition: var(--transition); }
.nav-link:hover, .nav-link.current { color: var(--brand-red) !important; }
.nav-cta { background: var(--brand-red); color: #fff !important; box-shadow: var(--shadow-red); }
.nav-cta:hover { background: var(--brand-red-dark); }

/* ── HERO ────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #0d0d0d 0%, #1a0507 60%, #0d0d0d 100%); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="%23C1121F" fill-opacity=".07"><rect x="30" y="0" width="30" height="30"/><rect x="0" y="30" width="30" height="30"/></g></svg>'); }
.hero-content { position: relative; text-align: center; max-width: 860px; padding: 7rem 1.5rem 4rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(193,18,31,.12); border: 1px solid rgba(193,18,31,.2); border-radius: 100px; padding: .35rem 1rem; margin-bottom: 1.5rem; color: var(--brand-red); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); color: #fff; font-weight: 900; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--brand-red); }
.hero p { color: rgba(255,255,255,.6); font-size: 1.1rem; max-width: 560px; margin: 0 auto 2.5rem; }
.hero-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg,transparent,var(--brand-red),transparent); }

/* ── SEARCH BOX ──────────────────────────────────────────── */
.search-box { background: rgba(255,255,255,.1); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 1.25rem; }
.search-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.search-tab { flex: 1; padding: .5rem; border-radius: 8px; font-size: .8rem; font-weight: 700; cursor: pointer; text-align: center; border: none; transition: var(--transition); background: transparent; color: rgba(255,255,255,.6); }
.search-tab.active { background: var(--brand-red); color: #fff; }
.search-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.search-row .form-control { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.15); color: #fff; flex: 1; min-width: 140px; }
.search-row .form-control::placeholder { color: rgba(255,255,255,.5); }
.search-row .form-control option { background: #111; color: #fff; }
.search-row .form-control:focus { border-color: var(--brand-red); background: rgba(255,255,255,.18); }
.search-row .form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar { background: var(--brand-black); padding: 2.5rem 0; }
.stats-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.stat-item { text-align: center; padding: 1rem 3rem; border-right: 1px solid rgba(255,255,255,.08); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 900; color: var(--brand-red); line-height: 1; }
.stat-label { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: .25rem; }

/* ── SECTION HEADERS ─────────────────────────────────────── */
.section-eyebrow { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; color: var(--brand-red); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-eyebrow::before, .section-eyebrow::after { content: ''; width: 32px; height: 2px; background: var(--brand-red); }
.section-title { font-size: clamp(1.75rem, 3vw, 2.75rem); margin-bottom: .5rem; }
.section-sub { color: var(--brand-gray); font-size: .95rem; }

/* ── SIDEBAR FILTROS ─────────────────────────────────────── */
.filter-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 1.25rem; margin-bottom: 1rem; border: 1px solid #f0f0f0; }
.filter-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-gray); margin-bottom: .75rem; }
.filter-radio { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; cursor: pointer; font-size: .875rem; color: var(--brand-black); }
.filter-radio input[type="radio"] { accent-color: var(--brand-red); width: 16px; height: 16px; }

/* ── DETAIL PAGE ─────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: .4rem; height: 420px; border-radius: var(--radius); overflow: hidden; }
.gallery-main { grid-row: 1 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: filter .2s; }
.gallery-grid img:hover { filter: brightness(.82); }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px,1fr)); gap: 1px; background: #f0f0f0; border: 1px solid #f0f0f0; border-radius: var(--radius); overflow: hidden; }
.spec-item { background: #fff; text-align: center; padding: 1.1rem 1rem; }
.spec-value { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 800; }
.spec-label { font-size: .68rem; color: var(--brand-gray); margin-top: .2rem; text-transform: uppercase; letter-spacing: .05em; }
.amenity-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; background: #FFF5F5; border-radius: 100px; font-size: .78rem; color: #991B1B; margin: .25rem; }
.sticky-sidebar { position: sticky; top: 85px; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,.1); padding: 1.75rem; border-top: 3px solid var(--brand-red); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer { background: var(--brand-black); color: rgba(255,255,255,.65); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.2rem; color: #fff; }
.footer-link { color: rgba(255,255,255,.5); font-size: .85rem; display: block; margin-bottom: .6rem; transition: color .2s; }
.footer-link:hover { color: #fff; }
.footer-bottom { padding: 1.5rem 0; text-align: center; font-size: .78rem; color: rgba(255,255,255,.25); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.footer-social a:hover { background: var(--brand-red); }

/* ── WHATSAPP FLOAT ──────────────────────────────────────── */
.wa-float { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; width: 56px; height: 56px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,.4); transition: var(--transition); text-decoration: none; }
.wa-float:hover { background: #1DB954; transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ── ALERTS / TOAST ──────────────────────────────────────── */
.tohnos-alert { padding: .9rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .875rem; }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 3px solid #10B981; }
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 3px solid #EF4444; }

/* ── PAGINACIÓN ──────────────────────────────────────────── */
.page-numbers { display: flex; gap: .4rem; justify-content: center; margin: 2.5rem 0; flex-wrap: wrap; }
.page-numbers a, .page-numbers span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .85rem; font-weight: 600; border: 1.5px solid #E5E7EB; color: var(--brand-gray); transition: var(--transition); }
.page-numbers .current { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
.page-numbers a:hover { border-color: var(--brand-black); color: var(--brand-black); }
.nav-links { display: flex; gap: .4rem; justify-content: center; margin: 2.5rem 0; }

/* ── MOBILE ──────────────────────────────────────────────── */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(17,17,17,.98); padding: 5rem 2rem 2rem; flex-direction: column; gap: .5rem; }
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { color: rgba(255,255,255,.8); font-size: 1.1rem; padding: .85rem 1rem; border-radius: 10px; }
.mobile-menu .nav-link:hover { background: rgba(255,255,255,.06); color: var(--brand-red); }
.hamburger { display: none; cursor: pointer; }

/* ── ADMIN CUSTOMIZATION ─────────────────────────────────── */
.tohnos-meta-box { padding: .5rem 0; }
.tohnos-meta-box .meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tohnos-meta-box label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .3rem; color: #3c3c3c; }
.tohnos-meta-box input, .tohnos-meta-box select, .tohnos-meta-box textarea { width: 100%; padding: .5rem .75rem; border: 1px solid #ddd; border-radius: 6px; font-size: .875rem; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .gallery-grid { height: 300px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .listings-layout { grid-template-columns: 1fr; }
    .sidebar-filters { position: static; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .gallery-grid { grid-template-columns: 1fr; grid-template-rows: 280px; }
    .gallery-grid img:not(:first-child) { display: none; }
    .nav-links { display: none; }
    .hamburger { display: block; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { gap: 0; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
    .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .section { padding: 3rem 0; }
    .container { padding: 0 1rem; }
}
