/**
 * blog.css — Stili tema blog Agriturismi.it
 * Palette coerente con il portale: teal/grigio, bordi sottili, font-weight 600
 * Mobile first — Bootstrap 4
 */

/* ===== NAVBAR ===== */
.agri-navbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .5rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.agri-navbar .navbar-toggler {
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: .35rem .6rem;
  font-size: 1.1rem;
}
.agri-navbar .nav-link {
  color: #475569 !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .5rem .85rem !important;
  transition: color .2s;
}
.agri-navbar .nav-link:hover {
  color: #0d9488 !important;
}
.agri-navbar .nav-item.active .nav-link {
  color: #0d9488 !important;
  font-weight: 600;
  position: relative;
}
.agri-navbar .nav-item.active .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: .85rem;
  right: .85rem;
  height: 2px;
  background: #0d9488;
  border-radius: 2px;
}
.agri-nav-cta {
  display: inline-block;
  background: #0d9488;
  color: #fff !important;
  font-weight: 600;
  font-size: .85rem;
  padding: .45rem 1rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all .2s;
}
.agri-nav-cta:hover {
  background: #0f766e;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
  color: #fff !important;
}

/* ===== LOGO CSS ===== */
.agri-logo {
  display: flex !important;
  align-items: center;
  text-decoration: none !important;
}
.agri-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: 8px;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
}
.agri-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -.02em;
}
.agri-logo-dot {
  color: #0d9488;
  font-weight: 800;
}
.agri-logo:hover .agri-logo-icon {
  box-shadow: 0 2px 12px rgba(13,148,136,.5);
}

/* ===== CTA BUTTON (usato anche fuori navbar) ===== */
.agri-btn-cta {
  background: #0d9488 !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  transition: all .2s;
}
.agri-btn-cta:hover {
  background: #0f766e !important;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
}

/* ===== HERO ===== */
.agri-hero {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
  border: 1px solid rgba(13,148,136,.12);
  border-radius: .75rem;
}
.agri-hero h1 { color: #0f766e; }
.agri-hero .text-muted { color: #64748b !important; }

/* ===== SEARCH BAR ===== */
.agri-search .input-group-text {
  background: #fff;
  border-color: #cbd5e1;
  color: #64748b;
}
.agri-search .form-control {
  border-color: #cbd5e1;
}
.agri-search .form-control:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 .2rem rgba(13,148,136,.15);
}

/* ===== CATEGORY PILLS ===== */
.agri-pill {
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 999px;
  font-weight: 500;
  font-size: .875rem;
  transition: all .2s;
}
.agri-pill:hover {
  background: #ccfbf1;
  color: #0f766e;
  text-decoration: none;
}
.agri-pill.active,
.agri-pill[aria-current="page"] {
  background: #0d9488;
  color: #fff;
}
.agri-pill .badge {
  font-weight: 600;
  font-size: .7rem;
}

/* ===== CARDS ===== */
.agri-card {
  border-radius: .9rem;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .25s, transform .25s;
}
.agri-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  transform: translateY(-2px);
}
.agri-card img.card-img-top {
  height: 200px;
  object-fit: cover;
}
.agri-card-featured img.card-img-top {
  height: 220px;
}
.agri-card .card-title a {
  text-decoration: none;
  color: #1e293b;
}
.agri-card .card-title a:hover {
  text-decoration: underline;
  color: #0f766e;
}
.agri-card .badge-primary {
  background: #0d9488;
  border: none;
}
.agri-card .badge-primary:hover {
  background: #0f766e;
}

/* Card featured / hero (carousel) */
.agri-card-hero {
  border-radius: .9rem;
  overflow: hidden;
  position: relative;
  min-height: 380px;
  background: #1e293b;
}
.agri-card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}
.agri-card-hero .card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 2rem 1.5rem 1.5rem;
  color: #fff;
}
.agri-card-hero .card-overlay h2 a {
  color: #fff;
  text-decoration: none;
}
.agri-card-hero .card-overlay h2 a:hover {
  text-decoration: underline;
}
.agri-card-hero .card-overlay .badge {
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
}

/* Placeholder SVG */
.placeholder {
  filter: grayscale(100%);
  opacity: .25;
  background: #f3f4f6;
}

@media (min-width: 1200px) {
  .agri-card img.card-img-top { height: 220px; }
}

/* ===== FEATURED GRID (In Evidenza) ===== */
.agri-featured-main,
.agri-featured-side {
  position: relative !important;
  border-radius: .9rem;
  overflow: hidden;
  display: block !important;
  text-decoration: none !important;
  color: #fff !important;
  background: #1e293b;
}
.agri-featured-main { height: 420px; }
.agri-featured-side { height: calc(50% - 6px); }
.agri-featured-main > img,
.agri-featured-side > img {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
  transition: transform .4s ease;
  border-radius: 0 !important;
  max-width: none !important;
}
.agri-featured-main:hover > img,
.agri-featured-side:hover > img {
  transform: scale(1.04);
}
.agri-featured-placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0d9488, #1e293b);
}
.agri-featured-overlay {
  position: absolute !important;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 2.5rem 1.5rem 1.25rem;
  color: #fff !important;
  z-index: 2;
}
.agri-featured-side .agri-featured-overlay {
  padding: 1.5rem 1rem 1rem;
}
.agri-featured-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.agri-featured-overlay h2 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .35rem;
  color: #fff !important;
}
.agri-featured-overlay h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .25rem;
  color: #fff !important;
}
.agri-featured-overlay p {
  font-size: .88rem;
  opacity: .88;
  margin: 0 0 .35rem;
  line-height: 1.4;
}
.agri-featured-date {
  font-size: .75rem;
  opacity: .7;
}
.agri-featured-main:hover .agri-featured-overlay,
.agri-featured-side:hover .agri-featured-overlay {
  background: linear-gradient(transparent 10%, rgba(0,0,0,.82));
}
/* Colonna laterale flex per 2 card */
.agri-featured-grid .col-lg-5 > .d-flex {
  height: 420px;
}

@media (min-width: 992px) {
  .agri-featured-grid .col-lg-7 { padding-right: 6px; }
  .agri-featured-grid .col-lg-5 { padding-left: 6px; }
}
@media (max-width: 991.98px) {
  .agri-featured-main { height: 280px; }
  .agri-featured-side { height: 200px; }
  .agri-featured-grid .col-lg-5 > .d-flex { height: auto; }
  .agri-featured-overlay h2 { font-size: 1.15rem; }
}

/* ===== SEZIONE "PIU LETTI" ===== */
.agri-popular-item {
  display: flex;
  align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.agri-popular-item:last-child { border-bottom: none; }
.agri-popular-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0fdfa;
  color: #0d9488;
  font-weight: 700;
  font-size: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: .75rem;
}
.agri-popular-item:nth-child(-n+3) .agri-popular-num {
  background: #0d9488;
  color: #fff;
}
.agri-popular-item a {
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.3;
}
.agri-popular-item a:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* ===== SEZIONE GESTORI ===== */
.agri-gestori-banner {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #f8fafc 100%);
  border: 1px solid #99f6e4;
  border-radius: .75rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.agri-gestori-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(13,148,136,.06);
}
.agri-gestori-banner h3 {
  color: #0f766e;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.agri-gestori-banner p {
  font-size: .9rem;
  line-height: 1.5;
  color: #64748b;
  margin-bottom: 0;
}
.agri-gestori-badge {
  display: inline-block;
  background: #ccfbf1;
  color: #0d9488;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: .75rem;
}
.agri-gestori-link {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #1e293b !important;
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 14px;
  text-decoration: none !important;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.agri-gestori-link:hover {
  background: #fff;
  border-color: #0d9488;
  color: #0f766e !important;
  box-shadow: 0 2px 8px rgba(13,148,136,.12);
}
.agri-gestori-link .badge {
  background: #f0fdfa;
  color: #0d9488;
  font-size: .65rem;
}
.agri-gestori-mini {
  display: flex;
  align-items: center;
  padding: .6rem .75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  color: #1e293b !important;
  text-decoration: none !important;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.agri-gestori-mini:hover {
  border-color: #0d9488;
  color: #0f766e !important;
  box-shadow: 0 2px 8px rgba(13,148,136,.12);
}
.agri-gestori-highlight {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e !important;
  font-weight: 600;
}
.agri-gestori-highlight i {
  color: #0d9488;
}
.agri-gestori-highlight:hover {
  background: #ccfbf1;
  border-color: #0d9488;
}
.agri-gestori-cards {
  position: relative;
  z-index: 1;
}
@media (max-width: 767.98px) {
  .agri-gestori-banner { padding: 1.5rem 1.25rem; }
  .agri-gestori-banner h3 { font-size: 1.15rem; }
}

/* ===== CATEGORIE SHOWCASE ===== */
.agri-cat-card {
  display: block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  padding: 1.25rem;
  text-align: center;
  transition: all .25s;
  text-decoration: none !important;
  color: #1e293b;
}
.agri-cat-card:hover {
  background: #f0fdfa;
  border-color: #99f6e4;
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(13,148,136,.12);
  color: #0f766e;
}
.agri-cat-card .cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ccfbf1;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.2rem;
}
.agri-cat-card:hover .cat-icon {
  background: #0d9488;
  color: #fff;
}
.agri-cat-card h3 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.agri-cat-card .cat-count {
  font-size: .75rem;
  color: #94a3b8;
}

/* ===== PAGINAZIONE ===== */
.agri-pagination {
  gap: 2px;
}
.agri-pagination .page-item {
  margin: 0 1px;
}
.agri-pagination .page-link {
  font-weight: 600;
  font-size: .8rem;
  padding: .4rem .65rem;
  border-radius: 6px;
  min-width: 34px;
  text-align: center;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  line-height: 1.4;
  transition: all .2s;
}
.agri-pagination .page-link:hover {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #0d9488;
}
.agri-pagination .page-item.active .page-link {
  background-color: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.agri-pagination .page-item.disabled .page-link {
  color: #cbd5e1;
  background: #f8fafc;
  border-color: #f1f5f9;
}

/* ===== SECTION HEADERS ===== */
.agri-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}
.agri-section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.agri-section-header .agri-section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #99f6e4, transparent);
  margin-left: 1rem;
}
.agri-section-header a {
  color: #0d9488;
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 1rem;
}
.agri-section-header a:hover {
  text-decoration: underline;
}

/* ===== ARCHIVE HEADER ===== */
.agri-archive-header {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
  border: 1px solid rgba(13,148,136,.12);
  border-radius: .75rem;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.agri-archive-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f766e;
  margin-bottom: .25rem;
}
.agri-archive-header .archive-desc {
  color: #64748b;
  font-size: .95rem;
  margin-bottom: 0;
}
.agri-breadcrumb {
  font-size: .85rem;
  margin-bottom: 1rem;
}
.agri-breadcrumb a {
  color: #0d9488;
  text-decoration: none;
}
.agri-breadcrumb a:hover {
  text-decoration: underline;
}
.agri-breadcrumb .separator {
  color: #94a3b8;
  margin: 0 .4rem;
}

/* ===== 404 ===== */
.agri-404 {
  text-align: center;
  padding: 4rem 1rem;
}
.agri-404 .error-code {
  font-size: 6rem;
  font-weight: 800;
  color: #0d9488;
  line-height: 1;
  margin-bottom: 1rem;
}
.agri-404 h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: .5rem;
}
.agri-404 p {
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ===== SIDEBAR ===== */
#sidebar .module {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: .75rem;
  padding: 1rem;
}
#sidebar .module + .module { margin-top: 1rem; }
#sidebar h4,
#sidebar h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: #1e293b;
}
#sidebar .media .text-body { text-decoration: none; }
#sidebar .media .text-body:hover { text-decoration: underline; color: #0f766e; }

/* ===== ENTRY CONTENT (single) ===== */
.entry-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.entry-content a { color: #0d9488; }
.entry-content a:hover { color: #0f766e; }
.entry-content h2, .entry-content h3 { color: #1e293b; margin-top: 1.5rem; }
.entry-content blockquote {
  border-left: 4px solid #0d9488;
  padding: .75rem 1.25rem;
  background: #f0fdfa;
  border-radius: 0 .5rem .5rem 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: #475569;
}

/* ===== FOOTER ===== */
#footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 2.5rem 0 1.5rem;
  font-size: .875rem;
}
#footer a { color: #cbd5e1; transition: color .2s; }
#footer a:hover { color: #fff; text-decoration: none; }
#footer hr { border-color: rgba(255,255,255,.1); }
#footer .social ul { padding: 0; margin: .75rem 0; list-style: none; }
#footer .social ul li { display: inline-block; margin: 0 4px; }
#footer .social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  transition: all .2s;
}
#footer .social a:hover {
  background: #0d9488;
  transform: translateY(-2px);
}
#footer .social i {
  color: #fff;
  font-size: 15px;
  line-height: 1;
  width: auto;
  height: auto;
  background: none;
  padding: 0;
  border-radius: 0;
}

/* ===== OVERRIDE VECCHI STILI WP ===== */
.jumbotron { display: none; }
#wpadminbar { display: none !important; }
/* Nascondi vecchi banner immagine nella sidebar (widget legacy) */
#sidebar #adv200,
#sidebar #adv300,
#sidebar .module img[src*="banner"],
#sidebar .module a[href*="offerte"] > img,
#sidebar .widget_text img[alt*="Offerte"],
#sidebar .textwidget img { display: none !important; }
#sidebar .widget_text .textwidget:empty { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .agri-card-hero { min-height: 260px; }
  .agri-card-hero .card-overlay { padding: 1.25rem 1rem 1rem; }
  .agri-card-hero .card-overlay h2 { font-size: 1.1rem; }
  .agri-archive-header { padding: 1rem 1.25rem; }
  .agri-archive-header h1 { font-size: 1.2rem; }
  .agri-section-header h2 { font-size: 1.1rem; }
}

/* ===== UTILITY ===== */
.text-teal { color: #0d9488 !important; }
.bg-teal-light { background-color: #f0fdfa !important; }
.fw-600 { font-weight: 600 !important; }

/* === Categorie tematiche === */
.agri-cat-card--tema .cat-desc {
  font-size: .78rem;
  color: #6b7280;
  margin: .25rem 0 .4rem;
  line-height: 1.3;
}

/* === Link regioni === */
.agri-region-link {
  display: inline-flex;
  align-items: center;
  padding: .45rem .6rem;
  font-size: .88rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: .4rem;
  transition: background .15s, color .15s;
}
.agri-region-link:hover {
  background: #f0fdfa;
  color: #0d9488;
  text-decoration: none;
}
.agri-region-link .badge {
  font-size: .7rem;
  font-weight: 400;
  color: #9ca3af;
}
