/* =========================================================
   NUOVO ELISIR - Modern Responsive Theme (Bootstrap-free)
   File: css/style.css
   Updated for new HTML:
   - Modern hero (.ne_hero*)
   - Pre-footer contact + purchase (.ne_prefooter*)
   - Bottom footer subscribe + social only (.ne_footer_bottom)
   - Offcanvas mobile-only (no "peek" on drag)
   - FIX: Removed text truncation (no line-clamp) because Read more / Modal removed
   ========================================================= */

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
body { margin: 0; }

img, svg, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

/* ---------- Theme Tokens ---------- */
:root{
  /* Colors */
  --ne-bg: #0b0f14;
  --ne-bg-2: #070a0f;

  --ne-surface: rgba(255,255,255,0.05);
  --ne-surface-2: rgba(255,255,255,0.08);
  --ne-border: rgba(255,255,255,0.14);

  --ne-text: #e9eef5;
  --ne-muted: rgba(233,238,245,0.72);

  --ne-accent: #8fd3ff;
  --ne-accent-2: #b9a7ff;

  /* Shadows */
  --ne-shadow: 0 18px 55px rgba(0,0,0,0.55);
  --ne-shadow-soft: 0 10px 32px rgba(0,0,0,0.35);

  /* Radius */
  --ne-r-sm: 12px;
  --ne-r-md: 16px;
  --ne-r-lg: 20px;
  --ne-r-xl: 26px;

  /* Spacing */
  --ne-container: 1140px;
  --ne-gutter: 16px;

  /* Typography */
  --ne-font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Focus ring */
  --ne-ring: 0 0 0 0.22rem rgba(143,211,255,0.16);

  /* Sections */
  --ne-section-gap: clamp(18px, 2.2vw, 30px);
  --ne-panel-pad: clamp(14px, 1.6vw, 18px);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body{
  font-family: var(--ne-font);
  color: var(--ne-text);
  line-height: 1.65;

  background:
    radial-gradient(1200px 700px at 18% 0%, rgba(143,211,255,0.12), transparent 60%),
    radial-gradient(900px 600px at 90% 18%, rgba(185,167,255,0.10), transparent 55%),
    linear-gradient(180deg, var(--ne-bg-2), var(--ne-bg));
  overflow-x: hidden;
}

/* Prevent horizontal drag/overscroll revealing offcanvas */
html, body { overflow-x: hidden; }
@supports (overflow: clip){
  html, body { overflow-x: clip; }
}
body{
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

/* Safer wrapping */
p, h1, h2, h3, h4, h5, h6, a { overflow-wrap: anywhere; }

p{
  color: var(--ne-muted);
  margin: 0 0 0.95rem;
}

/* Headings */
h1{
  margin: 0.15rem 0 0.9rem;
  font-size: clamp(2rem, 1.35rem + 2.2vw, 3.2rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
}
h2{
  margin: 0;
  font-size: clamp(1.15rem, 1.02rem + 0.95vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}
h3{
  margin: 0 0 .75rem;
  font-size: clamp(1.1rem, 1.0rem + 0.7vw, 1.35rem);
  letter-spacing: .02em;
}
h4{
  margin: 0 0 .55rem;
  font-size: 1.02rem;
  color: var(--ne-text);
}

a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: none;
  box-shadow: var(--ne-ring);
  border-radius: 10px;
}

/* ---------- Accessibility helpers ---------- */
.ne_skip_link{
  position: absolute;
  left: 12px;
  top: -50px;
  z-index: 9999;
  padding: .55rem .8rem;
  border: 1px solid var(--ne-border);
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  color: var(--ne-text);
}
.ne_skip_link:focus{ top: 12px; }

.ne_sr_only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Main container ---------- */
.ne_main{
  width: min(100%, var(--ne-container));
  margin: 0 auto;
  padding: 22px var(--ne-gutter) 40px;
}

/* General section spacing */
.ne_section{
  margin: var(--ne-section-gap) 0 calc(var(--ne-section-gap) + 6px);
}

/* =========================================================
   Header / Navbar
   ========================================================= */
.ne-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,12,16,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ne_nav{
  width: min(100%, var(--ne-container));
  margin: 0 auto;
  padding: 10px var(--ne-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ne_brand{ display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ne-logo{
  height: 44px;
  width: auto;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
}
@media (max-width: 576px){
  .ne-logo{ height: 36px; }
}

/* Desktop links */
.ne_nav_links{
  list-style: none;
  display: none; /* shown on tablet+ */
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.ne_nav_links a{
  display: inline-flex;
  padding: .45rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ne-text);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ne_nav_links a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

/* Hamburger (mobile only) */
.ne_nav_toggle{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  border-radius: 999px;
  padding: .55rem .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.ne_nav_toggle:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.35);
  transform: translateY(-1px);
}
.ne_nav_toggle_icon{
  width: 20px;
  height: 14px;
  position: relative;
  display: inline-block;
}
.ne_nav_toggle_icon::before{
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 2px;
  height: 2px;
  background: rgba(233,238,245,0.88);
  border-radius: 2px;
  box-shadow: 0 5px 0 rgba(233,238,245,0.88), 0 10px 0 rgba(233,238,245,0.88);
}

/* Tablet+: show links and hide toggle */
@media (min-width: 768px){
  .ne_nav_links{ display: flex; }
  .ne_nav_toggle{ display: none; }
}

/* =========================================================
   Offcanvas (mobile only; JS toggles body.ne-offcanvas-open)
   ========================================================= */
.ne_offcanvas_backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s ease;
  z-index: 1100;
}

.ne_offcanvas{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(86vw, 360px);
  background: rgba(12,16,22,0.96);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--ne-shadow);
  transform: translateX(102%);
  transition: transform .24s ease;
  z-index: 1200;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* prevent "peek" + make it non-interactive when closed */
  visibility: hidden;
  pointer-events: none;
}

.ne_offcanvas_header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ne_offcanvas_close{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.ne_offcanvas_close:hover{
  background: rgba(143,211,255,0.10);
  transform: translateY(-1px);
}

.ne_offcanvas_nav{
  display: grid;
  gap: 8px;
  padding: 10px 4px;
}
.ne_offcanvas_nav a{
  padding: .75rem .85rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ne_offcanvas_nav a:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.35);
  transform: translateY(-1px);
}

/* Open state */
body.ne-offcanvas-open{
  overflow: hidden;
  touch-action: none;
}
body.ne-offcanvas-open .ne_offcanvas{
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
body.ne-offcanvas-open .ne_offcanvas_backdrop{
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Hard disable offcanvas for tablet/desktop */
@media (min-width: 768px){
  .ne_offcanvas,
  .ne_offcanvas_backdrop{
    display: none !important;
  }
  body.ne-offcanvas-open{
    overflow: auto;
    touch-action: auto;
  }
}

/* =========================================================
   HERO (New)
   ========================================================= */
.ne_hero{
  position: relative;
  margin-top: 18px;
  border-radius: var(--ne-r-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--ne-shadow);
  background:
    radial-gradient(900px 520px at 20% 15%, rgba(143,211,255,0.16), transparent 60%),
    radial-gradient(760px 520px at 85% 30%, rgba(185,167,255,0.14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.ne_hero::before,
.ne_hero::after{
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(143,211,255,0.18), transparent 65%);
  opacity: 0.45;
  filter: blur(10px);
}
.ne_hero::after{
  inset: -35%;
  background: radial-gradient(closest-side, rgba(185,167,255,0.16), transparent 65%);
  opacity: 0.38;
}

/* Hero inner aligns to container width */
.ne_hero_inner{
  position: relative;
  width: min(100%, var(--ne-container));
  margin: 0 auto;
  padding: clamp(18px, 2.2vw, 28px) var(--ne-gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.ne_hero_media img{
  width: 100%;
  border-radius: var(--ne-r-lg);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--ne-shadow);
}

.ne_hero_content{
  border-radius: var(--ne-r-lg);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  box-shadow: var(--ne-shadow-soft);
}

.ne_hero_content_inner{
  padding: var(--ne-panel-pad);
}

/* Keep your existing hr, but premium */
.ne_hr1, .ne_hr2{
  border: 0;
  height: 2px;
  margin: .35rem 0;
  background: linear-gradient(90deg, transparent, rgba(143,211,255,0.72), transparent);
}
.ne_hr2{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185,167,255,0.70), transparent);
}

/* Hero paragraphs */
.ne_hero p{
  color: rgba(233,238,245,0.76);
  max-width: 70ch;
}

/* Tablet+ hero layout */
@media (min-width: 768px){
  .ne_hero_inner{
    grid-template-columns: 0.92fr 1.45fr;
    align-items: start;
  }
}
@media (min-width: 1100px){
  .ne_hero_inner{
    grid-template-columns: 0.82fr 1.55fr;
    align-items: center;
    min-height: 520px;
  }
  .ne_hero_content_inner{ padding: clamp(18px, 2vw, 22px); }
}

/* =========================================================
   Section backgrounds (Different but consistent)
   ========================================================= */
.ne_video_section{
  padding: 14px 0 0;
}

.ne_section{
  position: relative;
}

/* Subtle section tint variety (only where .ne_section exists) */
.ne_section:nth-of-type(2n){
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--ne-r-lg);
  padding: clamp(14px, 2vw, 18px);
}
.ne_section:nth-of-type(2n) .ne_gridtop{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

@media (max-width: 520px){
  .ne_section:nth-of-type(2n){
    padding: 14px;
  }
}

/* =========================================================
   Video / media responsiveness
   ========================================================= */
.ne_media_frame{
  border-radius: var(--ne-r-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  box-shadow: var(--ne-shadow);
}

/* Ratio helper */
.ne_ratio_16x9{
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

/* iframe inside ratio */
.ne_ratio_16x9 > .ne_iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* video inside ratio */
.ne_ratio_16x9 > .ne_video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

/* =========================================================
   Act headers
   ========================================================= */
.ne_gridtop{
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-r-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  box-shadow: var(--ne-shadow-soft);
  margin: 0 0 14px;
}
.ne_gridrow{ display: block; }

/* =========================================================
   Score buttons
   ========================================================= */
.ne_partbuttondiv{
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nebutton{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .62rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.nebutton:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.35);
  transform: translateY(-1px);
}

/* =========================================================
   Cards grid
   ========================================================= */
.ne_cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (min-width: 768px){
  .ne_cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px){
  .ne_cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Card styling */
.ne_card{
  background: var(--ne-surface);
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-r-md);
  padding: 0.95rem;
  box-shadow: var(--ne-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ne_card_head{
  display: grid;
  gap: 4px;
}
.ne_card_head_secondary{ margin-top: 2px; }

.ne_audio{
  width: 100%;
  margin-top: 2px;
}

/* =========================================================
   FIX: No truncation / no clamp (Read more + Modal removed)
   ========================================================= */
.ne_card_text{
  color: var(--ne-muted);
  display: block;          /* was -webkit-box */
  overflow: visible;       /* was hidden */
  max-height: none;        /* ensure no clipping */
  min-height: 0;           /* remove forced height */
}
.ne_card_text p{ margin: 0 0 .7rem; }
.ne_card_text p:last-child{ margin-bottom: 0; }

/* If you still keep Read more buttons in HTML, these styles can stay.
   If you removed the buttons, leaving this CSS does no harm. */
.ne_readmore_btn{
  margin-top: auto;
  align-self: flex-start;
  padding: .55rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(143,211,255,0.45);
  background: rgba(143,211,255,0.12);
  color: var(--ne-text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.ne_readmore_btn:hover{
  transform: translateY(-1px);
  background: rgba(143,211,255,0.18);
}

/* Video card */
.ne_card_video .ne_media_frame{ box-shadow: none; }
.ne_card_video{ padding: 0.95rem; }

/* =========================================================
   Pre-footer (New): Contact + Purchase
   ========================================================= */
.ne_prefooter{
  margin-top: 24px;
  padding: 34px 0;
  background:
    radial-gradient(900px 520px at 15% 20%, rgba(143,211,255,0.10), transparent 60%),
    radial-gradient(760px 520px at 88% 35%, rgba(185,167,255,0.09), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.12));
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ne_prefooter_wrap{
  width: min(100%, var(--ne-container));
  margin: 0 auto;
  padding: 0 var(--ne-gutter);
  display: grid;
  gap: 16px;
}

.ne_prefooter_panel{
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-r-xl);
  padding: 1.1rem;
  box-shadow: var(--ne-shadow-soft);
  backdrop-filter: blur(10px);
}

@media (min-width: 1100px){
  .ne_prefooter_wrap{
    grid-template-columns: 1fr 1.25fr;
    align-items: start;
  }
}

/* Contact form */
.ne_footer_form{
  display: grid;
  gap: 10px;
}
.ne_form_row{
  display: grid;
  gap: 6px;
}
.ne_footer_form label{
  color: var(--ne-muted);
  font-size: 0.95rem;
}

.ne_footer_form input,
.ne_footer_form textarea,
.ne_subscribe_form input{
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--ne-text);
  outline: none;
}

.ne_footer_form input:focus,
.ne_footer_form textarea:focus,
.ne_subscribe_form input:focus{
  border-color: rgba(143,211,255,0.45);
  box-shadow: var(--ne-ring);
}

.ne_btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(143,211,255,0.45);
  background: rgba(143,211,255,0.12);
  color: var(--ne-text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.ne_btn:hover{
  transform: translateY(-1px);
  background: rgba(143,211,255,0.18);
}

.ne_msg{
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--ne-accent);
  min-height: 1.2em;
}

/* Purchase block */
.ne_purchase_card{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0.95rem;
  border-radius: var(--ne-r-md);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.ne_purchase_card img{
  width: 110px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.ne_book_title{
  font-weight: 800;
  letter-spacing: 0.05em;
}
.ne_book_author{ color: var(--ne-muted); }

.ne_purchase h3{ margin-top: 14px; }
.ne_purchase h3:first-of-type{ margin-top: 10px; }

.ne_purchase_btns{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 10px 0 8px;
}

.ne_btn_link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.ne_btn_link:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.35);
  transform: translateY(-1px);
}

/* =========================================================
   Bottom Footer (New): Subscribe + Social only
   ========================================================= */
.ne_footer{
  background: rgba(0,0,0,0.22);
}

.ne_footer_wrap{
  width: min(100%, var(--ne-container));
  margin: 0 auto;
  padding: 26px var(--ne-gutter) 34px;
  display: grid;
  gap: 16px;
}

.ne_footer_bottom{
  border-top: 1px solid rgba(255,255,255,0.10);
}

.ne_footer_panel{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--ne-r-xl);
  padding: 1.1rem;
  box-shadow: var(--ne-shadow-soft);
}

@media (min-width: 1100px){
  .ne_footer_wrap.ne_footer_bottom{
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Subscribe */
.ne_subscribe_form{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ne_subscribe_form input{
  flex: 1 1 220px;
}
.ne_subscribe_form .ne_btn{
  flex: 0 0 auto;
}

/* Social links */
.ne_social_links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ne_social_links a{
  padding: .55rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--ne-text);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.ne_social_links a:hover{
  background: rgba(185,167,255,0.10);
  border-color: rgba(185,167,255,0.35);
  transform: translateY(-1px);
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; }
  .ne_nav_links a,
  .ne_nav_toggle,
  .ne_offcanvas,
  .ne_offcanvas_backdrop,
  .ne_readmore_btn,
  .ne_btn_link,
  .ne_social_links a,
  .ne_btn{
    transition: none !important;
  }
}
