/* ==========================================================================
   BHARATHNET WEB HOSTING - RESPONSIVE STYLESHEET (responsive.css)
   ========================================================================== */

/* Desktop / Global defaults for mobile drawer elements (strictly hidden on desktop) */
.mobile-nav-overlay,
.mobile-nav-drawer {
  display: none !important;
}

/* Large Screens & Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .features-grid,
  .pricing-grid,
  .services-grid,
  .scripts-grid {
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 28px;
  }
}

/* Prevent body scrolling when mobile drawer is open */
body.mobile-drawer-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Tablets and Medium Screens (max-width: 992px) */
@media (max-width: 992px) {
  /* Hide Top Bar & Contact Strip on Mobile/Tablet */
  .top-bar {
    display: none !important;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.95rem;
  }

  /* Desktop nav is hidden on mobile & tablets */
  .site-header .nav-menu {
    display: none !important;
  }

  /* Clean Sticky Header on Mobile */
  .site-header,
  .site-header.scrolled {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .site-logo {
    height: 40px;
    max-width: 175px;
  }

  /* Mobile Navigation Toggle (Hamburger) */
  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f1f8e9;
    border: 1.5px solid #dcedc8;
    color: #33691e;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus {
    background: #7CB342;
    color: #ffffff;
    border-color: #7CB342;
  }

  /* ==========================================================================
     MOBILE OVERLAY (Dark translucent scrim - dims page behind drawer)
     ========================================================================== */
  .mobile-nav-overlay {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.60);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* ==========================================================================
     MOBILE NAVIGATION DRAWER (100% Solid, Crisp, Opaque White)
     ========================================================================== */
  .mobile-nav-drawer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85vw;
    max-width: 380px;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden;
    border-left: 1px solid #e2e8f0;
    will-change: transform;
  }

  .mobile-nav-drawer.open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Mobile Drawer Header */
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
  }

  .drawer-logo-link {
    display: inline-flex;
    align-items: center;
  }

  .drawer-logo {
    height: 38px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
  }

  .mobile-drawer-close {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
  }

  .mobile-drawer-close:hover,
  .mobile-drawer-close:focus {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
  }

  /* Mobile Drawer Scrollable Body */
  .mobile-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
  }

  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-nav-item {
    border-bottom: 1px solid #f1f5f9;
  }

  .mobile-nav-item:last-child {
    border-bottom: none;
  }

  .mobile-nav-link {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    background: #f1f8e9;
    color: #558B2F;
  }

  .mobile-nav-link .chevron-icon {
    font-size: 0.82rem;
    color: #94a3b8;
    transition: transform 0.25s ease, color 0.25s ease;
  }

  .mobile-nav-item.has-dropdown.open > .mobile-nav-link {
    background: #f1f8e9;
    color: #558B2F;
  }

  .mobile-nav-item.has-dropdown.open > .mobile-nav-link .chevron-icon {
    transform: rotate(90deg);
    color: #558B2F;
  }

  /* Submenu Dropdown Accordion */
  .mobile-submenu {
    display: none;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 14px 10px 14px;
  }

  .mobile-nav-item.has-dropdown.open > .mobile-submenu {
    display: block;
    animation: fadeIn 0.2s ease;
  }

  .mobile-sublink {
    display: block;
    padding: 10px 14px;
    margin: 4px 0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s ease;
    background: transparent;
  }

  .mobile-sublink:hover,
  .mobile-sublink.active {
    background: #ffffff;
    color: #558B2F;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding-left: 18px;
  }

  .mobile-sublink strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
  }

  .mobile-sublink small {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
  }

  /* Mobile Drawer Footer Actions */
  .mobile-drawer-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
  }

  .drawer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .drawer-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
  }

  .drawer-contact-btn:hover {
    border-color: #7CB342;
    color: #558B2F;
  }

  .drawer-wa-btn {
    background: #25D366;
    color: #ffffff;
    border-color: #25D366;
  }

  .drawer-wa-btn:hover {
    background: #20BA56;
    border-color: #20BA56;
    color: #ffffff;
  }

  /* Ambient Orbs - hide on mobile to prevent subpixel negative overflow */
  body::before,
  body::after {
    display: none !important;
  }

  /* Inner Hero Section */
  .page-hero {
    padding: 60px 0 40px !important;
  }

  .page-hero h1 {
    font-size: 2.1rem !important;
  }

  /* Hero Slider Layout Adjustments */
  .hero-slider-section,
  .slider-container {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .hero-features-list {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .hero-visual {
    width: 100%;
    max-width: 100%;
  }

  .hero-image-card {
    width: 100%;
    max-width: 100%;
  }

  .hero-image-card img {
    width: 100%;
    max-width: 100%;
    height: 280px;
    object-fit: cover;
  }

  .hero-floating-badge {
    position: static;
    margin-top: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .slider-arrow {
    display: none !important;
  }

  /* Grids to 2 Columns */
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    gap: 24px;
  }

  .pricing-card.featured {
    transform: none;
  }

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

  .scripts-grid {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin: 0 auto;
  }

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

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

/* Small Tablets & Large Smartphones (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
  }

  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }

  .page-hero {
    padding: 48px 0 32px !important;
  }

  .page-hero h1 {
    font-size: 1.85rem !important;
  }

  .site-header {
    padding: 8px 0;
  }

  .site-logo {
    height: 38px;
    max-width: 160px;
  }

  .hero-slider-section {
    padding-top: 36px;
    padding-bottom: 48px;
    min-height: auto;
  }

  .hero-content h1 {
    font-size: 1.85rem;
  }

  .domain-search-box {
    padding: 20px 16px;
    margin-top: -20px;
  }

  .domain-form {
    flex-direction: column;
    gap: 10px;
  }

  .domain-form .domain-input {
    width: 100%;
    border-radius: 8px;
  }

  .domain-form .btn {
    width: 100%;
    border-radius: 8px;
  }

  .domain-tld-pills {
    gap: 8px;
    justify-content: center;
  }

  .features-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .counter-card {
    padding: 18px 12px;
  }

  .counter-number {
    font-size: 1.75rem;
  }

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

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

  .footer-legal-links {
    justify-content: center;
  }
  
  /* Make all tables horizontally scrollable with touch momentum on mobile */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Server specs, pricing comparison tables */
  .specs-table,
  .comparison-table,
  .pricing-table {
    min-width: 580px;
  }
}

/* Small Smartphones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-content h1 {
    font-size: 1.65rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

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

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-features-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .counter-grid {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    padding: 12px 18px;
    font-size: 0.9rem;
  }

  .cta-banner {
    padding: 32px 16px;
  }

  .cta-banner h2 {
    font-size: 1.4rem;
  }

  .back-to-top {
    bottom: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .blog-card-img {
    height: 180px;
  }
}
