/* ===================================================
   HalfyShop — main.css
   Variables, reset, tipografías, layout base
   =================================================== */

:root {
    --color-bg:        #ffffff;
    --color-text:      #313339;
    --color-muted:     #a5a8b2;
    --color-border:    #babecb;
    --color-accent:    #313339;
    --font-body:       'Droid Serif', Georgia, serif;
    --font-logo:       'Tinos', Georgia, serif;
    --nav-height:      56px;
    --max-width:       1200px;
    --gutter:          24px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul, ol { list-style: none; }

/* --- Background estático semitransparente --- */
.site-bg {
    position: fixed;
    inset: 0;
    background-image: url('/assets/img/background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-height);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--font-logo);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--color-text);
}

/* --- Main & Footer --- */
.site-main {
    flex: 1;
    position: relative;
    z-index: 1;
}

.site-footer {
    text-align: center;
    padding: 2rem var(--gutter);
    font-size: 0.75rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
}

/* --- Section titles --- */
.section-title {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--color-muted);
}

/* --- Back link --- */
.back-link {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.back-link:hover { color: var(--color-text); }

/* --- Blog --- */
.blog-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.blog-empty { color: var(--color-muted); font-size: 0.9rem; }

.post-list { display: flex; flex-direction: column; gap: 0.1rem; }

.post-list__link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}

.post-list__link:hover .post-list__title { text-decoration: underline; }

.post-list__title { font-size: 0.95rem; }
.post-list__date  { font-size: 0.78rem; color: var(--color-muted); white-space: nowrap; }

/* --- Blog post --- */
.blog-post {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.blog-post__title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.blog-post__date {
    font-size: 0.8rem;
    color: var(--color-muted);
    display: block;
    margin-bottom: 2rem;
}

.blog-post__content {
    line-height: 1.8;
    margin-bottom: 3rem;
}

.blog-post__content p { margin-bottom: 1.2em; }
.blog-post__content h2 { margin: 2em 0 0.5em; font-size: 1.15rem; }

/* --- About --- */
.about-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-photo img {
    width: 240px;
    height: auto;
    border: 1px solid var(--color-border);
}

.about-text { flex: 1; line-height: 1.8; }
.about-text p { margin-bottom: 1.2em; }

.about-contact { margin-top: 1.5rem; }

.contact-link {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-decoration: underline;
}

.contact-link:hover { color: var(--color-text); }

@media (max-width: 640px) {
    .about-content { flex-direction: column; }
    .about-photo img { width: 100%; }
}

/* --- Novedades (index) --- */
.novedades-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.novedades-section__title {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 2.5rem;
}

.novedades-section__empty {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.novedades-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.novedad-card {
    border-bottom: 1px solid var(--color-border);
}

.novedad-card:first-child {
    border-top: 1px solid var(--color-border);
}

.novedad-card__link {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    text-decoration: none;
    align-items: flex-start;
}

.novedad-card__link:hover .novedad-card__titulo { text-decoration: underline; }

.novedad-card__img {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    overflow: hidden;
}

.novedad-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.novedad-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.novedad-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.novedad-card__tipo {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    padding: 0.1rem 0.5rem;
}

.novedad-card__tipo--evento { color: var(--color-text); border-color: var(--color-text); }

.novedad-card__fecha {
    font-size: 0.78rem;
    color: var(--color-muted);
}

.novedad-card__titulo {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
}

.novedad-card__lugar {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* --- Novedad detalle --- */
.novedad-detail {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.novedad-detail__img {
    margin-bottom: 2rem;
}

.novedad-detail__img img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.novedad-detail__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.novedad-detail__tipo {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    padding: 0.15rem 0.6rem;
}

.novedad-detail__tipo--evento { color: var(--color-text); border-color: var(--color-text); }

.novedad-detail__fecha {
    font-size: 0.82rem;
    color: var(--color-muted);
}

.novedad-detail__lugar {
    font-size: 0.82rem;
    color: var(--color-muted);
}

.novedad-detail__titulo {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.novedad-detail__contenido {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.novedad-detail__contenido p { margin-bottom: 1.2em; }

.novedad-detail__url {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--color-muted);
    text-decoration: underline;
    margin-bottom: 2rem;
}

.novedad-detail__url:hover { color: var(--color-text); }

.novedad-detail__back {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.novedad-detail__back:hover { color: var(--color-text); }


/* --- Search results --- */
.search-results {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem var(--gutter) 4rem;
}

.search-results__heading {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 2.5rem;
}

.search-results__heading em {
    font-style: normal;
    color: var(--color-text);
}

.search-results__empty {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.search-section { margin-bottom: 3rem; }

.search-section__title {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.search-list {
    display: flex;
    flex-direction: column;
}

.search-item { border-bottom: 1px solid var(--color-border); }

.search-item__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    text-decoration: none;
}

.search-item__link:hover .search-item__title { text-decoration: underline; }

.search-item__img {
    flex-shrink: 0;
    width: 60px;
    height: 44px;
    overflow: hidden;
    background: var(--color-border);
}

.search-item__img--empty { opacity: 0.3; }

.search-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.search-item__title {
    font-size: 0.92rem;
    color: var(--color-text);
}

.search-item__subtitle {
    font-size: 0.78rem;
    color: var(--color-muted);
}
