/* ==========================================================================
   Book Publishings - Dedicated Mobile & Tablet Responsive Stylesheet
   Optimized for Header, Footer, Logo Slider, Main Hero, & Content
   ========================================================================== */

/* --- 1200px Breakpoint (Desktops & Laptops) --- */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

  .nav-menu {
    gap: 1.25rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }
}



/* --- 992px Breakpoint (Tablets Landscape & Laptops) --- */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
    padding: 0 1.25rem;
  }

  /* Header & Navigation Mobile Dropdown */
  .navbar {
    grid-template-columns: 1fr auto;
  }

  .nav-actions {
    display: none;
  }

  /* Off-canvas drawer sliding in from the left */
  .nav-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-primary);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
    z-index: 1001;
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.35s ease, visibility 0.35s ease;
  }

  .nav-menu.show {
    transform: translateX(0);
    visibility: visible;
  }

  /* Dark backdrop behind the drawer */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .nav-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  body.menu-open {
    overflow: hidden;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1.05rem 0.75rem;
    font-size: 1rem;
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-secondary);
  }

  .nav-link.active {
    border-bottom: 2px solid var(--color-secondary);
  }

  .nav-link .fa-chevron-down {
    transition: transform 0.3s ease;
  }

  .nav-item.open>.nav-link .fa-chevron-down {
    transform: rotate(180deg);
  }

  /* Services sub-menu: bordered, scrollable box */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    display: none;
    margin: 0.5rem 0 0.75rem;
    max-height: 260px;
    overflow-y: auto;
    transition: none;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) transparent;
  }

  .dropdown-menu::-webkit-scrollbar {
    width: 5px;
  }

  .dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 10px;
  }

  /* Sub-menu displays strictly when .open class is toggled by JS */
  .nav-item.open>.dropdown-menu {
    display: block !important;
  }

  .mega-menu-title {
    padding: 0.8rem 1rem 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
  }

  .mega-menu-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mega-menu-col ul li a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    text-decoration: none;
  }

  .mega-menu-col ul li a:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
  }

  .dropdown-item:last-child a {
    border-bottom: none;
  }

  .dropdown-item a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-secondary);
  }

  .mobile-toggle {
    display: flex;
    justify-self: end;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1002;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease, color 0.3s ease;
  }

  /* Close (X) button when the drawer is open */
  .mobile-toggle.is-open {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    font-size: 1.3rem;
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-heading {
    font-size: 2.6rem;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-graphic-wrap {
    margin-top: 2rem;
  }

  /* About Platform Section */
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .platforms-img {
    margin: 0 auto;
  }

  /* Footer Grid */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand p {
    max-width: 100%;
  }
}

/* --- 768px Breakpoint (Tablets Portrait & Big Mobile Screens) --- */
@media (max-width: 768px) {

  /* Header Top Bar Mobile 2x2 Grid Layout */
  .top-bar-inner {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.5rem;
    align-items: center;
    justify-content: space-between;
  }

  .top-bar-contact {
    display: contents;
  }

  .social-links {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .top-contact-chat {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .top-contact-phone {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .top-contact-email {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .top-contact-item {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  /* Hero Banner */
  .hero-heading {
    font-size: 2.1rem;
  }

  .hero-text {
    font-size: 0.98rem;
  }

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

  .btn-quote,
  .btn-chat {
    width: 100%;
    justify-content: center;
  }

  /* Logo Slider Section */
  .platforms-slider-section {
    padding: 1.75rem 0;
  }

  .slider-title {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
  }

  .slider-track {
    gap: 2.25rem;
    animation-duration: 70s;
  }

  .platform-logo {
    height: 32px;
    max-width: 140px;
  }

  .slider-track-wrap::before,
  .slider-track-wrap::after {
    width: 50px;
  }

  /* About Platform Section */
  .about-heading {
    font-size: 1.95rem;
  }

  .stats-bar-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.75rem 1.25rem;
    gap: 1.5rem;
  }

  .stat-num {
    font-size: 1.9rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
    text-align: left;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
  
  .footer-brand,
  .footer-brand p,
  .footer-contact-info p {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .brand-logo {
    justify-content: flex-start !important;
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    padding: 1.5rem;
  }

  .footer-bottom-text {
    font-size: 0.85rem;
  }
}

/* --- 576px Breakpoint (Mobile Phones Portrait) --- */
@media (max-width: 576px) {
  .site-header {
    padding: 0.6rem 0;
  }

  .brand-symbol {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-sub {
    font-size: 0.6rem;
  }

  /* Logo Slider Section */
  .platforms-slider-section {
    padding: 1.5rem 0;
  }

  .slider-title {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .slider-track {
    gap: 1.75rem;
  }

  .platform-logo {
    height: 28px;
    max-width: 120px;
  }

  .slider-track-wrap::before,
  .slider-track-wrap::after {
    width: 30px;
  }

  /* Stats Bar */
  .stats-bar-container {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
    gap: 1.25rem;
  }

  .stat-num {
    font-size: 1.75rem;
  }

  .stat-txt {
    font-size: 0.85rem;
  }

  /* Footer */
  .footer-social-icons {
    justify-content: center;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand p {
    text-align: center;
  }

  /* .brand-logo {
    justify-content: center;
  } */

  .footer-title {
    font-size: 1.15rem;
  }
}

/* --- 380px Breakpoint (Smallest Mobile Devices) --- */
@media (max-width: 380px) {
  .hero-heading {
    font-size: 1.8rem;
  }

  .about-heading {
    font-size: 1.65rem;
  }

  .btn-quote,
  .btn-chat {
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem 0.5rem 1.2rem;
  }

  .btn-quote .icon-circle,
  .btn-chat .icon-circle {
    width: 32px;
    height: 32px;
  }

  .top-bar-contact {
    font-size: 0.78rem;
  }
}

/* Contact Page Responsive Styles */
@media (max-width: 992px) {
  .contact-top-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-split-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-left .contact-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .contact-top-boxes {
    grid-template-columns: 1fr;
  }

  .contact-right-card {
    padding: 2.5rem 1.5rem;
  }

  .contact-right-card h3 {
    font-size: 2rem;
  }

  .contact-left .contact-title {
    font-size: 2.2rem;
  }
}

/* All Services Section */
@media (max-width: 768px) {
  .all-services-section .section-title {
    font-size: 2rem;
  }

  .services-grid-modern {
    grid-template-columns: 1fr;
  }
}

/* Process Section Responsive */
@media (max-width: 992px) {
  .process-section {
    height: auto;
    padding: 5rem 0;
  }

  .process-sticky-wrapper {
    position: relative;
    height: auto;
    top: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .process-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .process-right {
    height: 400px;
  }
}

@media (max-width: 576px) {
  .process-right {
    height: 450px;
  }

  .process-card {
    padding: 2.5rem 1.5rem;
  }

  .process-card-content {
    top: 2.5rem;
    left: 1.5rem;
    right: 1.5rem;
  }

  .process-progress-bar {
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .process-main-title {
    font-size: 2.2rem;
  }
}

/* ==========================================================================
   Comprehensive Service Pages Mobile Responsiveness Fixes
   ========================================================================== */

/* --- 991px Breakpoint (Tablets) --- */
@media (max-width: 991px) {
  .marketing-sticky-layout {
    flex-direction: column;
    gap: 2.5rem;
  }

  .marketing-sticky-sidebar {
    position: static !important;
    width: 100%;
    text-align: center;
  }

  .expert-services-layout {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
  }

  .expert-services-image {
    margin: 0 auto;
    max-width: 100%;
  }

  .expert-features {
    justify-content: center;
  }
}

/* --- 768px Breakpoint (Tablets Portrait & Mobile) --- */
@media (max-width: 768px) {

  /* Set all major headings to mobile friendly sizes */
  .service-name {
    font-size: 2.2rem !important;
    line-height: 1.25 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .service-heading {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  .expert-services-title,
  .marketing-heading,
  .pricing-title,
  .comparison-heading,
  .process-title,
  .stats-title,
  .faq-main-title,
  .related-title,
  .cta-heading,
  .form-title,
  .about-heading,
  .process-main-title,
  .contact-left .contact-title {
    font-size: 2rem !important;
    line-height: 1.25 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .service-hero-content {
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  /* Center Form & Remove Pseudo Overflow */
  .service-banner-form-wrap {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .service-banner-form {
    padding: 1.75rem 1.25rem !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .service-banner-form::before {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    border-radius: var(--radius-lg) !important;
  }

  /* Single-line Package Buttons */
  .btn-pricing-outline,
  .btn-pricing-solid {
    white-space: nowrap !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.82rem !important;
    min-width: 120px !important;
    display: inline-block !important;
    text-align: center !important;
  }

  /* Pricing & Comparison Tables Scrollability */
  .pricing-table-wrapper,
  .comparison-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  .pricing-table {
    min-width: 660px !important;
  }

  .comparison-table {
    min-width: 620px !important;
  }

  /* Hero Buttons Mobile Layout */
  .service-hero-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 1.5rem auto 0 !important;
    gap: 0.85rem !important;
  }

  .btn-quote,
  .btn-chat {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* CTA Section Mobile */
  .advanced-cta-box {
    padding: 2rem 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cta-inline-form {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .cta-inline-form .input-group {
    width: 100% !important;
  }

  .cta-submit-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Slider Heading Centering */
  .platform-logos-heading,
  .platform-logos-title,
  .platform-logos-wrapper h2 {
    text-align: center !important;
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
  }
}

/* --- 576px Breakpoint (Mobile Phones) --- */
@media (max-width: 576px) {

  .service-heading,
  .expert-services-title,
  .marketing-heading,
  .pricing-title,
  .comparison-heading,
  .process-title,
  .stats-title,
  .faq-main-title,
  .related-title,
  .cta-heading,
  .form-title,
  .about-heading,
  .process-main-title,
  .contact-left .contact-title {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }

  .service-text,
  .marketing-subtitle,
  .pricing-subtitle,
  .comparison-subtitle,
  .process-subtitle,
  .stats-subtitle {
    font-size: 0.95rem !important;
  }

  .expert-features {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
    text-align: left !important;
    max-width: 280px !important;
    margin: 0 auto !important;
  }
}

/* --- 380px Breakpoint (Small Mobile Phones) --- */
@media (max-width: 380px) {

  .service-heading,
  .expert-services-title,
  .marketing-heading,
  .pricing-title,
  .comparison-heading,
  .process-title,
  .stats-title,
  .faq-main-title,
  .related-title,
  .cta-heading,
  .form-title,
  .about-heading,
  .process-main-title,
  .contact-left .contact-title {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }

  .btn-submit-eye-catching {
    font-size: 0.85rem !important;
    padding: 0.85rem 0.5rem !important;
  }
}