/* ==========================================================================
   URBENORTE — Base: Reset + Typography + Utilities
   ========================================================================== */

/* ── Fuentes cargadas vía Google Fonts CDN (ver enqueue.php) ── */

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--c-text);
    background-color: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--c-accent);
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--c-text);
}

h1 {
    font-size: var(--fs-4xl);
}

h2 {
    font-size: var(--fs-3xl);
}

h3 {
    font-size: var(--fs-lg);
}

h4 {
    font-size: var(--fs-md);
}

h5 {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h6 {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-muted);
}

p {
    margin-bottom: var(--sp-4);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: 600;
}

em .highlight,
.text-italic {
    font-style: italic;
}

small,
.text-small {
    font-size: var(--fs-sm);
}

.text-xs {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Price typography ── */
.price {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-text);
}

.price--large {
    font-size: var(--fs-2xl);
}

.price--old {
    font-size: var(--fs-sm);
    text-decoration: line-through;
    color: var(--c-text-muted);
}

/* ── Layout ── */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--sp-6);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.site-main {
    min-height: calc(100vh - var(--header-h) - 200px);
    padding-top: var(--sp-12);
    padding-bottom: var(--sp-16);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.btn--primary {
    background-color: var(--c-primary);
    color: var(--c-bg-white);
    border: 2px solid var(--c-primary);
}

.btn--primary:hover {
    background-color: var(--c-primary-dark);
    border-color: var(--c-primary-dark);
    color: var(--c-bg-white);
}

.btn--outline {
    background-color: transparent;
    color: var(--c-text);
    border: 1.5px solid var(--c-text);
}

.btn--outline:hover {
    background-color: var(--c-text);
    color: var(--c-bg-white);
}

.btn--accent {
    background-color: var(--c-accent);
    color: var(--c-bg-white);
    border: 2px solid var(--c-accent);
}

.btn--accent:hover {
    background-color: var(--c-accent-light);
    border-color: var(--c-accent-light);
    color: var(--c-bg-white);
}

.btn--sm {
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.65rem;
}

.btn--lg {
    padding: var(--sp-4) var(--sp-8);
    font-size: var(--fs-sm);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: var(--sp-1) var(--sp-3);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    border-radius: var(--radius-sm);
}

.badge--venta {
    background-color: var(--c-primary);
    color: var(--c-bg-white);
}

.badge--alquiler {
    background-color: var(--c-accent);
    color: var(--c-bg-white);
}

.badge--reservado {
    background-color: var(--c-warning);
    color: var(--c-bg-white);
}

.badge--vendido {
    background-color: var(--c-text-muted);
    color: var(--c-bg-white);
}

/* ── Forms ── */
.form-group {
    margin-bottom: var(--sp-4);
}

.form-label {
    display: block;
    margin-bottom: var(--sp-1);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
}

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--c-text);
    background-color: var(--c-bg-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(74, 90, 60, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--sp-4) center;
    padding-right: var(--sp-10);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ── Icons ── */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text-muted); }
.text-light { color: var(--c-text-light); }
.text-primary { color: var(--c-primary); }
.text-accent { color: var(--c-accent); }
.text-white { color: var(--c-bg-white); }

.bg-white { background-color: var(--c-bg-white); }
.bg-beige { background-color: var(--c-bg); }
.bg-dark { background-color: var(--c-bg-dark); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

.grid {
    display: grid;
    gap: var(--sp-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section {
    padding-block: var(--sp-16);
}

.section--sm {
    padding-block: var(--sp-10);
}

.divider {
    border: none;
    border-top: 1px solid var(--c-border);
    margin-block: var(--sp-6);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    h1 { font-size: var(--fs-3xl); }
    h2 { font-size: var(--fs-2xl); }
}

@media (max-width: 768px) {
    .container {
        padding-inline: var(--sp-4);
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    h1 { font-size: var(--fs-2xl); }
    h2 { font-size: var(--fs-xl); }

    .section {
        padding-block: var(--sp-10);
    }

    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}
