/* ==========================================================================
   GANNVERA GLOBAL ENTERPRISES - Responsive Stylesheet
   Breakpoints: 1440px, 1200px, 1024px, 768px, 576px, 425px, 375px, 320px
   Guarantees zero horizontal overflow & fluid typography/spacing
   ========================================================================== */

/* --- Large Desktop (1440px and up) --- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1320px;
  }
}

/* --- Laptops & Desktops (max-width: 1200px) --- */
@media (max-width: 1200px) {
  .hero-grid {
    gap: 40px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 36px;
  }
}

/* --- Tablets & Small Laptops (max-width: 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --section-padding-y: 80px;
    --section-padding-y-sm: 50px;
  }

  /* Navigation collapse to hamburger */
  .main-nav,
  .header-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  /* Hero Slider Tablet Height (520px) */
  .hero-slider-section {
    height: 520px;
    min-height: 520px;
    max-height: 520px;
  }

  .hero-slide-title {
    font-size: 2.35rem;
    margin-bottom: 16px;
  }

  .hero-slide-desc {
    font-size: 1.05rem;
    margin-bottom: 26px;
    max-width: 580px;
  }

  .hero-slider-prev {
    left: 16px;
  }

  .hero-slider-next {
    right: 16px;
  }

  .verticals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Compact Inner Page Hero Header (Tablet: 280-320px height, 34-38px heading) */
  .page-hero {
    padding: 44px 0;
    min-height: 280px;
  }

  .page-hero-content h1,
  .page-hero h1 {
    font-size: 36px;
    line-height: 1.18;
    max-width: 100%;
  }

  .page-hero-content p,
  .page-hero p {
    font-size: 16px;
    line-height: 1.65;
    max-width: 100%;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }

  .cta-text {
    max-width: 100%;
  }

  .cta-actions {
    justify-content: center;
  }

  .corporate-cta-card {
    padding: 50px 42px;
  }

  .corporate-cta-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 36px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .gallery-thumb-wrap {
    height: 230px;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    margin-bottom: 32px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .home-about-grid {
    gap: 36px;
  }

  .home-about-image-wrap {
    max-width: 440px;
    aspect-ratio: 5 / 4;
  }

  .compact-testimonial-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }

  .about-narrative-grid {
    gap: 36px;
  }

  .vision-mission-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* --- Tablets Portrait & Large Mobiles (max-width: 768px) --- */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 64px;
    --section-padding-y-sm: 40px;
  }

  .top-bar {
    display: none; /* Clean uncluttered mobile header */
  }

  .header-inner {
    height: 68px;
  }

  .brand-logo img {
    height: 40px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .verticals-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Compact Inner Page Hero Header (Mobile: auto height, 35-40px padding, 28-32px heading) */
  .page-hero {
    padding: 38px 0;
    min-height: auto;
  }

  .page-hero .container,
  .page-hero .container.page-hero-content,
  .page-hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .page-hero-content h1,
  .page-hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(22px, 5.5vw, 26px);
    line-height: 1.2;
    margin-bottom: 10px;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .page-hero-content p,
  .page-hero p {
    width: 100%;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.6;
  }

  .page-hero .breadcrumb-nav {
    margin-bottom: 10px;
  }

  .page-hero .badge {
    margin-bottom: 12px !important;
  }

  /* Homepage About Us Mobile Layout (Stack Content First, Image Below) */
  .home-about-section {
    padding: 56px 0;
  }

  .home-about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .home-about-content {
    order: 1;
    height: auto;
  }

  .home-about-image-col {
    order: 2;
    height: auto;
    justify-content: center;
  }

  .home-about-image-wrap {
    max-width: 100%;
    aspect-ratio: 5 / 4;
  }

  /* About Us Page: Institutional Narrative Mobile Layout (Content first, Image below) */
  .about-narrative-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-narrative-content {
    order: 1;
    height: auto;
  }

  .about-narrative-image-col {
    order: 2;
    height: auto;
    width: 100%;
  }

  .about-narrative-image-wrap {
    height: 320px;
    min-height: 260px;
    max-height: 360px;
    width: 100%;
  }

  /* Compact Testimonials Carousel Mobile Responsive */
  .testimonials-compact-section {
    padding: 56px 0;
  }

  .testimonials-carousel-track {
    gap: 16px;
  }

  .compact-testimonial-card {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 22px 20px;
  }

  .features-grid,
  .features-grid-3 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .offering-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .related-verticals-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-card {
    padding: 28px 20px;
  }

  .contact-info-card {
    padding: 32px 24px;
    height: auto;
  }

  .contact-method-list {
    gap: 20px;
    justify-content: flex-start;
  }

  .contact-map-wrapper {
    height: 320px;
  }

  /* Hero Slider Mobile Height (650px - 720px) */
  .hero-slider-section {
    height: 680px;
    min-height: 650px;
    max-height: 720px;
  }

  .hero-slide-overlay {
    background: linear-gradient(
      180deg,
      rgba(17, 17, 17, 0.70) 0%,
      rgba(24, 24, 24, 0.50) 60%,
      rgba(17, 17, 17, 0.25) 100%
    );
  }

  .hero-slide-content {
    max-width: 100%;
    padding-top: 20px;
    padding-bottom: 70px;
  }

  .hero-slide-title {
    font-size: clamp(1.85rem, 5.5vw, 2.25rem);
    line-height: 1.22;
    margin-bottom: 16px;
  }

  .hero-slide-desc {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .hero-slide-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-slide-actions .btn {
    width: 100%;
  }

  /* Accessible mobile arrow controls */
  .hero-slider-nav-btn {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-slider-nav-btn:hover {
    transform: scale(1.05);
  }

  .hero-slider-prev {
    left: 16px;
    right: auto;
  }

  .hero-slider-next {
    left: 68px;
    right: auto;
  }

  .hero-slider-controls {
    bottom: 28px;
  }

  .hero-slider-controls-inner {
    justify-content: flex-end;
    gap: 12px;
  }

  .hero-slide-counter {
    padding: 4px 12px;
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .footer-legal-links {
    justify-content: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .cta-section-wrap {
    padding-bottom: 72px;
  }

  .corporate-cta-card {
    padding: 44px 28px;
    border-radius: 18px;
  }

  .corporate-cta-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .corporate-cta-content {
    max-width: 100%;
  }

  .corporate-cta-title {
    font-size: 1.95rem;
  }

  .corporate-cta-action {
    justify-content: flex-start;
  }

  .btn-corporate-cta {
    width: 100%;
    justify-content: center;
  }

  /* Gallery Responsive - 768px */
  .gallery-section {
    padding: 72px 0 80px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .gallery-thumb-wrap {
    height: 200px;
  }
  .gallery-overlay {
    padding: 14px;
  }
  .gallery-item-title {
    font-size: 0.95rem;
  }
  .gallery-item-caption {
    font-size: 0.75rem;
  }
  .lightbox-stage {
    min-height: 260px;
    max-height: 52vh;
  }
  .lightbox-img {
    max-height: calc(52vh - 24px);
  }
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
  }
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .lightbox-caption-bar {
    padding: 16px 20px;
  }
  .lightbox-title {
    font-size: 1.1rem;
  }
}

/* --- Mobile Devices (max-width: 425px, 375px, 320px) --- */
@media (max-width: 425px) {
  .container,
  .container-wide,
  .container-sm {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slider-section {
    height: 700px;
    min-height: 660px;
    max-height: 720px;
  }

  .hero-slide-title {
    font-size: 1.72rem;
  }

  .hero-slide-eyebrow {
    font-size: 0.74rem;
  }

  .hero-slider-dot {
    width: 22px;
  }

  .hero-slider-dot.active {
    width: 38px;
  }

  .page-hero {
    padding: 35px 0 38px;
    min-height: auto;
  }

  .page-hero-content h1,
  .page-hero h1 {
    font-size: 22px;
    line-height: 1.25;
  }

  .btn {
    width: 100%;
    padding: 13px 20px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .corporate-cta-card {
    padding: 34px 20px;
    border-radius: 16px;
  }

  .corporate-cta-title {
    font-size: 1.65rem;
  }

  .corporate-cta-desc {
    font-size: 0.95rem;
  }

  .btn-corporate-cta {
    padding: 16px 24px;
    font-size: 0.96rem;
  }

  /* Gallery Responsive - 425px */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery-thumb-wrap {
    height: 220px;
  }

  .hero-visual-card img {
    height: 320px;
  }

  .hero-card-floating-badge {
    position: static;
    margin: 12px;
  }

  .service-card,
  .vertical-card {
    padding: 28px 22px;
  }

  .legal-card {
    padding: 24px 16px;
  }

  .article-author-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
}

/* Ultra Small Viewports (320px) */
@media (max-width: 330px) {
  h1 {
    font-size: 1.85rem !important;
  }

  .brand-logo img {
    height: 34px;
  }

  .badge {
    font-size: 0.72rem;
  }
}

