/* Mobile Responsive Fixes for Excelguru Website */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

/* Ensure proper viewport handling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Container fixes */
.ast-container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Header Mobile Fixes */
@media (max-width: 768px) {
    /* Mobile header adjustments */
    .site-header {
        position: relative;
        z-index: 999;
    }
    
    .main-header-bar {
        padding: 10px 12px;
        background: #ffffff;
        border-bottom: 1px solid #eaeaea;
    }
    
    /* Logo and site title mobile fixes */
    .ast-site-identity {
        padding: 0.5em 0;
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .site-logo-img img {
        max-height: 40px;
        width: auto;
    }
    
    .site-title {
        font-size: 1.1em;
        line-height: 1.2;
        font-weight: 700;
        color: #000000;
    }

    .site-title a { color: #000000; text-decoration: none; }
    
    /* Mobile menu fixes */
    .ast-header-break-point .main-header-bar-navigation {
        width: 100%;
        margin: 0;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .ast-header-break-point .main-navigation ul .menu-item .menu-link {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        font-size: 16px;
    }
    
    /* Mobile header layout per screenshot: logo + title left, hamburger right */
    .site-header .site-primary-header-wrap .ast-builder-grid-row {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .site-header .site-header-section-left,
    .site-header .site-header-section-right {
        display: flex;
        align-items: center;
    }

    /* Ensure our global stacking rule does not affect header */
    .site-header .ast-flex { flex-direction: row !important; }

    /* Do NOT override Astra's internal arrow toggle; keep defaults */
    .site-header .ast-menu-toggle {
        margin-left: auto;
        background: transparent;
        border: 0;
        padding: 0;
        width: auto;
        height: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .site-header .ast-menu-toggle .ast-arrow-svg { display: inline; }
    .site-header .ast-menu-toggle::before { content: none; }
}

/* Content Area Mobile Fixes */
@media (max-width: 768px) {
    /* Main content adjustments */
    #primary {
        margin: 2em 0;
    }
    
    .entry-content {
        padding: 0 15px;
    }
    
    /* Typography mobile fixes */
    h1, .entry-content h1 {
        font-size: 1.8em;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h2, .entry-content h2 {
        font-size: 1.5em;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h3, .entry-content h3 {
        font-size: 1.3em;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 1.2em;
    }
}

/* Elementor Mobile Fixes */
@media (max-width: 768px) {
    /* Elementor container fixes */
    .elementor-container {
        padding: 0 15px;
    }
    
    .elementor-row {
        margin: 0;
    }
    
    .elementor-column {
        width: 100% !important;
        margin-bottom: 20px;
    }
    
    /* Elementor widget spacing */
    .elementor-widget {
        margin-bottom: 20px;
    }
    
    /* Image responsive fixes */
    .elementor-image img,
    .elementor-widget-image img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Button mobile fixes */
    .elementor-button,
    .ast-custom-button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 16px;
        margin-bottom: 10px;
    }
}

/* Grid and Flexbox Mobile Fixes */
@media (max-width: 768px) {
    .ast-builder-grid-row {
        grid-template-columns: 1fr;
        grid-gap: 10px;
    }
    
    .ast-flex {
        flex-direction: column;
    }
    
    .ast-flex.stack-on-mobile {
        flex-direction: column;
    }
    
    .ast-flex.stack-on-mobile > * {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Form Mobile Fixes */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 15px;
    }
    
    button,
    input[type="submit"],
    input[type="button"] {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 4px;
        cursor: pointer;
    }
}

/* Navigation Mobile Fixes */
@media (max-width: 768px) {
    /* Sub-menu mobile fixes */
    .main-header-menu .sub-menu {
        position: static;
        width: 100%;
        background: #f9f9f9;
        box-shadow: none;
        visibility: visible;
        left: auto;
    }
    
    .main-header-menu .sub-menu .menu-link {
        padding-left: 40px;
        background: #f5f5f5;
    }
    
    /* Menu item spacing */
    .main-header-menu .menu-item {
        border-bottom: 1px solid #eee;
    }
    
    .main-header-menu .menu-item:last-child {
        border-bottom: none;
    }
}

/* Footer Mobile Fixes */
@media (max-width: 768px) {
    .site-footer {
        padding: 20px 0;
        text-align: center;
    }
    
    .site-footer-section {
        flex-direction: column;
        align-items: center;
    }
    
    .site-footer-section > * {
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
    }
    
    .footer-nav-wrap .astra-footer-horizontal-menu {
        flex-direction: column;
    }
    
    .footer-nav-wrap .astra-footer-horizontal-menu li {
        margin: 5px 0;
    }
}

/* Image and Media Mobile Fixes */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    .wp-video,
    .wp-audio-shortcode {
        max-width: 100%;
    }
    
    iframe {
        max-width: 100%;
    }
}

/* Table Mobile Fixes */
@media (max-width: 768px) {
    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }
    
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
    }
    
    td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
}

/* Utility Classes for Mobile */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-visible {
        display: block !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-no-margin {
        margin: 0 !important;
    }
    
    .mobile-no-padding {
        padding: 0 !important;
    }
}

/* Tablet Specific Fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    .ast-container {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .elementor-container {
        padding: 0 30px;
    }
    
    .elementor-column {
        margin-bottom: 30px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .ast-container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .site-title {
        font-size: 1em;
    }
    
    .main-header-menu .menu-link {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    h1, .entry-content h1 {
        font-size: 1.5em;
    }
    
    h2, .entry-content h2 {
        font-size: 1.3em;
    }
    
    h3, .entry-content h3 {
        font-size: 1.2em;
    }
    
    p {
        font-size: 14px;
    }
}

/* Global: hide social media links and icon containers site-wide */
a[href*="facebook.com"],
a[href*="instagram.com"],
a[href*="linkedin.com"],
a[href*="twitter.com"],
a[href*="x.com"],
a[href*="youtube.com"],
a[href*="wa.me"],
a[href*="t.me"],
.ast-social-container,
.social-icons,
.site-footer .social-menu,
.elementor-social-icons,
.menu-item a[href*="facebook.com"],
.menu-item a[href*="instagram.com"],
.menu-item a[href*="linkedin.com"],
.menu-item a[href*="twitter.com"],
.menu-item a[href*="x.com"],
.menu-item a[href*="youtube.com"],
.menu-item a[href*="wa.me"],
.menu-item a[href*="t.me"] {
  display: none !important;
  visibility: hidden !important;
}

/* Fix for hidden mobile elements */
@media (max-width: 768px) {
    .elementor-hidden-mobile {
        display: none !important;
    }
    
    .elementor-hidden-tablet {
        display: block !important;
    }
    
    .elementor-hidden-desktop {
        display: block !important;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Larger touch targets */
    a, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better focus indicators */
    a:focus, button:focus, input:focus, textarea:focus {
        outline: 2px solid #0073aa;
        outline-offset: 2px;
    }
}

/* Remove top blue header bar across site (desktop + mobile) */
#masthead,
.ast-main-header-wrap,
.main-header-bar-wrap,
.ast-primary-header-bar,
.main-header-bar,
.site-header,
.site-primary-header-wrap,
#ast-desktop-header,
.ast-mobile-header-wrap {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Extra header wrappers to ensure no residual backgrounds */
.ast-above-header-bar,
.ast-below-header-bar,
.ast-desktop-header,
.ast-mobile-header,
.site-header .ast-primary-header,
.site-header .ast-above-header,
.site-header .ast-below-header {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Astra mobile breakpoint: force header backgrounds off */
.ast-header-break-point #masthead,
.ast-header-break-point .main-header-bar,
.ast-header-break-point .main-header-bar-wrap,
.ast-header-break-point .ast-primary-header-bar,
.ast-header-break-point .site-primary-header-wrap,
.ast-header-break-point .ast-mobile-header-wrap {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Remove pseudo-element decorations that can appear as a colored strip */
.site-header::before,
.site-header::after,
.main-header-bar::before,
.main-header-bar::after,
.ast-primary-header-bar::before,
.ast-primary-header-bar::after {
  content: none !important;
  background: transparent !important;
  background-image: none !important;
}

/* Direct mobile header containers */
#ast-mobile-header,
.ast-mobile-header-content,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-mobile-header-wrap .site-primary-header-wrap,
.ast-mobile-header-wrap .main-header-bar,
.ast-mobile-header-wrap .main-header-bar-wrap {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Header grid rows */
.site-primary-header-wrap .ast-builder-grid-row,
.ast-mobile-header-wrap .ast-builder-grid-row {
  background: transparent !important;
  background-image: none !important;
}

/* Sticky/transparent header states */
.ast-sticky-header-shrink #masthead,
.ast-sticky-header-shrink .main-header-bar,
.ast-sticky-header-shrink .ast-primary-header-bar,
.ast-sticky-header-active #masthead,
.ast-sticky-header-active .main-header-bar,
.ast-sticky-header-active .ast-primary-header-bar,
.ast-theme-transparent-header #masthead,
.ast-theme-transparent-header .main-header-bar,
.ast-transparent-header #masthead,
.ast-transparent-header .main-header-bar {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Ensure no gradient variables leak through */
#masthead,
.main-header-bar,
.ast-primary-header-bar {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Mobile menu toggle button: remove outline/background that can show blue strip */
.ast-header-break-point .menu-toggle,
.ast-header-break-point .ast-mobile-menu-trigger-fill.menu-toggle,
.ast-mobile-header-wrap .menu-toggle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.ast-header-break-point .menu-toggle:focus-visible,
.ast-mobile-header-wrap .menu-toggle:focus-visible {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 2px dotted #2979ff !important;
  outline-offset: 2px !important;
}

/* Prevent hover/active from showing outlines */
.ast-header-break-point .menu-toggle:hover,
.ast-header-break-point .menu-toggle:active,
.ast-mobile-header-wrap .menu-toggle:hover,
.ast-mobile-header-wrap .menu-toggle:active {
  outline: none !important;
}

/* Restore hamburger icon while keeping button transparent */
.ast-header-break-point .menu-toggle,
.ast-mobile-header-wrap .menu-toggle {
  position: relative;
  width: 24px;
  height: 18px;
  padding: 0;
  color: #2979ff; /* blue icon to match screenshot */
}

.ast-header-break-point .menu-toggle::before,
.ast-header-break-point .menu-toggle::after,
.ast-mobile-header-wrap .menu-toggle::before,
.ast-mobile-header-wrap .menu-toggle::after {
  content: "" !important;
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background-color: currentColor;
}

.ast-header-break-point .menu-toggle::before,
.ast-mobile-header-wrap .menu-toggle::before {
  top: 0;
  box-shadow: 0 8px 0 0 currentColor; /* middle bar */
}

.ast-header-break-point .menu-toggle::after,
.ast-mobile-header-wrap .menu-toggle::after {
  top: 16px; /* bottom bar */
}

/* Mobile overlay menu styles */
.om-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.om-mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.om-mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  width: 78vw;
  max-width: 360px;
  background: #ffffff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.om-mobile-menu-overlay.open .om-mobile-menu-panel {
  transform: translateX(0);
}

.om-menu-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.om-mobile-nav {
  display: block;
  padding-top: 56px;
}

.om-mobile-nav a {
  display: block;
  padding: 14px 18px;
  font-size: 16px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.om-mobile-nav a:hover {
  background: #f7f7f7;
}

@media (min-width: 769px) {
  /* Do not show overlay on desktop */
  .om-mobile-menu-overlay { display: none; }
}

body.om-menu-open {
  overflow: hidden;
}

/* Layout refinements for mobile header: place hamburger on the right */
@media (max-width: 768px) {
  .site-header .site-primary-header-wrap .ast-builder-grid-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  .site-header .site-header-primary-section-left {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .site-header .site-header-primary-section-right {
    margin-left: auto !important;
    display: flex;
    align-items: center;
  }

  .site-header .site-header-primary-section-right .menu-toggle,
  .site-header .site-header-section-right .menu-toggle {
    margin-left: auto !important;
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header .site-title { margin-left: 8px; }
}
/* Mobile header card bar to match screenshot */
@media (max-width: 768px) {
  .site-primary-header-wrap .ast-builder-grid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap; /* keep logo, title, and icon on one line */
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
  }

  .site-header-primary-section-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  /* Branding block should flex and allow title to shrink */
  .ast-site-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0; /* allow ellipsis */
  }

  .site-logo-img { margin-right: 10px; }
  .site-logo-img img { max-height: 32px; width: auto; }

  .site-title {
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-title a { color: #111111; text-decoration: none; }

  .site-header .menu-toggle {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2979ff;
  }

  .ast-primary-header-bar,
  .main-header-bar { min-height: 56px; }
}

/* Position toggle to the right inside the header card; hide nav text on mobile */
@media (max-width: 768px) {
  /* Ensure only the header-card toggle is shown; hide stray toggles */
  .site-header .menu-toggle { display: none !important; }
  .site-primary-header-wrap .menu-toggle { display: inline-flex !important; }

  .site-primary-header-wrap .ast-builder-grid-row { position: relative; }

  .site-header .ast-menu-toggle {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2979ff !important;
    z-index: 2 !important;
  }

  /* Support pages that use the minimal mobile trigger */
  .site-header .menu-toggle.main-header-menu-toggle {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2979ff !important;
    z-index: 2 !important;
  }

  /* When the toggle is inside the left header section, align it to the right within that bar */
  .site-header .site-header-primary-section-left .menu-toggle {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-left: auto !important;
  }

  .site-header .main-header-bar-navigation .menu-link,
  .site-header .main-header-bar-navigation .menu-text,
  .site-header .main-header-bar-navigation .ast-header-navigation-arrow { display: none !important; }
}

/* Reviews: remove all testimonial/review images globally */
.elementor-widget-reviews .elementor-testimonial__image,
.elementor-widget-reviews .elementor-testimonial__image img,
.elementor-widget-testimonial-carousel .elementor-testimonial__image,
.elementor-widget-testimonial-carousel .elementor-testimonial__image img {
  display: none !important;
}

/* Optional: keep header aligned sans image */
.elementor-widget-reviews .elementor-testimonial__header,
.elementor-widget-testimonial-carousel .elementor-testimonial__header {
  align-items: center;
}