/* ════════════════════════════════════════════════════════════
   BOOTSTRAP 5 — REMAP "success" → rosso brand #e01b13
   ════════════════════════════════════════════════════════════ */
:root {
    --bs-success:               #e01b13;
    --bs-success-rgb:           224, 27, 19;
    --bs-success-bg-subtle:     #fce8e7;
    --bs-success-border-subtle: #f5b3b0;
    --bs-success-text-emphasis: #7a0d09;
}
.bg-success {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
}
.text-success {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
}
.btn-success {
    --bs-btn-color:                #fff;
    --bs-btn-bg:                   #e01b13;
    --bs-btn-border-color:         #e01b13;
    --bs-btn-hover-color:          #fff;
    --bs-btn-hover-bg:             #c41710;
    --bs-btn-hover-border-color:   #b81510;
    --bs-btn-focus-shadow-rgb:     224, 27, 19;
    --bs-btn-active-color:         #fff;
    --bs-btn-active-bg:            #b81510;
    --bs-btn-active-border-color:  #ab130e;
    --bs-btn-disabled-color:       #fff;
    --bs-btn-disabled-bg:          #e01b13;
    --bs-btn-disabled-border-color:#e01b13;
}
.btn-outline-success {
    --bs-btn-color:                #e01b13;
    --bs-btn-border-color:         #e01b13;
    --bs-btn-hover-color:          #fff;
    --bs-btn-hover-bg:             #e01b13;
    --bs-btn-hover-border-color:   #e01b13;
    --bs-btn-focus-shadow-rgb:     224, 27, 19;
    --bs-btn-active-color:         #fff;
    --bs-btn-active-bg:            #e01b13;
    --bs-btn-active-border-color:  #e01b13;
    --bs-btn-disabled-color:       #e01b13;
    --bs-btn-disabled-bg:          transparent;
    --bs-btn-disabled-border-color:#e01b13;
}
.alert-success {
    --bs-alert-color:        #7a0d09;
    --bs-alert-bg:           #fce8e7;
    --bs-alert-border-color: #f5b3b0;
    --bs-alert-link-color:   #7a0d09;
}
.form-control:focus, .form-select:focus {
    border-color: #e01b13;
    box-shadow: 0 0 0 .25rem rgba(224,27,19,.2);
}
.form-check-input:checked {
    background-color: #e01b13;
    border-color: #e01b13;
}

/* ════════════════════════════════════════════════════════════
   TIPOGRAFIA — Cookie + Asap
   ════════════════════════════════════════════════════════════ */
body {
    font-family: 'Asap', sans-serif;
    font-weight: 400;
    color: #333;
    background-color: #dfdac7;
}
h1, h2, h3, .card-title {
    font-family: 'Cookie', cursive;
    font-weight: 400;
}
.navbar-brand {
    font-family: 'Cookie', cursive !important;
    font-size: 2rem !important;
    font-weight: 400 !important;
    letter-spacing: .02em;
    line-height: 1;
}

/* ════════════════════════════════════════════════════════════
   NAVBAR PUBBLICA
   ════════════════════════════════════════════════════════════ */
.navbar-white {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.navbar-white .navbar-brand { color: #e01b13 !important; }
.navbar-white .nav-link     { color: #333 !important; font-weight: 500; text-transform: lowercase;}
.navbar-white .nav-link:hover,
.navbar-white .nav-link:focus,
.navbar-white .nav-link.show { color: #e01b13 !important; }
.navbar-white .navbar-toggler { border-color: rgba(0,0,0,.15); }
.navbar-white .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(51,51,51,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-logo {
    width: 40px; height: 40px;
    object-fit: cover; border-radius: .375rem;
}

/* ════════════════════════════════════════════════════════════
   HERO CAROUSEL
   ════════════════════════════════════════════════════════════ */
.hero-carousel { margin-bottom: 0; }

.hero-slide {
    height: 88vh;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

/* Sfondi placeholder — gradienti eleganti */
.slide-1 {
    background: radial-gradient(ellipse at 35% 55%, #d42b20 0%, #7a0808 45%, #120101 100%);
}
.slide-2 {
    background: linear-gradient(145deg, #1c0f08 0%, #7a3218 30%, #c47860 65%, #dfdac7 100%);
}
.slide-3 {
    background: linear-gradient(145deg, #0e0b14 0%, #3d1e40 35%, #8a4a7a 65%, #d7a1ae 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-content {
    padding: 0 2rem;
    max-width: 820px;
    margin: 0 auto;
}
.hero-eyebrow {
    font-family: 'Asap', sans-serif;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    margin-bottom: .85rem;
}
.hero-title {
    font-family: 'Cookie', cursive;
    font-size: clamp(2rem, 6.5vw, 5rem);
    line-height: .92;
    color: #fff;
    text-shadow: 0 4px 32px rgba(0,0,0,.55);
    margin-bottom: 1.25rem;
}
.hero-subtitle {
    font-family: 'Asap', sans-serif;
    font-weight: 300;
    font-size: clamp(.95rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.85);
    text-shadow: 0 1px 14px rgba(0,0,0,.4);
    line-height: 1.75;
    margin-bottom: 2.75rem;
}
.btn-hero {
    display: inline-block;
    padding: .9rem 3.2rem;
    border: 1.5px solid rgba(255,255,255,.65);
    color: #fff;
    background: transparent;
    font-family: 'Asap', sans-serif;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    transition: background .3s, color .3s, border-color .3s;
}
.btn-hero:hover, .btn-hero:focus {
    background: #fff;
    color: #e01b13;
    border-color: #fff;
}
.carousel-control-prev, .carousel-control-next {
    width: 5%;
    opacity: .5;
    transition: opacity .2s;
}
.carousel-control-prev:hover, .carousel-control-next:hover { opacity: .9; }
.carousel-indicators [data-bs-target] {
    width: 28px;
    height: 2px;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    opacity: .45;
}
.carousel-indicators .active { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   SECTION HEADINGS
   ════════════════════════════════════════════════════════════ */
.section-heading {
    font-family: 'Cookie', cursive;
    font-size: 3rem;
    color: #333;
    line-height: 1;
    position: relative;
    padding-bottom: .5rem;
}
.section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: #e01b13;
    margin-top: .4rem;
}

/* ════════════════════════════════════════════════════════════
   CARD RICETTE
   ════════════════════════════════════════════════════════════ */
.recipe-card { transition: transform .22s, box-shadow .22s; }
.recipe-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,.11); }
.recipe-card .card-img-top { height: 200px; object-fit: cover; }
.recipe-card .badge-difficolta { position: absolute; top: 10px; right: 10px; }
.recipe-card .card-title { font-size: 1.6rem; }

/* ════════════════════════════════════════════════════════════
   PLACEHOLDER IMMAGINE
   ════════════════════════════════════════════════════════════ */
.img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f5e0e3 0%, #d7a1ae 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #e01b13;
}
.img-placeholder-sm { height: 120px; font-size: 2rem; }

/* ════════════════════════════════════════════════════════════
   STELLE RATING
   ════════════════════════════════════════════════════════════ */
.stars { color: #ffc107; font-size: 1.1rem; }

/* ════════════════════════════════════════════════════════════
   INGREDIENTI LIST
   ════════════════════════════════════════════════════════════ */
.ingredienti-list li { padding: .35rem 0; border-bottom: 1px solid #f0f0f0; }
.ingredienti-list li:last-child { border-bottom: none; }

/* ════════════════════════════════════════════════════════════
   STEP COUNTER
   ════════════════════════════════════════════════════════════ */
.istruzione-step { counter-increment: step; }
.istruzione-step::before {
    content: counter(step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: #e01b13; color: white; font-weight: 700;
    font-family: 'Asap', sans-serif;
    margin-right: .75rem; flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   CATEGORIE GRID HOVER (legacy — used in categoria.php etc.)
   ════════════════════════════════════════════════════════════ */
.categoria-card { text-decoration: none; color: inherit; }
.categoria-card .card { transition: all .22s; }
.categoria-card:hover .card { background: #e01b13 !important; color: white !important; }
.categoria-card:hover .card .text-muted { color: rgba(255,255,255,.75) !important; }

/* ════════════════════════════════════════════════════════════
   CATEGORIE GRID (homepage)
   ════════════════════════════════════════════════════════════ */
.cat-section {
    background: rgba(255,255,255,.45);
    border-top: 1px solid rgba(0,0,0,.07);
    border-bottom: 1px solid rgba(0,0,0,.07);
}
.cat-card-link { text-decoration: none; color: inherit; }
.cat-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    transition: all .28s cubic-bezier(.4,0,.2,1);
}
.cat-card-icon {
    font-size: 2.2rem;
    color: #e01b13;
    line-height: 1;
    transition: color .28s, transform .28s cubic-bezier(.4,0,.2,1);
}
.cat-card-name {
    color: #333;
    transition: color .28s;
    font-size: .85rem;
}
.cat-card-count {
    font-size: .72rem;
    color: #aaa;
    margin-top: .15rem;
    transition: color .28s;
}
.cat-card-link:hover .cat-card {
    background: #e01b13;
    border-color: #e01b13;
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(224,27,19,.22);
}
.cat-card-link:hover .cat-card-icon {
    color: #fff;
    transform: scale(1.15);
}
.cat-card-link:hover .cat-card-name  { color: #fff; }
.cat-card-link:hover .cat-card-count { color: rgba(255,255,255,.65); }

/* ════════════════════════════════════════════════════════════
   GALLERY THUMBNAIL
   ════════════════════════════════════════════════════════════ */
.gallery-thumb {
    height: 180px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity .2s;
}
.gallery-item:hover .gallery-thumb { opacity: .88; }

/* ════════════════════════════════════════════════════════════
   BADGE TAG
   ════════════════════════════════════════════════════════════ */
.tag-badge { font-size: .75rem; }

/* ════════════════════════════════════════════════════════════
   INTRO HOME SECTION
   ════════════════════════════════════════════════════════════ */
.introhome-section {
    background: linear-gradient(135deg, #f8fdf5 0%, #eaf7e2 100%);
    border-top: 3px solid #2e7d32;
}
.introhome-eyebrow {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #2e7d32;
}
.introhome-icon-wrap {
    width: 160px; height: 160px;
    background: rgba(46,125,50,.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    font-size: 4.5rem;
    color: #2e7d32;
}

/* ════════════════════════════════════════════════════════════
   ABOUT PAGE — STAFF CARDS
   ════════════════════════════════════════════════════════════ */
.staff-avatar {
    width: 80px; height: 80px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #2e7d32;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   TAG CLOUD INGREDIENTI
   ════════════════════════════════════════════════════════════ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 3px;
    align-items: baseline;
    padding: 4px 0;
}
.tag-cloud a {
    display: inline-block;
    text-decoration: none;
    line-height: 1.2;
    padding: 1px 3px;
    border-radius: 3px;
    transition: transform .18s ease, color .18s;
}
.tag-cloud a:nth-child(7n+1) { transform: rotate(-9deg);  }
.tag-cloud a:nth-child(7n+2) { transform: rotate(6deg);   }
.tag-cloud a:nth-child(7n+3) { transform: rotate(-4deg);  }
.tag-cloud a:nth-child(7n+4) { transform: rotate(11deg);  }
.tag-cloud a:nth-child(7n+5) { transform: rotate(-7deg);  }
.tag-cloud a:nth-child(7n+6) { transform: rotate(3deg);   }
.tag-cloud a:nth-child(7n)   { transform: rotate(-12deg); }
.tag-cloud a:hover {
    transform: scale(1.22) rotate(0deg) !important;
    color: #c0392b !important;
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer-dark { background-color: #c0392b; }
.footer-logo {
    width: 32px; height: 32px;
    object-fit: cover; border-radius: .25rem;
    vertical-align: middle;
}
.footer-dark .text-muted { color: rgba(255,255,255,.75) !important; }
.footer-dark a { color: rgba(255,255,255,.85); transition: color .15s; }
.footer-dark a:hover { color: #ffffff !important; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    color: rgba(255,255,255,.85);
    font-size: 1rem;
    transition: background .15s, border-color .15s, color .15s;
}
.footer-social a:hover {
    background: rgba(255,255,255,.2);
    border-color: white;
    color: white !important;
}

/* ════════════════════════════════════════════════════════════
   ADMIN SIDEBAR
   ════════════════════════════════════════════════════════════ */
.admin-sidebar { min-height: calc(100vh - 56px); background: #333; }
.admin-sidebar .nav-link { color: rgba(255,255,255,.7); padding: .5rem 1rem; border-radius: .375rem; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { color: white; background: rgba(255,255,255,.1); }
.admin-sidebar .nav-link i { width: 20px; }

/* ════════════════════════════════════════════════════════════
   RECIPE STEPS — timeline card layout
   ════════════════════════════════════════════════════════════ */
.recipe-steps { position: relative; }

.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    position: relative;
}
/* Connecting vertical line */
.step-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: -1.75rem;
    width: 2px;
    background: linear-gradient(to bottom, #2e7d32 0%, rgba(46,125,50,.1) 100%);
    z-index: 0;
}
.step-num {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(46,125,50,.45);
    flex-shrink: 0;
}
.step-body {
    flex: 1;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.07);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    min-height: 80px;
}
.step-inner {
    display: flex;
    align-items: stretch;
}
/* Image panel */
.step-photo {
    flex-shrink: 0;
    width: 50%;
    position: relative;
    display: block;
    text-decoration: none;
    background: #f8f9fa;
    border-right: 1px solid rgba(0,0,0,.06);
}
.step-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .35s ease;
}
.step-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s;
    pointer-events: none;
}
.step-photo-overlay i {
    color: rgba(255,255,255,0);
    font-size: 2.2rem;
    transition: color .25s, transform .25s;
    transform: scale(.8);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.step-photo:hover img { transform: scale(1.07); }
.step-photo:hover .step-photo-overlay { background: rgba(0,0,0,.38); }
.step-photo:hover .step-photo-overlay i { color: #fff; transform: scale(1); }
/* Text panel */
.step-text {
    padding: 1.1rem 1.3rem;
    flex: 1;
    display: flex;
    align-items: center;
}
.step-text p { margin: 0; line-height: 1.75; color: #333; font-size: .97rem; }

@media (max-width: 575px) {
    .step-inner { flex-direction: column; }
    .step-photo { width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,.06); }
    .step-photo img { width: 100%; height: auto; }
    .step-num { width: 34px; height: 34px; min-width: 34px; font-size: .88rem; }
    .step-item:not(:last-child)::before { left: 16px; }
}

/* ════════════════════════════════════════════════════════════
   BREADCRUMB LINKS
   ════════════════════════════════════════════════════════════ */
.breadcrumb a { color: #c0392b !important; text-decoration: none; }
.breadcrumb a:hover { color: #a02a21 !important; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   PHOTO GALLERY — griglia con lightbox
   ════════════════════════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-item-wrap {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.gallery-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f0ece0;
}
.gallery-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.gallery-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s;
    pointer-events: none;
}
.gallery-thumb-overlay i {
    color: rgba(255,255,255,0);
    font-size: 2rem;
    transition: color .25s, transform .25s;
    transform: scale(.8);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.gallery-thumb-overlay .gallery-idx {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: .7rem;
    font-weight: 700;
    color: rgba(255,255,255,0);
    transition: color .25s;
}
.gallery-item-wrap:hover .gallery-thumb-wrap img   { transform: scale(1.07); }
.gallery-item-wrap:hover .gallery-thumb-overlay    { background: rgba(0,0,0,.38); }
.gallery-item-wrap:hover .gallery-thumb-overlay i  { color: #fff; transform: scale(1); }
.gallery-item-wrap:hover .gallery-idx              { color: rgba(255,255,255,.7); }

.gallery-caption {
    padding: .5rem .75rem .6rem;
    border-top: 1px solid rgba(0,0,0,.05);
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ════════════════════════════════════════════════════════════
   VOTO RICETTE — stelle interattive e display
   ════════════════════════════════════════════════════════════ */
.recipe-stars-display .star-full  { color: #f5a623; font-size: 1.4rem; }
.recipe-stars-display .star-empty { color: #ddd;    font-size: 1.4rem; }

.star-vote-widget { display: flex; justify-content: center; gap: 4px; }
.star-vote-widget .star-btn {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color .12s, transform .1s;
    line-height: 1;
}
.star-vote-widget .star-btn.hover,
.star-vote-widget .star-btn:hover { color: #f5a623; transform: scale(1.15); }

/* ════════════════════════════════════════════════════════════
   TOP 10 HOME
   ════════════════════════════════════════════════════════════ */
.top10-card { transition: transform .18s, box-shadow .18s; }
.top10-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12) !important; }

.top10-rank {
    min-width: 36px;
    height: 36px;
    background: #e01b13;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   BANNER PROPONI RICETTA — sidebar (ricetta.php)
   ════════════════════════════════════════════════════════════ */
.proponi-banner-sidebar { background: #fff8f8; border: 1px solid #f5b3b0 !important; }
.proponi-banner-sidebar i { color: #e01b13; }

.proponi-banner {
    background: linear-gradient(135deg, #c41710 0%, #e01b13 50%, #a81410 100%);
    color: #fff;
}
.proponi-banner h2 { color: #fff; }
.proponi-banner .btn-light {
    color: #e01b13;
    border-color: #fff;
}
.proponi-banner .btn-light:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
