/* ==========================================================================
   IMOO.ro / Blog – stiluri optimizate
   ========================================================================== */

:root {
  --c-dark: #1a252f;
  --c-accent: #3498db;
  --c-accent-dark: #1f78b4;
  --c-bg: #f4f6f8;
  --c-surface: #ffffff;
  --c-text: #333333;
  --c-heading: #111827;
  --c-heading-soft: #2c3e50;
  --c-muted: #4b5563;
  --c-border: #e2e8f0;
  --c-footer-bg: #e8edf2;
  --c-footer-text: #2c3947;
  --c-footer-muted: #5a6877;

  /* Lățimea comună a articolului și a secțiunii „Recomandate”.
     Schimbi aici (ex. 900px) și se modifică amândouă deodată. */
  --article-width: 1200px;

  --radius-lg: 16px;
  --radius-md: 8px;
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.06);

  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* ---------- Accesibilitate ---------- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
body > header {
  background-color: var(--c-dark);
  color: #fff;
  padding: 20px 0;
}

body > header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
}

nav a:hover {
  text-decoration: underline;
}

/* ---------- Conținut principal ---------- */
main {
  padding-top: 30px;
  padding-bottom: 40px;
}

h1 {
  margin-bottom: 12px;
  color: var(--c-heading-soft);
  line-height: 1.3;
}

.blog-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-muted);
  margin-bottom: 25px;
  max-width: 950px;
}

hr {
  border: 0;
  height: 1px;
  background: #ddd;
  margin-bottom: 30px;
}

/* ---------- Secțiunea Blog ---------- */
.blog-section {
  padding: 20px 0;
}

.blog-grid {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

/* Articol mare stânga */
.blog-main {
  flex: 0 0 58%;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.blog-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.blog-content {
  padding: 24px 24px 20px;
}

.blog-content h2 {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--c-heading);
}

.blog-content h2 a,
.blog-item-content h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-content h2 a:hover,
.blog-item-content h3 a:hover {
  color: var(--c-accent-dark);
}

.blog-content p {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 12px;
}

.read-more-link {
  color: var(--c-accent-dark);
  text-decoration: none;
  font-weight: bold;
}

.read-more-link:hover {
  text-decoration: underline;
}

/* Coloană articole mici dreapta */
.blog-side {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-item {
  flex: 1;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
}

.blog-thumb {
  flex: 0 0 40%;
}

.blog-thumb a {
  display: block;
  height: 100%;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.blog-item-content {
  flex: 1;
  padding: 16px 18px;
}

.blog-item-content h3 {
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--c-heading);
}

.blog-item-content p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Articole recomandate (pagina de blog) ---------- */
.carousel-section {
  padding: 40px 0;
}

.carousel-section h2 {
  font-size: 24px;
  color: var(--c-heading-soft);
  margin-bottom: 8px;
}

.carousel-subtitle {
  font-size: 15px;
  color: #6b7a7b;
  margin-bottom: 25px;
}

/* Sugestia de glisare apare doar pe mobil */
.swipe-hint {
  display: none;
  color: var(--c-accent-dark);
  font-weight: 600;
}

.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.carousel-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.carousel-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.carousel-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carousel-card-content h3 a {
  color: var(--c-heading);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.carousel-card-content h3 a:hover {
  color: var(--c-accent-dark);
}

.carousel-card-content p {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ---------- Pagină articol (Single Post) ---------- */
.single-post {
  background: var(--c-surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: var(--article-width);
  margin: 20px auto 40px;
}

.post-header {
  margin-bottom: 25px;
}

.post-header h1 {
  font-size: 32px;
  line-height: 1.3;
  color: var(--c-heading);
  margin-bottom: 12px;
}

.post-meta {
  font-size: 14px;
  color: #6b7a7b;
}

.post-featured-image {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.post-content {
  font-size: 18px;
  line-height: 1.8;
  color: #374151;
}

.post-content p {
  margin-bottom: 22px;
}

.post-content .lead {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.6;
}

.post-content h2 {
  font-size: 24px;
  color: var(--c-heading);
  margin-top: 35px;
  margin-bottom: 15px;
}

.post-content ul {
  margin-bottom: 22px;
  padding-left: 25px;
}

.post-content ul li {
  margin-bottom: 8px;
}

.post-content blockquote {
  background: #f8fafc;
  border-left: 5px solid var(--c-accent);
  padding: 20px 25px;
  margin: 30px 0;
  font-style: italic;
  color: #1e293b;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.back-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 24px;
  background-color: var(--c-dark);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.back-btn:hover {
  background-color: var(--c-accent-dark);
}

/* ---------- Recomandate sub articol ---------- */
#seetiune-articole-recomandate {
  width: 100%;
}

.recommended-carousel-container {
  width: 100%;
  max-width: var(--article-width); /* identic cu .single-post */
  margin: 40px auto 0;
  padding: 0;
}

.recommended-carousel-container h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--c-heading-soft);
  text-align: left;
}

.recommended-carousel-container .recommended-carousel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.recommended-card {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recommended-card a {
  color: inherit;
  text-decoration: none;
}

.recommended-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.recommended-card-body {
  padding: 8px;
}

.recommended-card h3 {
  font-size: 0.875rem;
  line-height: 1.3;
  margin: 0 0 4px;
}

.recommended-card p {
  font-size: 0.8125rem; /* era 0.7rem (~11px), prea mic */
  line-height: 1.35;
  color: #64748b;
}

/* ---------- Footer (o singură definiție) ---------- */
.site-footer {
  background-color: var(--c-footer-bg);
  color: var(--c-footer-text);
  padding: 60px 4% 40px;
  margin-top: 40px;
  font-family: var(--font);
}

.footer-top {
  display: flex;
  gap: 20px;
}

.footer-column {
  flex: 1;
}

.brand-column {
  flex: 0 0 35%;
}

.brand-column h2 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
}

.brand-column p {
  color: var(--c-footer-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-column h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--c-footer-text);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: var(--c-footer-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-column ul li a:hover {
  color: var(--c-accent-dark); /* era #fff pe fundal deschis = invizibil */
}

.footer-divider {
  border: 0;
  height: 1px;
  background-color: rgba(44, 57, 71, 0.18);
  margin: 40px 0 30px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal a {
  color: var(--c-footer-text); /* era #fff pe fundal deschis */
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  margin-right: 25px;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-social a {
  color: var(--c-footer-text); /* era #fff pe fundal deschis */
  text-decoration: none;
  font-size: 18px;
  margin-left: 20px;
  opacity: 0.8;
  display: inline-block;
}

.footer-social a:hover {
  opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .blog-grid {
    flex-direction: column;
  }

  .blog-main,
  .blog-side {
    flex: 1 1 auto;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    margin: 0 10px;
  }

  .blog-intro {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .blog-image img {
    height: 220px;
  }

  /* Slider orizontal cu snap */
  .carousel-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .carousel-grid::-webkit-scrollbar {
    display: none;
  }

  .carousel-card {
    flex: 0 0 75%;
    min-width: 260px;
    scroll-snap-align: start;
  }

  .swipe-hint {
    display: inline;
    margin-left: 5px;
  }

  /* Pagină articol */
  .single-post {
    padding: 20px;
  }

  .post-header h1 {
    font-size: 24px;
  }

  .post-featured-image img {
    max-height: 260px;
  }

  .post-content {
    font-size: 16px;
  }

  .post-content .lead {
    font-size: 18px;
  }

  .recommended-carousel-container {
    margin-top: 30px;
  }

  .recommended-carousel-container .recommended-carousel-grid {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .recommended-carousel-container .recommended-carousel-grid::-webkit-scrollbar {
    display: none;
  }

  .recommended-card {
    flex: 0 0 75%;
    scroll-snap-align: start;
  }

  .recommended-card img {
    height: 140px;
  }

  /* Footer */
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-top {
    gap: 0;
  }

  .brand-column {
    flex-basis: auto;
  }

  .footer-column {
    width: 100%;
    margin-bottom: 35px;
  }

  .brand-column p {
    max-width: 100%;
  }

  .footer-legal a {
    display: block;
    margin: 0 0 15px;
  }

  .footer-social a {
    margin: 0 20px 0 0;
  }
}

@media (max-width: 600px) {
  .blog-item {
    flex-direction: column;
  }

  .blog-thumb {
    flex: none;
  }

  .blog-thumb img {
    height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Stiluri Secțiune Întrebări și Răspunsuri (FAQ Utile)
   ========================================================================== */

.faq-utile {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 5px;
    font-family: inherit;
}

.faq-utile h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 2rem;
    color: #1a1a1a;
}

.faq-utile details {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.faq-utile details:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.faq-utile summary {
    padding: 20px 24px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

/* Ascunderea markerului nativ pentru browsere moderne */
.faq-utile summary::-webkit-details-marker {
    display: none;
}

/* Indicator + / – */
.faq-utile summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
    margin-left: 16px;
    transition: transform 0.3s ease;
}

/* Când este deschis, devine minus */
.faq-utile details[open] summary::after {
    content: "–";
}

.faq-utile .faq-answer {
    padding: 0 24px 24px 24px;
    color: #444;
    line-height: 1.7;
    font-size: 1.1rem;
}

.faq-utile summary:focus {
    outline: 3px solid #4a90e2;
    outline-offset: -3px;
    border-radius: 12px;
}

/* Butonul Înapoi la Blog */
.back-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 24px;
    background-color: #1a252f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.back-btn:hover {
    background-color: #3498db;
}

/* Adaptare Mobil */
@media (max-width: 768px) {
    .single-post {
        padding: 20px;
    }

    .post-header h1 {
        font-size: 24px;
    }

    .post-featured-image img {
        max-height: 260px;
    }

    .post-content {
        font-size: 16px;
    }

    .post-content .lead {
        font-size: 18px;
    }
    
    .faq-utile summary {
        font-size: 1.1rem;
        padding: 16px 18px;
    }
}
