/* ================================================================
   AGSAR PAINTS — Hero Mobile Fix + Premium Overrides
   Include this AFTER agsar-modern.css
   Fixes: Mobile hero image missing, text flickering, layout shift
   ================================================================ */

/* ── Core hero layout ── */
#hero-section {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

/* ── Hero content row ── */
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
  padding-bottom: 3rem;
  min-height: 480px;
  align-items: center !important;
}

/* ── FIX: Hero image — show on ALL screen sizes ── */
.hero-visual {
  display: block !important; /* was d-none d-lg-block — REMOVE that Bootstrap class or override */
  position: relative;
  z-index: 1;
}

/* Mobile: hero image below text */
@media (max-width: 991px) {
  .hero-visual {
    display: block !important;
    text-align: center;
    margin-top: 1.5rem;
    max-height: 280px;
    overflow: hidden;
  }
  .hero-visual img {
    max-height: 280px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* Prevent layout shift */
    aspect-ratio: auto;
  }
  /* Prevent hero from being too tall on mobile */
  #hero-section { min-height: auto; }
  .hero-content { padding-top: 1.5rem; padding-bottom: 1rem; min-height: auto; }
}

/* ── FIX: Text flickering — caused by AOS + hero animation conflict ── */
/* Ensure text is visible even before JS loads */
.hero-title,
.hero-subtitle,
.hero-badge,
.hero-actions,
.hero-stats {
  will-change: auto !important; /* prevent GPU layer thrashing */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Prevent FOUC (Flash Of Unstyled Content) on hero */
#hero-section .col-lg-6:first-child {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── Hero badge ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(245,200,66,0.4);
  border-radius: 50px;
  padding: 0.38rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #F5C842;
  margin-bottom: 1.2rem;
}
@media (max-width: 767px) {
  .hero-badge { font-size: 0.65rem; padding: 0.3rem 0.75rem; }
}

/* ── Hero title ── */
.hero-title {
  font-family: 'Playfair Display', 'DM Sans', serif;
  font-size: clamp(1.85rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.18;
  color: #1a3a6b;
  margin-bottom: 1rem;
}
.hero-title .highlight { color: #C8392B; font-style: italic; }

/* ── Hero subtitle ── */
.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: #4a5568;
  line-height: 1.75;
  margin-bottom: 1.8rem;
  max-width: 520px;
}

/* ── Hero buttons ── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.78rem 1.6rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #C8392B, #e74c3c);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(200,57,43,0.38);
  transition: all 0.22s;
  white-space: nowrap;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,57,43,0.55);
  color: #fff;
}
.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.78rem 1.6rem;
  border-radius: 50px;
  border: 2px solid #1e4d8c;
  color: #1e4d8c;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  background: transparent;
  transition: all 0.22s;
  white-space: nowrap;
}
.btn-outline-custom:hover {
  background: #1e4d8c;
  color: #fff;
  transform: translateY(-2px);
}

/* ── Hero stats ── */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e4d8c;
  display: block;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #7a9cc8;
  margin-top: 2px;
}

/* ── Hero background (light warm) ── */
#hero-section {
  background: linear-gradient(135deg, #fff8f0 0%, #fff 50%, #f0f6ff 100%);
}
.hero-bg-shapes {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(245,200,66,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(30,77,140,0.07) 0%, transparent 55%);
  pointer-events: none;
}

/* ── Mobile full-width image trick ── */
@media (max-width: 575px) {
  .hero-visual img {
    max-height: 220px;
    border-radius: 16px;
  }
}

/* ================================================================
   PRODUCT CATEGORY CARDS — Mobile fix
   ================================================================ */
@media (max-width: 575px) {
  .pc-grid .product-cat-card-img { height: 160px; }
  .pc-grid .product-cat-card-body h4 { font-size: 1rem; }
}

/* ================================================================
   CONTACT PAGE — Ensure no black background leaks
   ================================================================ */
.page-hero {
  background: linear-gradient(135deg, #0d1f44 0%, #1a3a6b 50%, #1e4d8c 100%) !important;
  padding: 3.5rem 1.5rem;
  color: #fff;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem,4vw,2.8rem); }
.page-hero .section-label { color: #F5C842 !important; }

/* Breadcrumb */
.breadcrumb-modern {
  display: flex; align-items: center; gap: 0.4rem;
  list-style: none; padding: 0; margin: 0.75rem 0 0;
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
}
.breadcrumb-modern li + li::before { content: '/'; margin-right: 0.4rem; }
.breadcrumb-modern a { color: #F5C842; text-decoration: none; }

/* Contact info card */
.contact-info-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e2eaff;
  box-shadow: 0 4px 18px rgba(30,77,140,0.07);
}
.contact-info-item {
  display: flex; gap: 12px;
  margin-bottom: 1rem;
}
.contact-icon {
  width: 36px; height: 36px;
  border-radius: 9px; flex-shrink: 0;
  background: #eef4ff;
  display: flex; align-items: center; justify-content: center;
  color: #1e4d8c;
}
.footer-social {
  display: flex; gap: 0.45rem; flex-wrap: wrap;
}
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eef4ff; border: 1.5px solid #d0e4ff;
  color: #1e4d8c;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; text-decoration: none;
  transition: all 0.2s;
}
.footer-social a:hover { background: #1e4d8c; color: #fff; transform: translateY(-2px); }

/* Modern form */
.modern-form label {
  display: block; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 0.35rem; color: #1a3a6b;
}
.modern-form .form-control {
  border: 1.5px solid #d0e4ff; border-radius: 10px;
  padding: 0.7rem 1rem; font-size: 0.88rem;
  background: #f8faff; color: #1a3a6b;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modern-form .form-control:focus {
  border-color: #1e4d8c;
  box-shadow: 0 0 0 3px rgba(30,77,140,0.1);
  background: #fff;
}
.btn-red {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0.78rem 1.8rem; border-radius: 50px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #C8392B, #e74c3c);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; transition: all 0.22s;
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,57,43,0.45); color: #fff; }

/* ================================================================
   1024px × 768px FIX — Laptop / Small Desktop
   Bug: hero text cut off on left, nav overflows
   Fix: tighter hero layout, ensure no horizontal scroll
   ================================================================ */
@media (min-width: 992px) and (max-width: 1199px) {
  /* Prevent any horizontal overflow */
  body { overflow-x: hidden; }
  #hero-section { overflow: hidden; }

  /* Tighten hero padding so content fits in 1024px viewport */
  .hero-content { padding-top: 2rem; padding-bottom: 2rem; }

  /* Smaller title so it doesn't push image off screen */
  .hero-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
  .hero-subtitle { font-size: 0.9rem; }

  /* Reduce hero image height slightly */
  .hero-visual img { max-height: 380px; }

  /* Tighten container padding */
  .container-xl { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

  /* Buttons: allow wrapping */
  .hero-actions { flex-wrap: wrap; }
  .btn-primary-custom, .btn-outline-custom {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }

  /* Stats: horizontal but tighter */
  .hero-stats { gap: 0.5rem 1.2rem; }
  .hero-stat-num { font-size: 1.35rem; }
}

/* ================================================================
   GLOBAL: prevent horizontal scroll on ALL screen sizes
   ================================================================ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after {
  box-sizing: border-box;
}
