/* ============================================================
    Mobile Responsiveness Styles for Square Trade
    Ensures all pages work properly on mobile devices
============================================================== */

/* Mobile Navigation Improvements */
@media (max-width: 991px) {
  /* Logo sizing */
  .logo-img {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
  }

  /* Navbar adjustments */
  .navbar-main {
    padding: 0.5rem 0 !important;
    min-height: 60px !important;
  }

  .navbar-brand {
    margin-right: 1rem !important;
  }

  /* Right navigation */
  .right-nav {
    gap: 0.25rem;
  }

  .right-nav .btn {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.75rem !important;
  }

  /* Mobile offcanvas */
  .offcanvas {
    width: 280px !important;
    max-width: 90vw !important;
  }

  .offcanvas-header {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #e0e0e0;
  }

  .offcanvas-body {
    padding: 1.5rem !important;
  }

  .offcanvas-body .navbar-nav {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .offcanvas-body .nav-link {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem !important;
    color: #000000 !important;
  }

  .offcanvas-body .nav-link:hover {
    color: #0066cc !important;
    background-color: rgba(0, 169, 255, 0.1);
  }

  /* Navbar toggler */
  .navbar-toggler {
    border: 1px solid #00a9ff !important;
    color: #00a9ff !important;
    padding: 0.5rem !important;
  }

  .navbar-toggler:hover {
    background-color: #00a9ff !important;
    color: white !important;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile */
  .logo-img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
  }

  .navbar-main {
    padding: 0.4rem 0 !important;
    min-height: 55px !important;
  }

  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .navbar-brand {
    margin-right: 0.5rem !important;
  }

  .right-nav .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
}

/* Prevent horizontal scrolling */
body {
  overflow-x: hidden !important;
}

.container-fluid {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Mobile SVG Animation Keyframes */
@keyframes mobileFloat {
  0%, 100% {
    transform: translateY(0px) scale(0.7);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-10px) scale(0.75);
    opacity: 0.8;
  }
}

@keyframes mobileSparkle {
  0%, 100% {
    transform: scale(0.7) rotate(0deg);
    opacity: 0.6;
    filter: brightness(1);
  }
  25% {
    transform: scale(0.8) rotate(5deg);
    opacity: 0.8;
    filter: brightness(1.2);
  }
  50% {
    transform: scale(0.75) rotate(-5deg);
    opacity: 1;
    filter: brightness(1.5);
  }
  75% {
    transform: scale(0.8) rotate(3deg);
    opacity: 0.8;
    filter: brightness(1.2);
  }
}

@keyframes mobilePulse {
  0%, 100% {
    transform: scale(0.7);
    opacity: 0.6;
  }
  50% {
    transform: scale(0.8);
    opacity: 0.9;
  }
}

/* Ensure SVG icons and images are fully visible on mobile */
@media (max-width: 991px) {
  /* Banner section mobile fixes */
  .banner-one-section {
    overflow: visible !important;
    min-height: auto !important;
    padding: 3rem 0 !important;
  }
  
  .banner-img {
    overflow: visible !important;
    margin-top: 4rem !important;
  }
  
  .banner-img img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
  
  /* About section mobile fixes */
  .about-section {
    overflow: visible !important;
    padding: 3rem 0 !important;
  }
  
  .about-img {
    overflow: visible !important;
    margin-top: 3rem !important;
  }
  
  .about-img img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
  
  /* SVG icons visibility */
  svg {
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  /* Show SVG shape elements on mobile with animations */
  .shape-icon,
  .about-shape,
  .why-choose-shape,
  .testimonial-shape,
  .events-shape,
  .blog-shape,
  .trade-shape,
  .call-shape,
  .testimonials-shape {
    display: block !important;
    opacity: 0.6 !important;
    transform: scale(0.7) !important;
    margin-top: 2rem !important;
  }
  
  /* Mobile-specific SVG animations */
  .shape-icon img,
  .about-shape img,
  .why-choose-shape img,
  .testimonial-shape img,
  .events-shape img,
  .blog-shape img,
  .trade-shape img,
  .call-shape img,
  .testimonials-shape img {
    animation: mobileFloat 3s ease-in-out infinite !important;
    transition: all 0.3s ease !important;
  }
  
  /* Different animation delays for variety */
  .shape-icon img:nth-child(1),
  .about-shape img:nth-child(1),
  .why-choose-shape img:nth-child(1),
  .testimonial-shape img:nth-child(1),
  .events-shape img:nth-child(1),
  .blog-shape img:nth-child(1),
  .trade-shape img:nth-child(1),
  .call-shape img:nth-child(1),
  .testimonials-shape img:nth-child(1) {
    animation-delay: 0s !important;
  }
  
  .shape-icon img:nth-child(2),
  .about-shape img:nth-child(2),
  .why-choose-shape img:nth-child(2),
  .testimonial-shape img:nth-child(2),
  .events-shape img:nth-child(2),
  .blog-shape img:nth-child(2),
  .trade-shape img:nth-child(2),
  .call-shape img:nth-child(2),
  .testimonials-shape img:nth-child(2) {
    animation-delay: 1s !important;
  }
  
  .shape-icon img:nth-child(3),
  .about-shape img:nth-child(3),
  .why-choose-shape img:nth-child(3),
  .testimonial-shape img:nth-child(3),
  .events-shape img:nth-child(3),
  .blog-shape img:nth-child(3),
  .trade-shape img:nth-child(3),
  .call-shape img:nth-child(3),
  .testimonials-shape img:nth-child(3) {
    animation-delay: 2s !important;
  }
  
  /* Sparkle animation for star elements */
  .shape-icon img[src*="star"],
  .about-shape img[src*="star"],
  .why-choose-shape img[src*="star"],
  .testimonial-shape img[src*="star"],
  .events-shape img[src*="star"],
  .blog-shape img[src*="star"],
  .trade-shape img[src*="star"],
  .call-shape img[src*="star"],
  .testimonials-shape img[src*="star"] {
    animation: mobileSparkle 2s ease-in-out infinite !important;
  }
  
  /* Pulse animation for calculator and chart elements */
  .shape-icon img[src*="calculator"],
  .shape-icon img[src*="chart"],
  .about-shape img[src*="calculator"],
  .about-shape img[src*="chart"],
  .why-choose-shape img[src*="calculator"],
  .why-choose-shape img[src*="chart"],
  .testimonial-shape img[src*="calculator"],
  .testimonial-shape img[src*="chart"],
  .events-shape img[src*="calculator"],
  .events-shape img[src*="chart"],
  .blog-shape img[src*="calculator"],
  .blog-shape img[src*="chart"],
  .trade-shape img[src*="calculator"],
  .trade-shape img[src*="chart"],
  .call-shape img[src*="calculator"],
  .call-shape img[src*="chart"],
  .testimonials-shape img[src*="calculator"],
  .testimonials-shape img[src*="chart"] {
    animation: mobilePulse 2.5s ease-in-out infinite !important;
  }
  
  /* Special positioning for mobile to ensure visibility */
  .banner-one-section .shape-icon img:first-child {
    left: -50px !important;
    top: -35px !important;
  }
  
  .banner-one-section .shape-icon img:nth-child(2) {
    left: 45% !important;
    bottom: -15% !important;
  }
  
  .banner-one-section .shape-icon img:nth-child(3) {
    right: -20px !important;
    top: -5% !important;
  }
  
  .about-shape img:first-child {
    right: -5% !important;
    top: 10% !important;
  }
  
  .about-shape img:last-child {
    bottom: 15% !important;
    left: -10% !important;
  }
  
  .why-choose-shape img:first-child {
    right: -5% !important;
    top: 10% !important;
  }
  
  .why-choose-shape img:last-child {
    bottom: 15% !important;
    left: -10% !important;
  }
  
  .testimonial-shape img:first-child {
    right: -10% !important;
    top: 5% !important;
  }
  
  .testimonial-shape img:last-child {
    bottom: -10% !important;
    left: -10% !important;
  }
  
  .events-shape img:first-child {
    left: -8% !important;
    top: 8% !important;
  }
  
  .events-shape img:last-child {
    right: -10% !important;
    bottom: 3% !important;
  }
  
  .blog-shape img:first-child {
    left: -8% !important;
    top: 8% !important;
  }
  
  .blog-shape img:last-child {
    right: -10% !important;
    bottom: 3% !important;
  }
  
  .trade-shape img:first-child {
    left: -8% !important;
    top: 5% !important;
  }
  
  .trade-shape img:last-child {
    right: -5% !important;
    bottom: 0% !important;
  }
  
  .call-shape img {
    bottom: 25px !important;
    left: 45% !important;
  }
  
  .testimonials-shape img:first-child {
    right: -8% !important;
    top: 5% !important;
  }
  
  .testimonials-shape img:last-child {
    bottom: -8% !important;
    left: -8% !important;
  }
}

/* Mobile fixes for smaller screens */
@media (max-width: 767px) {
  .banner-one-section {
    padding: 2rem 0 !important;
  }
  
  .about-section {
    padding: 2rem 0 !important;
  }
  
  .banner-img {
    margin-top: 3rem !important;
  }
  
  .about-img {
    margin-top: 2.5rem !important;
  }
  
  .banner-img img,
  .about-img img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
  
  /* SVG animations margin for smaller screens */
  .shape-icon,
  .about-shape,
  .why-choose-shape,
  .testimonial-shape,
  .events-shape,
  .blog-shape,
  .trade-shape,
  .call-shape,
  .testimonials-shape {
    margin-top: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .banner-one-section {
    padding: 1.5rem 0 !important;
  }
  
  .about-section {
    padding: 1.5rem 0 !important;
  }
  
  .banner-img {
    margin-top: 2.5rem !important;
  }
  
  .about-img {
    margin-top: 2rem !important;
  }
  
  /* SVG animations margin for extra small screens */
  .shape-icon,
  .about-shape,
  .why-choose-shape,
  .testimonial-shape,
  .events-shape,
  .blog-shape,
  .trade-shape,
  .call-shape,
  .testimonials-shape {
    margin-top: 1rem !important;
  }
}

  /* Images visibility */
  img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Banner images */
  .banner-img img,
  .hero-img img,
  .banner_content img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Icon containers */
  .icon,
  .icon-container,
  .feature-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  /* Star icons */
  .star-icon {
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  /* Shape icons */
  .shape-icon,
  .about-shape,
  .why-choose-shape,
  .testimonial-shape,
  .events-shape,
  .blog-shape,
  .trade-shape {
    overflow: visible !important;
  }

  .shape-icon img,
  .about-shape img,
  .why-choose-shape img,
  .testimonial-shape img,
  .events-shape img,
  .blog-shape img,
  .trade-shape img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

@media (max-width: 767px) {
  /* Smaller mobile adjustments */
  .star-icon {
    width: 18px !important;
    height: 18px !important;
  }

  .section-title-with-stars .star-icon {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile adjustments */
  .star-icon {
    width: 15px !important;
    height: 15px !important;
  }

  .section-title-with-stars .star-icon {
    width: 14px !important;
    height: 14px !important;
  }
}

/* Page Header/Hero Section Responsiveness */
@media (max-width: 991px) {
  .page-header {
    padding: 6rem 0 4rem !important;
    min-height: 50vh !important;
  }

  .page-title {
    font-size: 3rem !important;
    line-height: 1.1 !important;
  }

  .page-subtitle {
    font-size: 1.2rem !important;
    margin-bottom: 2rem !important;
  }

  .section-title-with-stars .star-icon {
    width: 25px !important;
    height: 25px !important;
  }
}

@media (max-width: 767px) {
  .page-header {
    padding: 4rem 0 3rem !important;
    min-height: 40vh !important;
  }

  .page-title {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
  }

  .page-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  .section-title-with-stars {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .section-title-with-stars .star-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .breadcrumb {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 576px) {
  .page-header {
    padding: 3rem 0 2rem !important;
    min-height: 35vh !important;
  }

  .page-title {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }

  .page-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
  }

  .section-title-with-stars .star-icon {
    width: 15px !important;
    height: 15px !important;
  }

  .breadcrumb {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
  }
}

/* Content Responsiveness */
@media (max-width: 991px) {
  /* Section spacing */
  .py-60 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  h3 {
    font-size: 1.75rem !important;
  }

  h4 {
    font-size: 1.5rem !important;
  }

  /* Cards */
  .card-item,
  .event-card,
  .blog-card,
  .testimonial-card {
    margin-bottom: 1.5rem !important;
    padding: 1.5rem !important;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 767px) {
  /* Small mobile */
  .py-60 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Typography */
  h1 {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }

  h2 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  h4 {
    font-size: 1.25rem !important;
  }

  p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }

  /* Buttons */
  .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
  }

  /* Cards */
  .card-item,
  .event-content,
  .blog-content {
    padding: 1rem !important;
  }

  /* Section titles with stars */
  .section-title-with-stars {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .section-title-with-stars .star-icon {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile */
  .py-60 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Typography */
  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  h4 {
    font-size: 1.1rem !important;
  }

  p {
    font-size: 0.85rem !important;
  }

  /* Cards */
  .card-item,
  .event-content,
  .blog-content {
    padding: 0.75rem !important;
  }

  /* Buttons */
  .btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
  }

  /* Flex adjustments */
  .d-flex.gap-4 {
    gap: 1rem !important;
  }

  .d-flex.flex-wrap {
    flex-direction: column !important;
  }

  .d-flex.flex-wrap .btn {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
}

/* Grid system adjustments */
.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.col-lg-6,
.col-xl-6,
.col-md-6,
.col-sm-6 {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

@media (max-width: 576px) {
  .col-lg-6,
  .col-xl-6,
  .col-md-6,
  .col-sm-6 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* Form responsiveness */
@media (max-width: 767px) {
  .form-control {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .form-label {
    font-size: 0.9rem !important;
  }
}

/* Table responsiveness */
@media (max-width: 767px) {
  .table-responsive {
    font-size: 0.8rem !important;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.25rem !important;
  }
}

/* Modal responsiveness */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }

  .modal-content {
    border-radius: 0.5rem !important;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem !important;
  }
}

/* Footer responsiveness */
@media (max-width: 767px) {
  .footer-area {
    text-align: center !important;
  }

  .footer-area .row > div {
    margin-bottom: 2rem !important;
  }

  .footer-area h5,
  .footer-area h4 {
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
  }

  .footer-area p,
  .footer-area a {
    font-size: 0.9rem !important;
  }
}

/* Utility classes for mobile */
@media (max-width: 767px) {
  .text-center-mobile {
    text-align: center !important;
  }

  .d-none-mobile {
    display: none !important;
  }

  .d-block-mobile {
    display: block !important;
  }

  .w-100-mobile {
    width: 100% !important;
  }

  .mb-mobile-3 {
    margin-bottom: 1rem !important;
  }

  .mt-mobile-3 {
    margin-top: 1rem !important;
  }
}

/* Print styles */
@media print {
  .navbar-main,
  .offcanvas,
  .btn,
  .footer-area {
    display: none !important;
  }

  body {
    font-size: 12pt !important;
    line-height: 1.4 !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
  }
}
