/* =========================================
   1. PREMIUM THEME & GLOBAL OVERFLOW FIXES
   ========================================= */
:root {
  --gold: #ffc412;
  --dark-gold: #b38600;
  --black: #0a0a0a;
  --dark-grey: #1c1c1c;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.98);
  --glass-dark: rgba(20, 20, 20, 0.8);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 !important;
  padding-top: 80px;
  font-family: 'Raleway', sans-serif;
  color: var(--gold) !important;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Background Layers */
body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  width: 100%;
  z-index: -2;
}

body::before {
  top: 0;
  height: 50vh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3)), url("images/444.jpg") center/cover no-repeat;
}

body::after {
  bottom: 0;
  height: 100vh;
  background: url("images/65.jpg") center/cover no-repeat;
  z-index: -3;
}

.premium-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 160, 23, 0.2);
  margin: 20px auto;
  width: 95%;
  max-width: 1200px;
  overflow: hidden;
}

.dark-bg {
  background: var(--black) !important;
  color: var(--white);
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
   ========================================= */
.gold-text {
  color: var(--gold);
  font-weight: 700;
}

.white-text {
  color: var(--white);
  font-weight: 700;
}

.cta-btn {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  /* Extra bold */
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  letter-spacing: 1px;
}

.gold-btn {
  background: var(--gold);
  color: var(--black);
  border: none;
}

.gold-btn:hover {
  background: var(--white);
  transform: translateY(-2px);
}

/* =========================================
   3. CALCULATOR SECTION
   ========================================= */
.calculator-container {
  margin: 20px auto;
  padding: clamp(20px, 5vw, 40px);
}

.calc-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  /* Narrower sidebar */
  gap: 40px;
  margin: 30px 0;
  align-items: start;
}

.input-block label {
  display: block;
  margin-bottom: 15px;
  font-weight: 800;
  /* Extra bold for readability */
  color: var(--gold) !important;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Smaller Input Box */
.currency-input {

  flex-shrink: 0;
  position: relative;
  width: 125px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 160, 23, 0.4);
  border-radius: 8px;
  padding: 8px;
  color: var(--white);
  font-weight: 700;
  text-align: right;

}

input[type=range] {
  flex: 1;
  accent-color: var(--gold);
}

/* FIX: Text Alignment & Size */
#weeklySpend {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gold);
  color: #fff;
  padding: 12px 10px 12px 30px;
  /* Extra left padding for the $ sign */
  border-radius: 8px;
  width: 100%;
  font-size: 1.2rem;
  /* Bigger text */
  font-weight: 800;
  /* Bold text */
  outline: none;
  box-sizing: border-box;
  display: block;
}

/* FIX: Positioning the $ symbol inside the box */
.currency-symbol {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 800;
  font-size: 1.1rem;
  pointer-events: none;
  /* Allows clicking "through" the symbol to the input */
}

/* Graph Visual */
.calc-visual {
  position: relative;
  height: 480px;
  background: #000;
  border: 1px solid #222;
  border-radius: 24px;
  padding: 20px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}

/* Premium Results Summary */
.results-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.res-item {
  flex: 1;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.res-item span {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.res-item strong {
  font-size: 1.8rem;
  /* Larger numeric results */
  font-weight: 800;
  color: var(--white);
  display: block;
  margin-top: 5px;
}

/* Featured Result (Savings) */
.featured-res {
  background: linear-gradient(145deg, rgba(212, 160, 23, 0.2), rgba(0, 0, 0, 0.4));
  border: 2px solid var(--gold);
  /* Thicker border for prominence */
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.2);
}

.featured-res strong {
  color: var(--gold);
  font-size: 2.6rem;
  /* Extra large bold for the main total */
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   4. FEATURED PRODUCT
   ========================================= */
.featured-product-section {
  display: grid !important;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 60px auto;
  padding: 20px;
}

.product-image-box img {
  width: 100%;
  border-radius: 20px;
  border: 2px solid var(--gold);
}

.product-info-box {
  background: var(--glass-dark);
  backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(212, 160, 23, 0.2);
}

.product-info-box h3 {
  font-weight: 800;
  color: var(--white);
  font-size: 2rem;
}

.product-features li {
  font-weight: 700;
  color: var(--gold);
  padding: 12px 0;
}

/* =========================================
   5. RESPONSIVE (STRICT NO-SPILL)
   ========================================= */
@media (max-width: 992px) {

  .calc-grid,
  .featured-product-section {
    grid-template-columns: 1fr;
  }

  .calc-visual {
    height: 400px;
  }
}

@media (max-width: 600px) {
  .calc-visual {
    height: 300px;
    padding: 10px;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .currency-input {
    width: 100%;
    text-align: center;
  }

  .res-item strong {
    font-size: 1.4rem;
  }

  .featured-res strong {
    font-size: 1.8rem;
  }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 60px 20px;
  background: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.8)),
    url("images/444.jpg") center/cover no-repeat;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  width: 100%;
}

/* Text Styling */
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  max-width: 500px;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 15px;
}

/* Image Wrapper with Premium Gold Border */
.hero-image-wrapper {
  position: relative;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 30px;
  /* Rounded corners */
  border: 3px solid var(--gold);
  /* Gold border */
  display: block;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-visual {
    order: 1;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-content p {
    margin: 20px auto 30px;
  }
}

@media (max-width: 600px) {
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .hero-btns .cta-btn {
    width: 100%;
  }
}

/* Subscription */
/* 1. CTA CONTAINER & BUTTON CENTERING */
.cta-button-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  /* Forces horizontal center */
  justify-content: center !important;
  width: 100%;
  margin-top: 25px;
  text-align: center;
}

.btn-aggressive-cta {
  display: inline-block;
  min-width: 280px;
  margin-bottom: 12px;
}

/* THE FIX: Specifically targeting the Notify Me button */
#open-subscribe.btn-notify-link {
  display: inline-block !important;
  margin: 0 auto !important;
  /* Centers within the flex container */
  background: none !important;
  border: none !important;
  color: #ffffff;
  text-decoration: underline;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: 'Titillium Web', sans-serif;
  padding: 5px 0;
  width: auto !important;
  text-align: center !important;
  /* Prevents it from stretching full width */
}

.btn-notify-link:hover {
  color: #d4a017;
}

/* 2. THE FULL SCREEN OVERLAY */
.popup-overlay {
  display: none;
  /* JS will change this to 'flex' */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000000;
  align-items: center;
  justify-content: center;
}

/* 3. THE POPUP CARD */
.subscribe-card {
  background: #333333;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  border-top: 6px solid #d4a017;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.popup-close-x {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #333;
  font-size: 30px;
  cursor: pointer;
  font-weight: bold;
}

.sub-input {
  width: 100%;
  padding: 15px;
  margin: 20px 0;
  border: 1px solid #ccc;
  border-radius: 50px;
  text-align: center;
  font-size: 16px;
}

/* 4. MOBILE RESPONSIVENESS */
@media (max-width: 767px) {
  .subscribe-card {
    padding: 30px 15px;
    width: 85%;
  }

  #open-subscribe.btn-notify-link {
    font-size: 0.9rem;
  }
}

/* Header */

.u-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  /* Increased to ensure it clears all background layers */
  background-color: var(--white);
  /* Uses your premium variable */
  min-height: 50px;
  /* Reduced from 143px for a cleaner look */
}

.u-header .u-image-1 {
  width: 250px;
  /* Adjusted to a reasonable logo size */
  height: auto;
  margin: 10px 0 1px 220px;
  display: inline-block;
}

.u-header .u-logo-image-1 {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

@media (max-width: 600px) {
  body {
    padding-top: 100px;
    /* Ensure content doesn't overlap on small screens */
  }

  .u-header {
    justify-content: center;
    /* Center the logo on mobile */
  }

  .u-header .u-image-1 {
    width: 280px;
    /* Scale down the logo for smaller screens */
    margin: 10px 0 0 20px;
    /* Center horizontally */
  }
}

/* --- STICKY HEADER SYSTEM --- */
.u-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: auto !important;
    min-height: 60px !important;
}

/* Ensure the rest of the page doesn't hide under the header */
body {
    padding-top: 80px !important; 
}

/* Force Logo and Menu into the same row */
.u-header .ia-sheet {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px 15px !important;
    min-height: 60px !important;
}

/* Reduce Logo Size */
.u-header .u-logo-image-1 {
    height: 75px !important; /* Smaller desktop height */
    width: auto !important;
}

.u-header .u-image-1 {
    margin: 0 !important; /* Remove  default margins */
    flex-shrink: 0;
}

/* Align Nav Menu to the right */
.u-nav-container, 
.u-menu {
    margin: 0 !important;
}

/* --- MOBILE SPECIFIC ADJUSTMENTS --- */
@media (max-width: 767px) {
    body {
        padding-top: 65px !important;
    }

    .u-header .ia-sheet {
        min-height: 55px !important;
    }

    .u-header .u-logo-image-1 {
        height: 55px !important; /* Even smaller for phones */
    }

    /* Prevent the hamburger menu from taking full width */
    .u-menu-hamburger {
        margin-right: 0 !important;
    }
    
    /* Ensure the mobile menu overlay appears below the sticky header */
    .u-menu-overlay {
        top: 55px !important;
    }
}