/* =====================================================================
   frontend.css — CMS SEO/AEO Frontend Styles
   Usa CSS custom properties settate inline dall'header (da settings)
   ===================================================================== */

/* ── RESET & BASE ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body, Arial, sans-serif);
    background-color: var(--color-bg, #fff);
    color: var(--color-text, #1f2937);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary, #2563eb); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading, Georgia, serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text, #1f2937);
    margin-bottom: 0.6em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: 1rem; }

blockquote {
    border-left: 4px solid var(--color-primary, #2563eb);
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    background: #f8f9fa;
    font-style: italic;
}

code { background: #f3f4f6; padding: 0.1em 0.4em; border-radius: 3px; font-size: 0.9em; }
pre  { background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1rem; }
pre code { background: none; padding: 0; color: inherit; }

hr { border: none; border-top: 1px solid #e5e7eb; margin: 2rem 0; }

/* ── LAYOUT ──────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

#page-wrapper { min-height: calc(100vh - 300px); }

/* Content area grid */
.content-with-sidebar-right  { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.content-with-sidebar-left   { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: start; }
.content-full { max-width: 900px; margin: 0 auto; }

/* ── HEADER ──────────────────────────────────────────────────────── */
.site-header {
    background-color: var(--color-header, #1f2937);
    color: #fff;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header.header-sticky { position: sticky; top: 0; }

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 64px;
    position: relative;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-img   { max-height: 48px; width: auto; }
.logo-text  { font-family: var(--font-heading, serif); font-size: 1.4rem; font-weight: 700; color: #fff; }

/* Logo center */
.header-logo-center .header-inner { flex-direction: column; padding: 1rem 1.25rem 0; gap: 0.5rem; }
.header-logo-center .header-top   { width: 100%; display: flex; justify-content: center; padding-bottom: 0.5rem; }
.header-logo-center .header-bottom-bar {
    width: 100%; display: flex; align-items: center;
    justify-content: center; gap: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 0.5rem 0 0.75rem;
}
.header-logo-center .main-nav { flex: 1; }

/* Main Nav */
.main-nav { flex: 1; }
.nav-list  { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }

.nav-item  { position: relative; }
.nav-item > a {
    display: block; padding: 0.5rem 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500; font-size: 0.92rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-item > a:hover,
.nav-item > a:focus { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }

/* Dropdown */
.nav-item.has-dropdown { cursor: pointer; }
.dropdown-arrow { font-size: 0.7em; margin-left: 4px; opacity: 0.7; }
.dropdown-menu {
    position: absolute; top: calc(100% + 4px); left: 0;
    background: #fff; border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 200px; opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}
.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu .nav-item > a {
    color: var(--color-text, #1f2937);
    padding: 0.55rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid #f3f4f6;
}
.dropdown-menu .nav-item:last-child > a { border-bottom: none; }
.dropdown-menu .nav-item > a:hover { background: #f9fafb; color: var(--color-primary, #2563eb); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

/* Search toggle */
.search-toggle {
    background: none; border: none; color: rgba(255,255,255,0.85); cursor: pointer;
    padding: 0.4rem; border-radius: 4px; display: flex; align-items: center;
    transition: color 0.2s;
}
.search-toggle:hover { color: #fff; }

/* Search overlay */
.search-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px;
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-overlay-inner { width: 100%; max-width: 640px; padding: 0 1.25rem; }
.search-overlay form  { display: flex; align-items: center; gap: 0.5rem; }
.search-input {
    flex: 1; background: #fff; border: none; border-radius: 6px;
    padding: 0.85rem 1rem; font-size: 1.1rem;
    outline: none; color: var(--color-text, #1f2937);
}
.search-overlay button[type="submit"] {
    background: var(--color-primary, #2563eb); border: none; color: #fff;
    padding: 0.85rem 1.1rem; border-radius: 6px; cursor: pointer; display: flex;
}
.search-close {
    background: none; border: none; color: rgba(255,255,255,0.7);
    font-size: 1.4rem; cursor: pointer; padding: 0.4rem 0.6rem;
}

/* Language switcher */
.lang-switcher { display: flex; align-items: center; gap: 0.35rem; }
.lang-item {
    color: rgba(255,255,255,0.7); font-size: 0.78rem; font-weight: 600;
    padding: 0.25rem 0.45rem; border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s; text-transform: uppercase; text-decoration: none;
}
.lang-item:hover, .lang-item.active {
    background: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color: #fff; text-decoration: none;
}

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 4px; background: none; border: none;
    cursor: pointer; padding: 6px; border-radius: 4px;
}
.hamburger-line { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.hamburger.is-open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.is-open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Mobile nav */
.mobile-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--color-header, #1f2937);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 900; max-height: 80vh; overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav-list { padding: 0.5rem 0 1rem; }
.mobile-nav-item > a {
    display: block; padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.9); font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-nav-item > a:hover { background: rgba(255,255,255,0.08); text-decoration: none; color: #fff; }
.mobile-submenu { background: rgba(0,0,0,0.2); }
.mobile-submenu li a { padding: 0.55rem 2.5rem; display: block; color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.mobile-submenu li a:hover { color: #fff; }
.mobile-lang { padding: 0.75rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-lang .lang-item { margin-right: 0.35rem; }

/* ── HERO SLIDER ─────────────────────────────────────────────────── */
.hero-slider {
    position: relative; overflow: hidden; background: #111;
    width: 100%; aspect-ratio: 16/6; min-height: 280px; max-height: 600px;
}
.slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.7s ease; pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}
.slide-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 2rem max(1.5rem, 5%);
    color: #fff;
}
.slide-title    { font-size: clamp(1.2rem, 3vw, 2rem); font-family: var(--font-heading, serif); text-shadow: 0 1px 4px rgba(0,0,0,0.4); margin-bottom: 0.35rem; }
.slide-subtitle { font-size: clamp(0.85rem, 1.5vw, 1rem); opacity: 0.9; margin-bottom: 0.75rem; }
.slide-cta {
    display: inline-block; padding: 0.5rem 1.25rem;
    background: var(--color-primary, #2563eb); color: #fff;
    border-radius: 4px; font-weight: 600; font-size: 0.9rem;
    text-decoration: none; transition: background 0.2s;
}
.slide-cta:hover { background: var(--color-secondary, #1e40af); text-decoration: none; color: #fff; }

/* Slider arrows */
.slider-prev, .slider-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.4); border: none; color: #fff;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
    z-index: 10; transition: background 0.2s;
}
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }
.slider-prev:hover, .slider-next:hover { background: rgba(0,0,0,0.65); }

/* Slider dots */
.slider-dots {
    position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 0.45rem; z-index: 10;
}
.slider-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,0.5); border: none; cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.slider-dot.is-active { background: #fff; transform: scale(1.25); }

/* ── PAGE / MAIN CONTENT ─────────────────────────────────────────── */
.page-section { padding: 3rem 0; }
.main-content  { min-width: 0; }

.page-header-section {
    background: #f9fafb; border-bottom: 1px solid #e5e7eb;
    padding: 2rem 0 1.5rem;
}
.page-title { margin-bottom: 0.5rem; }

/* Prose / rich content */
.prose { line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.3rem; }
.prose img { border-radius: 6px; margin: 1.5rem auto; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.prose th { background: #f3f4f6; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; }
.prose a { color: var(--color-primary, #2563eb); text-decoration: underline; }
.prose a:hover { text-decoration: none; }

/* Featured image */
.featured-image-wrap { margin-bottom: 2rem; border-radius: 8px; overflow: hidden; }
.featured-image-wrap img { width: 100%; max-height: 480px; object-fit: cover; }

/* ── BREADCRUMB ──────────────────────────────────────────────────── */
.breadcrumb-nav { padding: 0.75rem 0; margin-bottom: 1rem; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; font-size: 0.82rem; color: #6b7280; }
.breadcrumb-item + .breadcrumb-item::before { content: '›'; margin-right: 0.25rem; color: #9ca3af; }
.breadcrumb-item a { color: var(--color-primary, #2563eb); }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #6b7280; }

/* ── BLOG LIST ───────────────────────────────────────────────────── */
.blog-grid { display: grid; gap: 2rem; }
.post-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; transition: box-shadow 0.2s, transform 0.2s;
    display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.post-card-thumb { overflow: hidden; aspect-ratio: 16/9; background: #f3f4f6; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.post-card-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.78rem; color: #6b7280; flex-wrap: wrap; }
.post-card-category {
    display: inline-block; background: var(--color-primary, #2563eb); color: #fff;
    padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
    text-decoration: none;
}
.post-card-category:hover { background: var(--color-secondary, #1e40af); text-decoration: none; color: #fff; }
.post-card-title { font-size: 1.1rem; font-family: var(--font-heading, serif); margin-bottom: 0; }
.post-card-title a { color: var(--color-text, #1f2937); text-decoration: none; }
.post-card-title a:hover { color: var(--color-primary, #2563eb); }
.post-card-excerpt { color: #4b5563; font-size: 0.9rem; flex: 1; }
.post-card-link { margin-top: auto; }
.btn-read-more {
    display: inline-block; padding: 0.45rem 1.1rem;
    background: transparent; border: 1.5px solid var(--color-primary, #2563eb);
    color: var(--color-primary, #2563eb); border-radius: 4px;
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    transition: all 0.2s;
}
.btn-read-more:hover { background: var(--color-primary, #2563eb); color: #fff; text-decoration: none; }

/* ── PAGINATION ──────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.35rem; padding: 2rem 0; flex-wrap: wrap; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 0.5rem;
    border: 1px solid #e5e7eb; border-radius: 4px;
    color: var(--color-text, #1f2937); font-size: 0.9rem;
    text-decoration: none; transition: all 0.2s;
}
.page-link:hover { border-color: var(--color-primary, #2563eb); color: var(--color-primary, #2563eb); text-decoration: none; }
.page-link.is-active { background: var(--color-primary, #2563eb); border-color: var(--color-primary, #2563eb); color: #fff; font-weight: 700; }
.page-link.is-disabled { opacity: 0.4; pointer-events: none; }

/* ── SINGLE POST ─────────────────────────────────────────────────── */
.post-meta-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
    font-size: 0.82rem; color: #6b7280; margin-bottom: 1.5rem;
}
.post-meta-bar a { color: var(--color-primary, #2563eb); }
.post-author-name { font-weight: 600; }

/* Share buttons */
.share-buttons { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.share-buttons h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.share-list { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 4px;
    font-size: 0.82rem; font-weight: 600; text-decoration: none;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; text-decoration: none; }
.share-btn.facebook  { background: #1877f2; color: #fff; }
.share-btn.twitter   { background: #000; color: #fff; }
.share-btn.linkedin  { background: #0077b5; color: #fff; }
.share-btn.whatsapp  { background: #25d366; color: #fff; }

/* ── GALLERY ─────────────────────────────────────────────────────── */
.gallery-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.gallery-section h2 { margin-bottom: 1rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.gallery-item {
    position: relative; overflow: hidden; border-radius: 6px;
    aspect-ratio: 1; cursor: pointer;
    background: #f3f4f6;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,0.3); }
.gallery-zoom-icon { color: #fff; opacity: 0; font-size: 1.5rem; transition: opacity 0.3s; }
.gallery-item:hover .gallery-zoom-icon { opacity: 1; }

/* ── LIGHTBOX ────────────────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.93); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-content { max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-content img { max-width: 90vw; max-height: 80vh; border-radius: 4px; display: block; margin: 0 auto; }
.lightbox-caption { color: rgba(255,255,255,0.75); font-size: 0.85rem; margin-top: 0.75rem; }
.lightbox-close {
    position: absolute; top: 1rem; right: 1.25rem; background: none;
    border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; opacity: 0.75;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.12); border: none; color: #fff;
    width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
    font-size: 2rem; display: flex; align-items: center; justify-content: center;
    z-index: 10; transition: background 0.2s;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }

/* ── FAQ ACCORDION ───────────────────────────────────────────────── */
.faq-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.faq-section h2 { margin-bottom: 1.25rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.faq-question {
    width: 100%; background: #f9fafb; border: none; text-align: left;
    padding: 1rem 1.25rem; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    font-family: var(--font-heading, serif); font-weight: 600; font-size: 0.95rem;
    color: var(--color-text, #1f2937); transition: background 0.2s;
}
.faq-question:hover { background: #f3f4f6; }
.faq-question.is-open { background: var(--color-primary, #2563eb); color: #fff; }
.faq-icon { font-size: 1.2rem; flex-shrink: 0; transition: transform 0.3s; }
.faq-question.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 1rem 1.25rem; font-size: 0.92rem; line-height: 1.7; color: #374151; }
.faq-answer.is-open { display: block; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1.5rem; }
.widget { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1.25rem; }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.85rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-primary, #2563eb); }

/* Search widget */
.search-field-wrap { display: flex; gap: 0.4rem; }
.search-field {
    flex: 1; padding: 0.55rem 0.75rem; border: 1px solid #d1d5db;
    border-radius: 4px; font-size: 0.9rem;
    outline: none;
}
.search-field:focus { border-color: var(--color-primary, #2563eb); }
.search-submit {
    background: var(--color-primary, #2563eb); border: none; color: #fff;
    border-radius: 4px; padding: 0.5rem 0.75rem; cursor: pointer; display: flex;
}

/* Categories widget */
.category-list { display: flex; flex-direction: column; }
.category-item a {
    display: flex; justify-content: space-between; padding: 0.4rem 0;
    border-bottom: 1px solid #e5e7eb; color: var(--color-text, #1f2937);
    font-size: 0.88rem; text-decoration: none;
    transition: color 0.15s;
}
.category-item:last-child a { border-bottom: none; }
.category-item a:hover, .category-item.active a { color: var(--color-primary, #2563eb); }
.cat-count { color: #9ca3af; font-size: 0.8rem; }

/* Recent posts widget */
.recent-post-list { display: flex; flex-direction: column; gap: 0.9rem; }
.recent-post-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.recent-post-thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.recent-post-info { display: flex; flex-direction: column; gap: 0.2rem; }
.recent-post-title { font-size: 0.85rem; font-weight: 600; color: var(--color-text, #1f2937); line-height: 1.35; }
.recent-post-title:hover { color: var(--color-primary, #2563eb); }
.recent-post-date { font-size: 0.75rem; color: #9ca3af; }

/* ── CONTACT FORM ────────────────────────────────────────────────── */
.contact-section { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.form-control {
    width: 100%; padding: 0.65rem 0.9rem; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 0.95rem; font-family: inherit;
    background: #fff; color: var(--color-text, #1f2937);
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus { border-color: var(--color-primary, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
textarea.form-control { resize: vertical; min-height: 140px; }
.btn-submit {
    display: inline-block; padding: 0.7rem 2rem;
    background: var(--color-primary, #2563eb); color: #fff;
    border: none; border-radius: 6px; cursor: pointer;
    font-size: 1rem; font-weight: 600; font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover { background: var(--color-secondary, #1e40af); }
.btn-submit:active { transform: scale(0.98); }

/* Alerts */
.alert { padding: 0.9rem 1.1rem; border-radius: 6px; margin-bottom: 1.25rem; font-size: 0.9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── SEARCH RESULTS ──────────────────────────────────────────────── */
.search-results-list { display: flex; flex-direction: column; gap: 1.5rem; }
.search-result-item { padding: 1.25rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.search-result-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary, #2563eb); margin-bottom: 0.4rem; }
.search-result-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.search-result-title a { color: var(--color-text, #1f2937); }
.search-result-title a:hover { color: var(--color-primary, #2563eb); text-decoration: underline; }
.search-result-excerpt { font-size: 0.88rem; color: #4b5563; }
.search-result-date { font-size: 0.75rem; color: #9ca3af; margin-top: 0.5rem; }
.search-highlight { background: #fef9c3; padding: 0 2px; border-radius: 2px; }
.no-results { text-align: center; padding: 3rem 1rem; color: #6b7280; }
.no-results h2 { margin-bottom: 0.75rem; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
    background-color: var(--color-footer, #111827);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-grid-1 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.footer-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.footer-columns { margin-bottom: 2rem; }

.footer-col-title { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-col-content { font-size: 0.88rem; line-height: 1.65; }
.footer-col-content a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-col-content a:hover { color: #fff; text-decoration: underline; }
.footer-col-content p { margin-bottom: 0.5rem; color: rgba(255,255,255,0.7); }
.footer-col-content ul { list-style: none; padding: 0; }
.footer-col-content ul li { margin-bottom: 0.35rem; }

/* Footer menu */
.footer-menu { margin-bottom: 1.5rem; }
.footer-nav-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; justify-content: center; }
.footer-nav-item a { color: rgba(255,255,255,0.65); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.footer-nav-item a:hover { color: #fff; text-decoration: none; }

/* Footer social */
.footer-social { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
    text-decoration: none; transition: background 0.2s, color 0.2s; font-size: 0.9rem;
}
.social-icon:hover { background: var(--color-primary, #2563eb); color: #fff; text-decoration: none; }

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}
.footer-bottom p { margin-bottom: 0; }

/* ── 404 ─────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-code { font-size: 6rem; font-weight: 900; color: var(--color-primary, #2563eb); line-height: 1; }
.error-title { font-size: 1.75rem; margin-bottom: 1rem; }
.error-message { color: #6b7280; margin-bottom: 2rem; }
.btn-home {
    display: inline-block; padding: 0.7rem 2rem;
    background: var(--color-primary, #2563eb); color: #fff;
    border-radius: 6px; font-weight: 600; text-decoration: none;
    transition: background 0.2s;
}
.btn-home:hover { background: var(--color-secondary, #1e40af); text-decoration: none; color: #fff; }

/* ── MAINTENANCE ─────────────────────────────────────────────────── */
.maintenance-page {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: var(--color-bg, #fff); text-align: center; padding: 2rem;
}
.maintenance-logo { margin-bottom: 2rem; }
.maintenance-logo img { max-height: 80px; margin: 0 auto; }
.maintenance-logo .logo-text { font-size: 2rem; font-family: var(--font-heading, serif); font-weight: 700; color: var(--color-text, #1f2937); }
.maintenance-title { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.maintenance-message { font-size: 1.05rem; color: #6b7280; max-width: 480px; }

/* ── UTILITY ─────────────────────────────────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-muted  { color: #6b7280; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }

/* ── RESPONSIVE: TABLET (≤ 768px) ───────────────────────────────── */
@media (max-width: 768px) {
    .main-nav  { display: none; }
    .hamburger { display: flex; }
    .lang-switcher { display: none; }

    .content-with-sidebar-right,
    .content-with-sidebar-left { grid-template-columns: 1fr; }
    .sidebar { position: static; margin-top: 2rem; }

    .footer-grid-3,
    .footer-grid-4 { grid-template-columns: repeat(2, 1fr); }

    .hero-slider { aspect-ratio: 16/7; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    .header-logo-center .header-bottom-bar { flex-wrap: wrap; }
}

/* ── RESPONSIVE: MOBILE (≤ 480px) ───────────────────────────────── */
@media (max-width: 480px) {
    .footer-grid-2,
    .footer-grid-3,
    .footer-grid-4 { grid-template-columns: 1fr; }

    .hero-slider { aspect-ratio: 4/3; min-height: 220px; }
    .post-card-body { padding: 1rem; }
    .share-list { gap: 0.4rem; }
    .share-btn  { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
    .footer-nav-list { flex-direction: column; align-items: center; }
    .slider-prev, .slider-next { width: 36px; height: 36px; font-size: 1rem; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.5rem; }

    .blog-grid { gap: 1.25rem; }
    .header-inner { min-height: 56px; }
    .logo-img { max-height: 38px; }
}

/* ── PRINT ───────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .sidebar, .share-buttons,
    .hero-slider, .hamburger, .breadcrumb-nav { display: none !important; }
    body { color: #000; }
    a { color: #000; }
}
