/*
 * Alegra Recipes – Base Styles v1.2
 *
 * Minimal structural CSS only.
 * All visual design is managed in Elementor Pro.
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS variables ──────────────────────────────────────────────────────────── */
:root {
    --ar-red:      #D94035;
    --ar-red-dark: #b8312a;
    --ar-black:    #111111;
    --ar-white:    #ffffff;
    --ar-gray:     #555555;
    --ar-border:   #e8e8e8;
}

/* ── Category badge ─────────────────────────────────────────────────────────── */
.ar-category-badge {
    display: inline-block;
    background: var(--ar-red);
    color: var(--ar-white);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 2px;
    text-decoration: none;
    transition: background .2s ease;
}
.ar-category-badge:hover { background: var(--ar-red-dark); }

/* ── Excerpt ────────────────────────────────────────────────────────────────── */
.ar-excerpt {
    margin: 0;
    line-height: 1.7;
    font-size: 15px;
}

/* ── Ingredients list ───────────────────────────────────────────────────────── */
.ar-ingredients-list {
    list-style: disc;
    margin: 0;
    padding: 0 0 0 20px;
}
.ar-ingredients-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--ar-border);
    color: var(--ar-gray);
    line-height: 1.5;
}
.ar-ingredients-list li:last-child { border-bottom: none; }

/* ── Steps list ─────────────────────────────────────────────────────────────── */
.ar-steps-list {
    list-style: disc;
    margin: 0;
    padding: 0 0 0 20px;
}
.ar-steps-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--ar-border);
    color: var(--ar-gray);
    line-height: 1.65;
}
.ar-steps-list li:last-child { border-bottom: none; }

/* ── Tags ───────────────────────────────────────────────────────────────────── */
.ar-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ar-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 100px;
    background: #f5f5f5;
    border: 1px solid var(--ar-border);
    color: var(--ar-gray);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.ar-tag:hover {
    background: var(--ar-red);
    border-color: var(--ar-red);
    color: var(--ar-white);
}

/* ── Rank Math breadcrumb ───────────────────────────────────────────────────── */
.rank-math-breadcrumb {
    font-size: .8rem;
    color: #999;
}
.rank-math-breadcrumb a {
    color: var(--ar-red);
    text-decoration: none;
}
.rank-math-breadcrumb a:hover { text-decoration: underline; }
.rank-math-breadcrumb .separator { margin: 0 6px; }

/* ── Hero background ────────────────────────────────────────────────────────── */
/* Elementor container must have: Position → Relative, Overflow → Hidden        */
.ar-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
/* Overlay oscuro para legibilidad del texto */
.ar-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.ar-hero-bg ~ * {
    position: relative;
    z-index: 1;
}

/* ── Archive card image ─────────────────────────────────────────────────────── */
/* [ar_card_image] — fixed ratio thumbnail for recipe cards                      */
.ar-card-image {
    display: block;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}
.ar-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}
.ar-card-image:hover img { transform: scale(1.04); }

/* ── Gallery slider v1.3 ────────────────────────────────────────────────────── */
.ar-gallery {
    position: relative;
    width: 100%;
    overflow: hidden !important;
    border-radius: 8px;
    background: #222;
    line-height: 0;
}
.ar-gallery__track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    transition: transform .35s ease;
}
.ar-gallery__slide {
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: 100%;
    width: 100%;
    overflow: hidden;
}
.ar-gallery__slide img {
    display: block;
    width: 100%;
    height: 360px;
    max-height: 360px;
    object-fit: cover;
    object-position: center center;
    margin: 0;
    padding: 0;
}
.ar-gallery__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 40px;
    text-align: center;
    padding: 0;
}
.ar-gallery__btn:hover { background: rgba(0,0,0,.9); }
.ar-gallery__btn--prev { left: 12px; }
.ar-gallery__btn--next { right: 12px; }
.ar-gallery__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 20;
    line-height: 1;
}
.ar-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.ar-gallery__dot.is-active { background: #fff; }
@media (max-width: 768px) {
    .ar-gallery__slide img { height: 220px; max-height: 220px; }
}
