/* =========================================
   MACBOOK & LAPTOP OPTIMIZATIONS (1024px - 1600px)
   ========================================= */

@media screen and (max-width: 1600px) {
  :root { --sidebar-w: 240px; }
  .hero h1 { font-size: 3.5rem; }
  .hero .hero-container, .container { padding: 0 40px; }
}

/* =========================================
   "THE BOSS FIX" (1280px - 1366px) 
   Fixes: TALLER CARDS (Hindi Punggok) + Wide Layout
   ========================================= */
@media screen and (max-width: 1366px) {
  
  /* 1. SECTION SETUP */
  section {
    min-height: 100vh;
    padding: 1rem 0; 
    display: flex; flex-direction: column; justify-content: center;
  }
  
  /* 2. DULO DULO CONTAINER */
  .container { 
    max-width: 98vw; 
    padding: 0 2vw;  
  }
  
  /* 3. HERO ADJUSTMENTS */
  .hero { padding-top: 60px; }
  .hero h1 { font-size: 2.2rem; line-height: 1.1; margin-bottom: 0.4rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 1rem; }
  .hero__grid { gap: 1rem; justify-content: space-between; width: 100%; }
  .hero__img-wrapper { max-width: 320px; }
  
  /* 4. PRICING: TALLER & WIDE */
  .pricing-grid { 
    gap: 1.2rem; 
    grid-template-columns: repeat(4, 1fr); 
    width: 100%;
    /* Ensure grid items stretch to match the tallest one */
    align-items: stretch; 
  }
  
  .price-card { 
    /* Increased Padding para huminga */
    padding: 2.5rem 1.5rem; 
    min-width: 0;
    
    /* FORCE HEIGHT: Para hindi punggok */
    min-height: 460px; 
    height: 100%;
    
    /* Layout: Push content apart so it fills the height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* REMOVED EMPTY RULESET HERE TO FIX LINTER ERROR */

  .price__value { font-size: 2rem; margin: 0.8rem 0 0.4rem; }
  .price__tag { font-size: 0.7rem; padding: 0.2rem 0.6rem; align-self: flex-start; }
  
  /* More breathing room sa listahan */
  .price__list { 
    font-size: 0.85rem; 
    margin: 1.5rem 0; 
    padding-left: 1.1rem; 
    line-height: 1.5; 
    flex-grow: 1; /* Eat available space */
  }
  .price__list li { margin: 0.4rem 0; }
  
  /* Button stays at bottom due to space-between */
  .price-btn { padding: 10px 16px; font-size: 0.9rem; margin-top: auto; }
  
  /* 5. STEPS: TALLER TOO */
  .steps-wrapper { 
    gap: 1.5rem; 
    padding-top: 0; 
  }
  .step-card { 
    padding: 2rem; /* More padding */
    min-height: 300px; /* Taller */
    display: flex; flex-direction: column; justify-content: center;
  }
  .step-number { font-size: 2.5rem; margin-bottom: 0; }
  .step-card h3 { font-size: 1.2rem; margin: 0.5rem 0; }
  .step-card p { font-size: 0.9rem; line-height: 1.5; }
  
  /* 6. FEATURES: ADJUSTED */
  .bento-grid { gap: 1rem; width: 100%; }
  .bento-card { padding: 1.5rem; min-height: 200px; }
  .bento-icon { width: 36px; height: 36px; margin-bottom: 0.5rem; }
  .bento-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .bento-card p { font-size: 0.85rem; line-height: 1.4; }

  /* 7. TITLES */
  .section__title { font-size: 2rem; margin: 0 auto 2rem; }

  /* 8. FOOTER */
  .footer-middle-content { gap: 1rem; margin-bottom: 1rem; }
  .footer-watermark { font-size: 7rem; }
  .site-footer { padding: 2rem 0 1rem; margin-top: 0; min-height: auto; }
  .footer-newsletter-card { padding: 1.5rem; }
  
  /* AUTH & OTHERS */
  .unified-card { height: auto; min-height: 550px; max-height: 90vh; max-width: 900px; }
  .chat-interface-wrapper { transform: scale(0.8); transform-origin: center; height: auto; margin-top: -20px; }
  .flip-wrapper { height: 500px; }
  .auth-form-side form { gap: 8px; }
  .auth-form-side .auth-header { margin-bottom: 10px; }
  .auth-form-side .auth-header h1 { font-size: 1.5rem; margin-bottom: 4px; }
  .auth-form-side .input-group input { padding: 10px; font-size: 0.85rem; }
  .auth-form-side .btn-primary { padding: 10px; font-size: 0.95rem; margin-top: 5px; }
  .auth-form-side .btn-oauth { padding: 8px; font-size: 0.85rem; }
  .auth-top-nav { padding: 8px 20px; }
  .pref-visual-side { padding-left: 15px; }
  .timeline-title { font-size: 1.3rem; margin-bottom: 10px; }
  .timeline-track { gap: 15px; }
  .form-scroll-container { padding: 10px 20px; }
  .input-row { gap: 10px; margin-bottom: 10px; }
  .pref-group, .input-group { margin-bottom: 10px; }
}

/* =========================================
   SPECIAL HEIGHT FIX (Short Screens / 800px Height)
   ========================================= */
@media screen and (max-height: 820px) and (min-width: 1001px) {
  body.tm-dark { overflow: hidden; }
  .unified-card { height: 580px !important; }
  .simple-footer { bottom: 5px; font-size: 0.7rem; }
}

/* =========================================
   EXISTING MOBILE STYLES (FROZEN - WALANG GINALAW)
   ========================================= */

/* Tablet & down: stack hero */
@media (max-width: 900px){
  .hero__grid{ grid-template-columns: 1fr; gap: 1.1rem; text-align: left; }
  .hero__visual{ order: -1; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

/* MOBILE: Landing Page & Global */
@media (max-width: 768px){
  .hero{ padding: 0 0 10px; }
  .hero__grid{ gap: .25rem; }
  .hero-logo{ width: min(76vw, 700px); margin: 0 auto; display: block; }
  .hero__copy h1{ font-size: clamp(1.65rem, 5.2vw, 1.9rem); line-height: 1.15; margin: 0 0 .35rem; }
  .lead{ font-size: 0.98rem; margin: 0 0 .55rem; }
  .hero__cta{ gap: .6rem; margin: .3rem 0 .7rem; }
  .brand__logo{ width: 34px; height: 34px; }
  .brand__name{ font-size: 1.02rem; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Ultra-small phones */
@media (max-width: 400px){
  .hero__grid{ gap: .22rem; }
  .hero-logo{ width: min(78vw, 640px); }
}

/* Desktop Restore Grid */
@media (min-width: 901px){
  .hero__grid{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items:center; }
}

/* MOBILE NAV */
@media (max-width: 1024px){
  .nav__toggle{ display:flex; position:absolute; top:14px; right:12px; width:32px; height:28px; flex-direction:column; justify-content:space-between; z-index:1003; }
  .nav__bar{ width:32px; height:3px; }
  .nav__menu{ display:none !important; }
  .nav__actions{ display:none !important; }
  .nav__backdrop{ position: fixed; inset: 0; background: rgba(0,0,0,.22); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 1001; }
  .nav__backdrop.is-open{ opacity: 1; pointer-events: auto; }
  .nav__dropdown{ display: block; position: absolute; top: calc(100% + 8px); right: 8px; min-width: 220px; width: max-content; padding: 10px; background: rgba(12,16,24,.58); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; box-shadow: -8px 10px 30px rgba(0,0,0,.45); opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: transform .2s ease, opacity .18s ease; z-index: 1002; }
  .nav__dropdown.is-open{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .nav__dropdown a{ display: block; width: 100%; padding: 12px 14px; border-radius: 12px; color: var(--text); text-decoration: none; line-height: 1.15; transition: background .2s ease, transform .12s ease; }
  .nav__dropdown a:hover{ background: rgba(255,255,255,.08); transform: translateY(-1px); }
  .nav__dropdown .btn { width: 100%; text-align: center; margin-top: 5px; }
  .nav__dropdown .btn.primary { background: var(--primary); color: #000; font-weight: 700; }
}

/* MOBILE AUTH PAGE (Stacked) */
@media (max-width: 1000px) {
  .unified-card { flex-direction: column; height: auto; max-width: 500px; padding: 40px 0; }
  .auth-top-nav { padding: 15px 20px; }
  .auth-visual-side { width: 100%; height: 600px; }
  .auth-form-side { width: 100%; padding: 20px; }
  .flip-wrapper { height: 650px; }
  .unified-card::after { display: none; }
}