/*
Theme Name: Urbanización
Theme URI: https://example.es/
Description: Tema mediterráneo para el portal de una urbanización de vecinos. Tonos cálidos (terracota, azul mediterráneo, arena). Diseñado para el plugin Urbanizacion MVP.
Author: MVP
Version: 0.2
Text Domain: urbanizacion
*/

/* ===========================================================================
   Paleta y variables — estilo mediterráneo
   ========================================================================= */
:root {
    --bg:            #FBF6EE;  /* arena clara  */
    --surface:       #FFFFFF;
    --primary:       #C75B39;  /* terracota    */
    --primary-dark:  #A8472A;
    --secondary:     #2C7DA0;  /* azul mediterráneo */
    --secondary-dark:#1B5A75;
    --accent:        #E4A951;  /* sol / oro    */
    --text:          #3A322B;  /* marrón cálido */
    --muted:         #7A6F63;
    --border:        #E8DDCB;
    --shadow:        0 8px 24px rgba(58, 50, 43, .08);
    --radius:        14px;
    --maxw:          1140px;
    --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ===========================================================================
   Base
   ========================================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }

a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--secondary-dark); text-decoration: underline; }

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

p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: .7em 1.4em;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn--ghost:hover { background: var(--primary); color: #fff; }
.btn--blue { background: var(--secondary); }
.btn--blue:hover { background: var(--secondary-dark); }

/* ===========================================================================
   Cabecera / navegación
   ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}
.site-brand {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.site-brand:hover { text-decoration: none; color: var(--primary-dark); }
.site-brand img { max-height: 46px; width: auto; }

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: var(--text);
    font-weight: 500;
    padding: .35rem .2rem;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* "Salir" / "Acceder" destacado al final del menú */
.main-nav .menu-item-auth a {
    color: var(--primary);
    font-weight: 600;
}
.main-nav .menu-item-auth a:hover { color: var(--primary-dark); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.6rem;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
}

/* ===========================================================================
   Héroe (portada)
   ========================================================================= */
.hero {
    position: relative;
    color: #fff;
    background-size: cover;
    background-position: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(27,90,117,.35), rgba(168,71,42,.55));
}
.hero__inner { position: relative; z-index: 2; max-width: 720px; padding: 4rem 0; }
.hero h1 { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.3); }
.hero p { font-size: 1.25rem; color: #fdf3e6; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ===========================================================================
   Secciones
   ========================================================================= */
.section { padding: 4rem 0; }
.section--tint { background: #fff; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section__head .eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 600;
    color: var(--secondary);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Rejilla de tarjetas */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(58,50,43,.14); }
.card__thumb { aspect-ratio: 3 / 2; overflow: hidden; background: #efe6d6; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__type {
    align-self: flex-start;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--primary);
    background: #f6e3d9;
    padding: .2rem .6rem;
    border-radius: 999px;
}
.card__title { font-size: 1.2rem; margin: 0; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--primary); text-decoration: none; }
.card__meta { font-size: .85rem; color: var(--muted); margin: 0; }
.card__excerpt { color: var(--muted); font-size: .95rem; margin: 0; }
.card__more { margin-top: auto; font-weight: 600; color: var(--secondary); text-decoration: none; align-self: flex-start; }
.card__more:hover { color: var(--secondary-dark); text-decoration: none; transform: translateX(2px); }

/* Accesos rápidos */
.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }
.quicklink {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    text-align: center;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s;
}
.quicklink:hover { transform: translateY(-4px); border-color: var(--primary); text-decoration: none; color: var(--text); }
.quicklink .dashicons { font-size: 2.4rem; width: auto; height: auto; color: var(--secondary); margin-bottom: .5rem; }
.quicklink strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }

/* Aviso zona privada */
.notice {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

/* ===========================================================================
   Cabecera de página / archivo
   ========================================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .lead { color: #e7f1f6; margin: .5rem 0 0; }

/* ===========================================================================
   Contenido (entradas y páginas)
   ========================================================================= */
.content { padding: 3rem 0; }
.entry { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem clamp(1.25rem, 4vw, 3rem); max-width: 820px; margin: 0 auto; }
.entry__meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.entry__featured { border-radius: var(--radius); margin-bottom: 1.5rem; }
.entry-content > * { margin-bottom: 1rem; }
.entry-content img { border-radius: 10px; }
.entry-content h2, .entry-content h3 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.5rem 0;
    padding: .5rem 1.25rem;
    color: var(--muted);
    font-style: italic;
}
.back-link { display: inline-block; margin: 0 auto 1.5rem; }

/* Galería del editor */
.wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1rem; list-style: none; padding: 0; }
.wp-block-gallery img { border-radius: 10px; width: 100%; object-fit: cover; }

/* ===========================================================================
   Formulario "Mi cuenta"
   ========================================================================= */
.umvp-perfil { max-width: 480px; }
.umvp-perfil label { display: block; font-weight: 600; margin-bottom: .25rem; }
.umvp-perfil input {
    width: 100%; padding: .6rem .8rem; font: inherit; background: #fff;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem;
}
.umvp-perfil input:disabled { background: #f3ece1; color: var(--muted); }
.umvp-perfil hr { border: 0; border-top: 1px solid var(--border); margin: .5rem 0 1.25rem; }
.umvp-aviso { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; }
.umvp-ok    { background: #e7f3ec; border: 1px solid #b6dcc4; color: #256b42; }
.umvp-error { background: #fbeaea; border: 1px solid #e3b4b4; color: #9b2c2c; }

/* ===========================================================================
   Pie de página
   ========================================================================= */
.site-footer {
    background: #2b211a;
    color: #e8ddcb;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.site-footer a { color: #f0c89a; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; color: #b6a892; text-align: center; }

/* ===========================================================================
   Paginación
   ========================================================================= */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-block; padding: .5rem .9rem; border-radius: 8px;
    background: #fff; border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 820px) {
    .split { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        display: none; box-shadow: var(--shadow);
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: .5rem 20px; }
    .main-nav li { border-bottom: 1px solid var(--border); }
    .main-nav li:last-child { border-bottom: 0; }
    .main-nav a { display: block; padding: .8rem 0; }
}
