/*
Theme Name: ProFlorist Blog
Theme URI: https://proflorist.de/
Author: ProFlorist
Description: Tema pentru blog.proflorist.de, inspirată din UI-ul proflorist.de.
Version: 1.0.0
Text Domain: proflorist-blog
*/

/* ========== RESET ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

/* ========== TOKENS ========== */
:root{
  --pf-green-dark: #003027;
  --pf-green-main: #005845;
  --pf-text-light: #f9fafb;

  --pf-bg: #f5f5f5;
  --pf-card: #ffffff;
  --pf-text: #111827;
  --pf-muted: #6b7280;
  --pf-border: rgba(148, 163, 184, 0.35);
  --pf-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

/* Optional: self-hosted Inter. Comentază dacă nu există fișierele. */
@font-face{
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  font-size-adjust: 0.52;
  src: url('assets/fonts/Inter_18pt-Regular.ttf') format('truetype');
}
@font-face{
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  font-size-adjust: 0.52;
  src: url('assets/fonts/Inter_18pt-Italic.ttf') format('truetype');
}

body{
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--pf-bg);
  color: var(--pf-text);
  line-height: 1.55;
}

a{ color: var(--pf-green-main); text-decoration: none; }
a:hover{ text-decoration: underline; }

.pf-container{
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ========== HEADER ========== */
.pf-header{
  background: var(--pf-green-dark);
  color: var(--pf-text-light);
  position: relative;
  z-index: 10;
}

.pf-topbar{
  min-height: 88px;
  display: flex;
  align-items: center;
}
@media (max-width: 575.98px){
  .pf-topbar{ min-height: 76px; }
}

.pf-header-row{
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

/* === FIX iOS/MOBILE: prevent wrap jitter + align CTA+burger perfectly === */
@media (max-width: 575.98px){
  .pf-header-row{
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .pf-logo{
    flex: 1 1 auto;
    min-width: 0;
  }

  .pf-logo img{
    width: 180px;
    height: 30px;
  }

  .pf-header-actions{
    flex: 0 0 auto;
    margin-left: auto;
    gap: 0.4rem;
    align-items: center;
  }

  .pf-btn,
  .pf-burger{
    height: 42px;
    line-height: 42px;
  }

  .pf-btn{
    padding: 0 0.85rem;
    font-size: 0.95rem;
  }

  .pf-burger{
    width: 42px;
  }
}
/* === END FIX === */

.pf-logo{ display: inline-flex; align-items: center; }
.pf-logo img{
  width: 220px;
  height: 44px;
  display: block;
}

.pf-header-actions{
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pf-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--pf-text-light);
  background: transparent;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.pf-btn:hover{
  border-color: #f97316;
  background: #f97316;
  color: #111827;
  text-decoration: none;
}

.pf-hero{
  padding: 0.25rem 0 0.75rem;
}
.pf-hero p{
  margin: 0;
  color: rgba(255,255,255,0.85);
}

/* ========== DESKTOP NAV ========== */
.pf-mainnav{
  background: var(--pf-green-main);
  display: none;
}
@media (min-width: 992px){
  .pf-mainnav{ display: block; }
}

.pf-menu{
  list-style: none;
  margin: 0;
  padding: 0.6rem 0;

  display: flex;
  align-items: center;
  gap: 1rem;

  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pf-menu::-webkit-scrollbar{ display: none; }

.pf-menu li{ flex: 0 0 auto; }
.pf-menu a{
  color: #fff;
  font-weight: 500;
  display: inline-block;
}
.pf-menu a:hover{ text-decoration: underline; }

/* ========== HAMBURGER (MOBILE) ========== */
.pf-burger{
  border: none;
  background: transparent;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (min-width: 992px){
  .pf-burger{ display: none; }
}

.pf-burger-lines{
  width: 20px;
  height: 16px;
  position: relative;
  display: inline-block;
}
.pf-burger-lines span{
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease, bottom .2s ease;
}
.pf-burger-lines span:nth-child(1){ top: 0; }
.pf-burger-lines span:nth-child(2){ top: 7px; }
.pf-burger-lines span:nth-child(3){ bottom: 0; }

body.pf-mobile-open .pf-burger-lines span:nth-child(1){ top: 7px; transform: rotate(45deg); }
body.pf-mobile-open .pf-burger-lines span:nth-child(2){ opacity: 0; }
body.pf-mobile-open .pf-burger-lines span:nth-child(3){ bottom: 7px; transform: rotate(-45deg); }

/* ========== MOBILE NAV PANEL ========== */
.pf-mobile-nav{
  background: #022c22;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 0.35rem 0 0.85rem;
}
@media (min-width: 992px){
  .pf-mobile-nav{ display: none !important; }
}

.pf-mobile-menu{
  list-style: none;
  margin: 0;
  padding: 0.4rem 0 0;

  display: grid;
  gap: 0.25rem;
}
.pf-mobile-menu li{ margin: 0; }

.pf-mobile-menu a{
  display: block;
  color: #fff;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
}
.pf-mobile-menu a:hover{
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}

/* ========== CONTENT ========== */
.pf-content{
  padding: 1.25rem 0 2.5rem;
}

/* container that holds content + sidebar */
.pf-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* IMPORTANT: don't force sidebar if there's not enough width */
@media (min-width: 992px){
  .pf-grid{
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.85fr);
    gap: 1.25rem;
    align-items: start;
  }
}

.pf-card{
  background: var(--pf-card);
  border: 1px solid var(--pf-border);
  border-radius: 16px;
  box-shadow: var(--pf-shadow);
  padding: 1rem;
}

.pf-meta{
  color: var(--pf-muted);
  font-size: 0.9rem;
}

.pf-footer{
  padding: 1.5rem 0;
  color: #6b7280;
  font-size: 0.92rem;
}

/* WP core */
.alignwide{ width: 100%; }
.alignfull{ width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-image img{ border-radius: 12px; }

/* Featured image (single) */
.pf-featured{ margin: 1rem 0; }
.pf-featured-img{
  display:block;
  width:100%;
  height:auto;
  border-radius:12px;
}

/* ===== Magazine grid (previews) ===== */
.pf-mag-grid{
  display: grid;
  grid-template-columns: 1fr; /* mobile always 1 column */
  gap: 1rem;
}
@media (min-width: 640px){
  .pf-mag-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px){
  .pf-mag-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Post card */
.pf-post-card{
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.pf-card-media{
  display: block;
  background: rgba(255,255,255,0.06);
}

.pf-card-img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.pf-card-img--placeholder{
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  background: rgba(148,163,184,0.18);
}

.pf-card-body{
  padding: 0.9rem 1rem 1rem;
}

.pf-card-topline{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}

.pf-card-date{
  color: var(--pf-muted);
  font-size: .9rem;
}

.pf-card-cat{
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(0,88,69,0.12);
  color: var(--pf-green-main);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
}

.pf-card-title{
  margin: 0.25rem 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.25;
}
.pf-card-title a{ color: var(--pf-text); text-decoration: none; }
.pf-card-title a:hover{ text-decoration: underline; }

.pf-card-excerpt{
  margin: 0 0 0.75rem;
  color: #1f2937;
}

.pf-readmore{
  font-weight: 700;
  color: var(--pf-green-main);
  text-decoration: none;
}
.pf-readmore:hover{ text-decoration: underline; }

/* ===== HERO behaviour when there's only 1 post shown =====
   Fix desktop weird image stretching: cap media height and use predictable crop. */
@media (min-width: 640px){
  .pf-mag-grid > .pf-post-card:only-child{
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr; /* balanced */
    align-items: start;
  }

  .pf-mag-grid > .pf-post-card:only-child .pf-card-media{
    height: auto;
    max-height: 360px;
    overflow: hidden;
  }

  .pf-mag-grid > .pf-post-card:only-child .pf-card-img,
  .pf-mag-grid > .pf-post-card:only-child .pf-card-img--placeholder{
    width: 100%;
    height: 360px;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .pf-mag-grid > .pf-post-card:only-child .pf-card-body{
    padding: 1.05rem 1.1rem 1.2rem;
  }

  .pf-mag-grid > .pf-post-card:only-child .pf-card-title{
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .pf-mag-grid > .pf-post-card:only-child .pf-card-excerpt{
    font-size: 1.02rem;
  }
}

@media (min-width: 1200px){
  .pf-mag-grid > .pf-post-card:only-child .pf-card-media{ max-height: 420px; }
  .pf-mag-grid > .pf-post-card:only-child .pf-card-img,
  .pf-mag-grid > .pf-post-card:only-child .pf-card-img--placeholder{ height: 420px; }
}

/* ===== Sidebar widgets basic polish ===== */
.pf-sidebar .widget{
  margin-bottom: 1rem;
}
.pf-sidebar .widget-title{
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.pf-sidebar input[type="search"],
.pf-sidebar input[type="text"],
.pf-sidebar input[type="email"]{
  width: 100%;
  max-width: 100%;
}
.pf-sidebar input,
.pf-sidebar button{
  font: inherit;
}
