:root {
  /* Paletă globală Altstart */
  --yellow: #FFC000;
  --dark-blue: #264653;
  --light-blue: #9DBDBF;
  --light-gray: #F5F5F5;
  --medium-gray: #DADADA;

  /* Variabile pentru carduri */
  --altst-dark: var(--dark-blue);
  --altst-yellow: var(--yellow);
  --altst-text: #0f172a;
  --altst-muted: #475569;
  --altst-ring: rgba(38,70,83,0.12);
  --altst-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: white; color: var(--dark-blue); line-height: 1.6; }

/* General Header & Nav Styles */
header { background-color: var(--yellow); padding: 1rem 2rem; position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { height: 40px; }
.logo-container span { font-size: 1.8rem; font-weight: bold; color: #264653; vertical-align: middle; margin-left: 10px; }
.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--dark-blue); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: white; }
.lang-switcher-mobile { display: flex; gap: 10px; margin-left: 20px; align-items: center; }
.lang-flag { background: none; border: none; padding: 0; cursor: pointer; }
.lang-flag img { width: 24px; height: 24px; border-radius: 50%; transition: transform 0.2s; }
.lang-flag:hover img { transform: scale(1.15); }
.lang-flag.active img { outline: 2px solid #264653; }
.btn { display: inline-block; background-color: var(--dark-blue); color: white; padding: 0.8rem 2rem; font-size: 1.2rem; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.btn:hover { background-color: var(--light-blue); }

/* Hamburger Icon (visible on mobile only) */
.hamburger { display: none; cursor: pointer; }
.hamburger div { width: 25px; height: 3px; background-color: var(--dark-blue); margin: 5px; transition: all 0.3s ease; }

/* =================================
   BLOG-SPECIFIC STYLES
==================================== */
#blog-content-section { padding-top: 140px; padding-bottom: 4rem; }
#category-filters { display: flex; justify-content: center; gap: .8rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { background-color: #fff; color: var(--dark-blue); border: 1px solid #ddd; padding: .6rem 1.2rem; border-radius: 20px; cursor: pointer; font-weight: 600; transition: all .3s ease; }
.filter-btn:hover { background-color: #f0f0f0; border-color: #ccc; }
.filter-btn.active { background-color: var(--yellow); color: var(--dark-blue); border-color: var(--yellow); }

/* Article Cards Grid */
#posts-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
@media (min-width: 768px) { #posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { #posts-grid { grid-template-columns: repeat(4, 1fr); } }

.post-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, .05); overflow: hidden; cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, .1); }
.post-card-image-container { width: 100%; height: 200px; background-color: #f0f0f0; }
.post-card-image-container img { width: 100%; height: 100%; object-fit: cover; }
.post-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-title { color: var(--dark-blue); font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--yellow); display: inline-block; }
.post-card-meta { font-size: .9rem; color: #666; margin: 1rem 0; }
.post-card-excerpt { margin-top: .5rem; }

/* =================================
   SINGLE POST VIEW STYLES
==================================== */
.small-btn { 
    display: inline-block; 
    background-color: var(--dark-blue); 
    color: white; 
    padding: 0.5rem 1.2rem; 
    font-size: 1rem; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    margin-bottom: 2rem; 
}
.small-btn:hover { background-color: var(--light-blue); }

/* Container nou pentru titlu și imagine */
.single-post-header {
    display: flex;
    align-items: center; /* Aliniază vertical titlul și imaginea */
    gap: 2rem; /* Spațiu între titlu și imagine */
    margin-bottom: 3rem;
    border-bottom: 1px solid #eee; /* Linie fină de separare */
    padding-bottom: 2rem;
}

.post-header-text {
    flex: 1; /* Permite textului să ocupe spațiul disponibil */
}

.single-post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 0;
}

.single-post-meta {
    color: #666;
    font-size: 1rem;
    margin-top: 0.75rem;
}

/* Imaginea din antet */
.single-post-image {
    width: 250px; /* Dimensiune fixă pentru imagine */
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0; /* Previne micșorarea imaginii */
}

/* Conținutul principal (cardurile de text) */
.single-post-text {
    line-height: 1.8;
    color: #333;
}

#back-to-blog-bottom {
    margin-top: 3rem;
}

/* ===== STILURI PENTRU CARDURILE DIN INTERIORUL ARTICOLULUI ===== */
.altst-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.altst-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.altst-card p {
    margin-bottom: 1rem;
}

.altst-cta {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.altst-btn {
    display: inline-block;
    background-color: #fff;
    color: var(--dark-blue);
    border: 1px solid #ddd;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.altst-btn.primary {
    background-color: var(--yellow);
    border-color: var(--yellow);
}

.altst-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Responsive adjustments for single post view */
@media (max-width: 768px) {
    .single-post-header {
        flex-direction: column; /* Stivuiește imaginea și titlul pe mobil */
        align-items: flex-start;
    }
    .single-post-title {
        font-size: 2rem;
    }
    .single-post-image {
        width: 100%;
        height: 200px;
    }
}

/* =================================
   FOOTER STYLES
==================================== */
.site-footer { background-color: var(--dark-blue); color: white; padding: 2rem 1rem 1rem; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: bold; color: var(--yellow); }
.footer-logo img { height: 36px; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: white; text-decoration: none; font-weight: 500; transition: color 0.3s; }
.footer-links a:hover { color: var(--yellow); }
.footer-social a { color: white; display: inline-flex; text-decoration: none; font-size: 1.5rem; margin: 0 0.5rem; transition: color 0.3s; }
.footer-social a:hover { color: var(--yellow); }
.footer-bottom { text-align: center; margin-top: 1rem; font-size: 0.9rem; opacity: 0.8; }

/* =================================
   RESPONSIVE & MOBILE MENU STYLES
==================================== */

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 68px; /* Adjust based on your header height */
        height: calc(100vh - 68px);
        background-color: var(--yellow);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        z-index: 10;
    }

    .nav-links li {
        opacity: 0; /* Links are invisible by default */
        margin: 1.5rem 0;
    }

    .nav-active {
        transform: translateX(0%);
    }
    
    .nav-active li {
        opacity: 1;
        transition: opacity 0.4s ease-in 0.2s; /* Add a smooth fade-in effect */
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Responsive styles for single post view */
    .single-post-title {
        font-size: 2rem;
    }
    .single-post-image {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 2rem;
    }
}

/* container for the block of cards */
.altst-article{
  margin-top:24px;
  display:grid;
  gap:18px;
}

/* card */
.altst-card{
  background:#fff;
  border-radius:16px;
  border:1px solid var(--altst-ring);
  box-shadow:var(--altst-shadow);
  padding:20px clamp(18px,3vw,26px);
}

/* headings inside cards */
.altst-card h2{
  margin:0 0 8px 0;
  font-size:clamp(18px,2.6vw,22px);
  line-height:1.25;
  color:var(--altst-dark);
  font-weight:700;
}

/* text */
.altst-card p{
  margin:10px 0;
  color:var(--altst-text);
  line-height:1.6;
  font-size:16px;
}
.altst-muted{ color:var(--altst-muted); }

/* CTA buttons */
.altst-cta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.altst-btn{
  --bg:#fff; --fg:var(--altst-dark); --br:1px solid var(--altst-ring);
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  background:var(--bg);
  color:var(--fg);
  border:var(--br);
  box-shadow:0 2px 10px rgba(0,0,0,0.04);
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease;
  font-weight:600; font-size:14px;
}
.altst-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(0,0,0,0.08);
}
.altst-btn.primary{
  --bg:var(--altst-yellow);
  --fg:#1b1b1b;
  --br:1px solid rgba(0,0,0,0.08);
}

/* mini list */
.altst-list{
  display:grid;
  gap:8px;
  margin:8px 0 0;
  padding:0;
  list-style:none;
}
.altst-list li{
  display:flex; align-items:flex-start; gap:10px;
  background:#fff;
  border:1px dashed var(--altst-ring);
  border-radius:12px;
  padding:10px 12px;
}
.altst-bullet{
  flex:0 0 8px; height:8px; margin-top:7px; border-radius:50%;
  background:var(--altst-yellow);
  box-shadow:0 0 0 3px rgba(255,192,0,.18);
}

/* small screens */
@media (max-width:640px){
  .altst-btn{ width:100%; justify-content:center; }
}
.post-intro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.post-intro .single-post-image {
  float: none; /* scoatem float-ul */
  margin: 0; 
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
}

.post-cards {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}
