/* VolgaPay Responsive Styles */

/* ===== Mobile-Friendly Overflow Control ===== */
/* Using overflow-x: clip instead of hidden to prevent scroll blocking */
html {
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  overflow-x: clip;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

/* Ensure all media stays within bounds */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Ensure no element escapes viewport */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Row fix to prevent overflow from negative margins */
.row {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.row > * {
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  max-width: 100%;
}

/* ===== Extra Large Devices (1400px and up) ===== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ===== Large Devices (1200px and up) ===== */
@media (max-width: 1399px) {
  .Hero {
    padding: 60px 0 100px;
  }
  
  .hero-image {
    max-width: 90%;
  }
}

/* ===== Medium-Large Devices (992px to 1199px) ===== */
@media (max-width: 1199px) {
  h1 {
    font-size: 48px;
    line-height: 1.15;
  }
  
  h2 {
    font-size: 36px;
    line-height: 1.25;
  }
  
  .Hero {
    padding: 40px 0 80px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .stat-item h3 {
    font-size: 24px;
  }
  
  .feature-card {
    padding: 32px 24px;
  }
  
  .step-card {
    padding: 32px 24px;
  }
  
  .pricing-card {
    padding: 40px 32px;
  }
  
  .pricing-rate {
    font-size: 60px;
  }
}

/* ===== Tablet Devices (768px to 991px) ===== */
@media (max-width: 991px) {
  /* Mobile Header - Language Switcher Always Visible */
  .navbar {
    position: relative;
  }
  
  .navbar .container-fluid {
    flex-wrap: nowrap;
    gap: 10px;
  }
  
  /* Keep language dropdown in navbar, always visible */
  #mainLangDropdown {
    order: 2;
    flex-shrink: 0;
  }
  
  .lang-dropdown-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .lang-dropdown-btn i.fa-globe {
    font-size: 14px;
  }
  
  .lang-dropdown-btn span {
    font-size: 12px;
  }
  
  .lang-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 140px;
  }
  
  /* Hamburger button */
  .navbar-toggler {
    order: 3;
  }
  
  /* Logo first */
  .nav-logo {
    order: 1;
    flex: 1;
  }
  
  /* Mobile Navigation */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    order: 4;
    width: 100%;
  }
  
  .nav-items-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .nav-link-custom {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
  }
  
  .nav-link-custom:hover {
    background: var(--bg-card-hover);
  }
  
  .hover2 {
    width: 100%;
    text-align: center;
  }
  
  h1 {
    font-size: 40px;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 32px;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 26px;
  }
  
  h4 {
    font-size: 22px;
  }
  
  h5 {
    font-size: 18px;
  }
  
  .Hero {
    padding: 40px 0 60px;
    text-align: center;
  }
  
  .Hero .col-lg-7 {
    margin-bottom: 40px;
  }
  
  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .trust-indicators {
    text-align: center;
  }
  
  .trust-indicators .d-flex {
    justify-content: center;
  }
  
  .hero-visual {
    margin-top: 20px;
  }
  
  .hero-image {
    max-width: 70%;
  }
  
  .ValueProp,
  .Features,
  .HowItWorks,
  .Integrations,
  .Benefits,
  .Security,
  .Pricing,
  .FAQs,
  .FinalCTA {
    padding: 80px 0;
  }
  
  .Integrations .col-lg-6:first-child {
    margin-bottom: 40px;
    text-align: center;
  }
  
  .integration-list {
    display: inline-block;
    text-align: left;
  }
  
  .Integrations .hover1 {
    margin-bottom: 40px;
  }
  
  .integration-visual img {
    max-width: 60%;
  }
  
  .Security .col-lg-6.order-lg-2 {
    margin-bottom: 40px;
    text-align: center;
  }
  
  .security-list {
    display: inline-block;
    text-align: left;
  }
  
  .security-visual img {
    max-width: 60%;
  }
  
  footer .row {
    text-align: center;
  }
  
  .footer-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .social-links {
    justify-content: center;
    margin-bottom: 40px;
  }
  
  .footer-title {
    margin-top: 20px;
  }
}

/* ===== Mobile Devices (576px to 767px) ===== */
@media (max-width: 767px) {
  h1 {
    font-size: 32px;
    line-height: 1.25;
  }
  
  h2 {
    font-size: 28px;
    line-height: 1.35;
  }
  
  h3 {
    font-size: 24px;
  }
  
  h4 {
    font-size: 20px;
  }
  
  h5 {
    font-size: 16px;
  }
  
  p {
    font-size: 15px;
  }
  
  .nav-logo img {
    width: 130px;
  }
  
  .hover1,
  .hover2 {
    padding: 14px 24px;
    font-size: 15px;
  }
  
  .Hero {
    padding: 30px 0 50px;
  }
  
  .hero-subtitle {
    font-size: 15px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-cta .hover1,
  .hero-cta .hover2 {
    width: 100%;
    max-width: 280px;
  }
  
  .stat-item {
    text-align: center;
  }
  
  .stat-item h3 {
    font-size: 22px;
  }
  
  .stat-item p {
    font-size: 12px;
  }
  
  .hero-image {
    max-width: 80%;
  }
  
  .ValueProp,
  .Features,
  .HowItWorks,
  .Integrations,
  .Benefits,
  .Security,
  .Pricing,
  .FAQs,
  .FinalCTA {
    padding: 60px 0;
  }
  
  .value-desc {
    font-size: 16px;
  }
  
  .feature-card {
    padding: 28px 20px;
  }
  
  .feature-icon {
    width: 48px;
    height: 48px;
  }
  
  .feature-icon i {
    font-size: 20px;
  }
  
  .step-card {
    padding: 28px 20px;
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .integration-desc {
    font-size: 16px;
  }
  
  .integration-list li {
    font-size: 15px;
    padding: 10px 0;
  }
  
  .integration-visual img {
    max-width: 80%;
  }
  
  .benefit-item {
    padding: 20px;
  }
  
  .benefit-item i {
    font-size: 20px;
  }
  
  .benefit-item h6 {
    font-size: 15px;
  }
  
  .security-list li {
    font-size: 16px;
    padding: 14px 0;
  }
  
  .security-visual img {
    max-width: 80%;
  }
  
  .pricing-card {
    padding: 32px 24px;
  }
  
  .pricing-rate {
    font-size: 48px;
  }
  
  .pricing-desc {
    font-size: 16px;
  }
  
  .pricing-features li {
    font-size: 15px;
    padding: 10px 0;
  }
  
  .accordion-button {
    font-size: 16px;
    padding: 20px 0;
  }
  
  .accordion-body p {
    font-size: 15px;
  }
  
  .cta-desc {
    font-size: 16px;
  }
  
  footer {
    padding: 60px 0 0;
  }
  
  .footer-bottom {
    margin-top: 40px;
  }
  
  .scrollToTop {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
  }
  
  .scrollToTop .arrowUp {
    font-size: 16px;
  }
}

/* ===== Small Mobile Devices (up to 575px) ===== */
@media (max-width: 575px) {
  h1 {
    font-size: 28px;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 24px;
    line-height: 1.4;
  }
  
  h3 {
    font-size: 20px;
  }
  
  h4 {
    font-size: 18px;
  }
  
  .nav-logo img {
    width: 110px;
  }
  
  .hover1,
  .hover2 {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .Hero {
    padding: 20px 0 40px;
  }
  
  .trust-indicators .d-flex.gap-4 {
    gap: 16px !important;
  }
  
  .stat-item h3 {
    font-size: 20px;
  }
  
  .ValueProp,
  .Features,
  .HowItWorks,
  .Integrations,
  .Benefits,
  .Security,
  .Pricing,
  .FAQs,
  .FinalCTA {
    padding: 50px 0;
  }
  
  .feature-card,
  .step-card {
    padding: 24px 18px;
  }
  
  .benefit-item {
    padding: 16px;
    gap: 12px;
  }
  
  .benefit-item i {
    font-size: 18px;
  }
  
  .benefit-item h6 {
    font-size: 14px;
  }
  
  .pricing-card {
    padding: 28px 20px;
  }
  
  .pricing-rate {
    font-size: 40px;
  }
  
  .accordion-button {
    font-size: 15px;
    padding: 16px 0;
  }
  
  footer {
    padding: 50px 0 0;
  }
  
  .footer-logo img {
    width: 120px;
  }
  
  .social-links a {
    width: 36px;
    height: 36px;
  }
}

/* ===== Animations - Reduce Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Mobile Containment - Extra Safeguards ===== */
@media (max-width: 991px) {
  /* Ensure container doesn't overflow - use clip instead of hidden */
  .container,
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: clip;
  }
  
  /* Fix any potential absolute positioned elements */
  .hero-visual,
  .integration-visual,
  .security-visual {
    overflow: clip;
    max-width: 100%;
  }
  
  /* Ensure text doesn't cause overflow */
  h1, h2, h3, h4, h5, h6, p, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Fix potential flexbox overflow */
  .d-flex {
    flex-wrap: wrap;
  }
  
  /* Ensure smooth vertical scrolling */
  html, body {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
}

@media (max-width: 575px) {
  /* Extra small devices - tighter containment */
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Ensure cards don't overflow */
  .feature-card,
  .step-card,
  .pricing-card,
  .benefit-item {
    max-width: 100%;
    overflow: hidden;
  }
}

/* ===== Print Styles ===== */
@media print {
  .scrollToTop,
  .hover1,
  .hover2 {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #000;
  }
  
  p {
    color: #333;
  }
}
