/* === CookieGDPR Clean Header v3 (stable) === */

.cg-header{
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
  z-index: 9999;
}

.cg-header .cg-wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cg-brand{ display:flex; align-items:center; text-decoration:none; min-width: 120px; }
.cg-brand img{ height:38px; width:auto; display:block; }

.cg-right{ display:flex; align-items:center; gap:10px; }

.cg-ctas{ display:flex; align-items:center; gap:10px; }
.cg-cta{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 16px;
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  font-size: 14px;
  border: 2px solid rgba(249,115,22,.25);
  color:#a34100;
  background:#fff7ed;
}
.cg-cta.cg-pro{
  background:#f97316; border-color:#f97316; color:#fff;
  box-shadow: 0 10px 24px rgba(249,115,22,.25);
}

.cg-burger{
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  display:inline-flex; align-items:center; justify-content:center;
}
.cg-burger svg{ width:22px; height:22px; }
.cg-burger path{ stroke:#0f172a; stroke-width:2; stroke-linecap:round; }

/* Desktop nav inside header */
.cg-topnav{ display:none; }

/* Drawer overlay */
.cg-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}

.cg-drawer{
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(86vw, 360px);
  background: #fff;
  border-left: 1px solid rgba(15,23,42,.12);
  transform: translateX(102%);
  transition: transform .22s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.cg-drawer-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  font-weight: 900;
  font-size: 18px;
}

.cg-close{
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 20px;
  line-height: 1;
}

.cg-drawer-nav{
  padding: 10px 10px 16px;
  overflow: auto;
}
.cg-drawer-nav a{
  display:block;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration:none;
  color:#0f172a;
  font-weight: 800;
}
.cg-drawer-nav a:active{ transform: translateY(1px); }
.cg-drawer-nav a:hover{ background: #f8fafc; }

.cg-drawer-cta{
  padding: 12px 12px 16px;
  border-top: 1px solid rgba(15,23,42,.08);
  display: grid;
  gap: 10px;
}

/* Open state */
.cg-header.cg-open + .cg-overlay{ opacity: 1; pointer-events: auto; }
.cg-header.cg-open ~ .cg-drawer{ transform: translateX(0); }

body.cg-lock{ overflow: hidden; }

/* mobile tweaks */
 (max-width: 520px){
  /* MOBILE: show logo + burger only (CTA moves into drawer) */
  .cg-ctas{ display:none !important; }
  .cg-wrap{ padding: 10px 12px; }
  .cg-right{ gap: 8px; }
  .cg-brand img{ height: 28px; }
  .cg-burger{ width: 44px; height: 44px; border-radius: 14px; }
}
.cg-brand img{ height: 26px; }
}

/* === HARD MOBILE RESET (final) === */
@media (max-width: 640px){

  /* NU MAI EXISTA CTA IN HEADER */
  header .cg-ctas,
  header .nav-cta,
  header a[href*="cookiegdpr.tiro-alp.com"],
  header a[href*="cookiegdpr-pro"]{
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  /* HEADER LAYOUT */
  .cg-wrap{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding: 10px 14px !important;
  }

  /* LOGO MAI MARE */
  .cg-brand img{
    height: 34px !important;
  }

  /* BURGER MEREU VIZIBIL */
  .cg-burger{
    display: inline-flex !important;
    margin-left: auto !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* === FINAL MOBILE HEADER (logo + burger only) === */
@media (max-width: 760px){
  .cg-topnav{ display:none !important; } /* linkurile orizontale nu au ce cauta pe mobil */
  .cg-right{ margin-left:auto !important; }
  .cg-burger{ display:inline-flex !important; }
  .cg-brand img{ height: 32px !important; }
}

/* === Desktop-only tune (does NOT affect mobile) === */
@media (min-width: 900px){

  /* bigger brand on desktop */
  .cg-brand img{
    height: 44px !important;
  }

  /* more breathing room */
  .cg-header .cg-inner{
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  /* hide burger/menu button on desktop */
  .cg-burger,
  .cg-menu-btn,
  button.cg-burger,
  button.cg-menu-btn{
    display: none !important;
  }

  /* keep CTAs nicely aligned on the right */
  .cg-cta-wrap{
    margin-left: auto !important;
  }

  /* make CTA a bit more premium on desktop */
  .cg-cta{
    padding: 11px 16px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
  }
}

/* === Desktop top links (NO burger), mobile stays the same === */
.cg-desktop-nav{
  display:flex !important;
  align-items:center;
  gap:16px;
  margin-left:auto;
  margin-right:auto;
  white-space:nowrap;
}

@media (min-width: 900px){

  /* show desktop nav links in one row */
  .cg-desktop-nav{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-left:0;
  flex:1;
  max-width:70%;
  white-space:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
  .cg-desktop-nav::-webkit-scrollbar{ display:none; }

  .cg-desktop-nav a{
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    padding: 8px 8px;
    border-radius: 12px;
    opacity: .92;
  }
  .cg-desktop-nav a:hover{
    background: #f3f4f6;
    opacity: 1;
  }

  /* keep burger hidden on desktop */
  .cg-burger,
  .cg-menu-btn,
  button.cg-burger,
  button.cg-menu-btn{
    display:none !important;
  }
}

/* === Desktop nav centering (grid) - SAFE for mobile === */
@media (min-width: 900px){
  /* 3 columns: brand | centered nav | ctas */
  .cg-header .cg-header-inner{
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 18px;
  }

  .cg-header .cg-brand{ justify-self: start; }

  .cg-header .cg-desktop-nav{
    justify-self: center;
    display: flex !important;
    justify-content: center !important;
    gap: 18px;
    white-space: nowrap;
  }

  /* right side: support multiple possible class names */
  .cg-header .cg-actions,
  .cg-header .cg-cta-wrap,
  .cg-header .nav-cta,
  .cg-header .cg-ctas{
    justify-self: end;
  }
}

/* === Desktop nav TRUE center (balances logo even if right side is empty) === */
@media (min-width: 900px){
  .cg-header .cg-header-inner{
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important; /* left balances right */
    align-items: center;
    column-gap: 18px;
  }

  .cg-header .cg-brand{ grid-column: 1; justify-self: start; }
  .cg-header .cg-desktop-nav{ grid-column: 2; justify-self: center; }

  /* any existing right-side container goes to col 3; if missing, col 3 is still 1fr */
  .cg-header .cg-actions,
  .cg-header .cg-cta-wrap,
  .cg-header .nav-cta,
  .cg-header .cg-ctas{
    grid-column: 3;
    justify-self: end;
  }
}

/* === Guardrails: NEVER show desktop menu on mobile, NEVER show burger on desktop === */

/* Mobile first: under 980px */
@media (max-width: 979px){
  .cg-desktop-nav{ display:none !important; }
  .cg-burger{ display:inline-flex !important; }
  .mobile-drawer{ display:block !important; }
}

/* Desktop: 980px and up */
@media (min-width: 980px){
  .cg-desktop-nav{ display:flex !important; }
  .cg-burger{ display:none !important; }
  .mobile-drawer{ display:none !important; }
  body.nav-open{ overflow:auto !important; } /* safety */
}


/* === Desktop: move the links (menu) more to the right === */
@media (min-width: 980px){
  /* If your header uses a flex row, this pushes nav to the right */
  .cg-header .cg-row{ justify-content: flex-start !important; }

  /* The nav itself will sit after the logo; give it auto-left margin */
  .cg-desktop-nav{
    margin-left: auto !important;
    justify-content: flex-end !important;
  }

  /* Optional fine-tuning: add a bit of right padding so it doesn't kiss the edge */
  .cg-header .cg-row{
    padding-right: 18px !important;
  }
}


/* === Desktop: allow full width for header so menu words are not cut === */
@media (min-width: 980px){

  /* stretch header container */
  .cg-header,
  .cg-header .cg-container,
  .cg-header .cg-row{
    max-width: 100% !important;
    width: 100% !important;
  }

  /* give breathing room left/right */
  .cg-header .cg-row{
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  /* ensure menu does not clip */
  .cg-desktop-nav{
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

