/* ===============================
   RESPONSIVE DESIGN
   Mobile-First Approach
================================= */

/* Tablet Devices (992px and below) */
@media (max-width: 992px) {
  :root {
    --section-padding: 100px;
    --card-padding: 35px;
  }

  /* Slow down animations on tablets */
  .particle {
    animation-duration: 40s !important;
  }

  .geometric-shape {
    opacity: 0.04;
  }

  /* Typography adjustments */
  .hero-slide h1 {
    font-size: 42px;
  }

  .about-header h2 {
    font-size: 36px;
  }

  /* Reduce blob sizes */
  .team-section::before,
  .team-section::after {
    width: 350px;
    height: 350px;
  }

  /* Mobile Menu Toggle Button Icon Change */
  .navbar-toggler {
    border: 2px solid rgba(13, 110, 253, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1060;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  }

  .navbar-toggler-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    position: relative;
    pointer-events: none;
  }

  /* Change to X icon when menu is active/open */
  .navbar-toggler.active .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d6efd'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    transform: rotate(90deg);
  }

  .navbar-toggler.active {
    border-color: rgba(13, 110, 253, 0.4);
    background: rgba(13, 110, 253, 0.05);
  }

  /* Mobile Menu Background - Not Transparent */
  .navbar-collapse {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-top: 15px !important;
    position: absolute !important;
    top: 100% !important;
    left: 15px !important;
    right: 15px !important;
    z-index: 1050 !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
  }

  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%) !important;
  }

  /* Mobile Menu Items Styling */
  .navbar-nav {
    gap: 0 !important;
  }

  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
  }

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

  .navbar-nav .nav-link {
    padding: 15px 15px !important;
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 0;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%) !important;
    color: #0d6efd !important;
    transform: translateX(5px);
  }

  /* Remove desktop hover effects in mobile */
  .navbar .nav-link::after {
    display: none !important;
  }

  .navbar .nav-link:hover {
    transform: none !important;
  }

  /* Get Started Button in Mobile Menu */
  .navbar-nav .btn-primary {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    padding: 12px 20px !important;
  }

  /* Mobile Menu Backdrop */
  .navbar-collapse.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    animation: fadeIn 0.3s ease;
    pointer-events: none;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Prevent body scroll when mobile menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  :root {
    --section-padding: 70px;
    --card-padding: 28px;
  }

  /* Hero Section */
  .hero-slider {
    height: 480px;
  }

  .hero-slide h1 {
    font-size: 32px;
  }

  .hero-slide p {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Slider Controls */
  .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .slider-arrow.prev {
    left: 15px;
  }

  .slider-arrow.next {
    right: 15px;
  }

  .slider-dots {
    bottom: 20px;
    gap: 8px;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
  }

  .slider-dot.active {
    width: 24px;
  }

  /* Testimonial Slider Controls */
  .testimonial-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .testimonial-arrow.prev {
    left: 10px;
  }

  .testimonial-arrow.next {
    right: 10px;
  }

  .testimonial-dots {
    gap: 8px;
  }

  .testimonial-dot {
    width: 10px;
    height: 10px;
  }

  .testimonial-dot.active {
    width: 24px;
  }

  /* Particles - Performance optimization */
  .particle:nth-child(4),
  .particle:nth-child(5) {
    display: none;
  }

  /* Geometric shapes */
  .geometric-shape.triangle {
    display: none;
  }

  .geometric-shape.circle,
  .geometric-shape.square {
    opacity: 0.03;
  }

  /* Section Padding */
  .about-section,
  .services-section,
  .ai-section,
  .team-section {
    padding: var(--section-padding-mobile) 0;
  }

  /* Typography */
  .about-header h2,
  .team-title,
  .services-header h2 {
    font-size: 28px;
  }

  .ai-header h2 {
    font-size: 26px;
  }

  .section-title {
    font-size: 32px;
  }

  /* Cards */
  .about-card,
  .service-card,
  .ai-card,
  .team-card {
    padding: var(--card-padding-mobile);
  }

  /* Floating blobs */
  .team-section::before,
  .team-section::after,
  .contact-section::before,
  .contact-section::after {
    width: 250px;
    height: 250px;
  }

  /* Disable transform hover effects for better mobile performance */
  .about-card:hover,
  .service-card:hover,
  .ai-card:hover,
  .team-card:hover {
    transform: none;
  }

  .service-card:hover .service-icon {
    transform: none;
  }

  /* Contact Form */
  .contact-card .form-control:focus {
    transform: none;
  }

  /* Scroll to top button */
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  /* Hero */
  .hero-slider {
    height: 400px;
  }

  .hero-slide h1 {
    font-size: 26px;
  }

  .hero-slide p {
    font-size: 14px;
  }

  /* Typography */
  .about-header h2,
  .team-title,
  .services-header h2 {
    font-size: 24px;
  }

  .section-title {
    font-size: 26px;
  }

  /* Hide additional particles for performance */
  .particle:nth-child(3) {
    display: none;
  }

  /* Extreme animation slowdown for low-end devices */
  .particle {
    animation-duration: 50s !important;
    opacity: 0.15;
  }

  .geometric-shape {
    animation-duration: 100s;
  }

  /* Contact form adjustments */
  .contact-card {
    padding: 25px;
  }

  /* Testimonial card */
  .testimonial-card {
    padding: 30px 20px;
  }
}

/* Large Screens (1400px and above) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero-slide h1 {
    font-size: 56px;
  }

  .about-header h2 {
    font-size: 48px;
  }

  .services-header h2,
  .team-title {
    font-size: 42px;
  }
}

/* Ultra-wide Screens (1920px and above) */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
}

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

  .particle,
  .geometric-shape {
    animation: none !important;
  }

  .hero-slide::before,
  .hero-slide::after {
    animation: none !important;
  }
}

/* ===============================
   BLOG RESPONSIVE STYLES
================================= */

/* Tablet Devices (992px and below) */
@media (max-width: 992px) {
  .blog-hero h1 {
    font-size: 42px;
  }

  .blog-hero p {
    font-size: 16px;
  }

  .blog-detail-article {
    padding: 50px 40px;
  }

  .blog-detail-header h1 {
    font-size: 36px;
  }

  .blog-detail-content h2 {
    font-size: 28px;
  }

  .blog-detail-content h3 {
    font-size: 22px;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  .blog-hero {
    padding: 110px 0 60px;
  }

  .blog-hero h1 {
    font-size: 34px;
  }

  .blog-hero p {
    font-size: 15px;
  }

  .blog-section {
    padding: 60px 0;
  }

  .blog-card {
    margin-bottom: 20px;
  }

  .blog-image {
    height: 200px;
  }

  .blog-content h3 {
    font-size: 20px;
  }

  .blog-detail-section {
    padding: 110px 0 60px;
  }

  .blog-detail-article {
    padding: 35px 25px;
  }

  .blog-detail-image {
    height: 300px;
  }

  .blog-detail-header h1 {
    font-size: 28px;
  }

  .blog-detail-meta {
    gap: 16px;
    font-size: 13px;
  }

  .blog-detail-content {
    font-size: 16px;
  }

  .blog-detail-content .lead {
    font-size: 18px;
  }

  .blog-detail-content h2 {
    font-size: 26px;
    margin-top: 36px;
  }

  .blog-detail-content h3 {
    font-size: 20px;
    margin-top: 28px;
  }

  .blog-quote {
    padding: 20px 24px;
    font-size: 16px;
  }

  .back-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: 28px;
  }

  .blog-hero p {
    font-size: 14px;
  }

  .blog-detail-article {
    padding: 25px 20px;
    border-radius: 12px;
  }

  .blog-detail-image {
    height: 250px;
  }

  .blog-detail-header h1 {
    font-size: 24px;
  }

  .blog-category-badge {
    font-size: 11px;
    padding: 6px 16px;
  }

  .blog-detail-content h2 {
    font-size: 22px;
  }

  .blog-detail-content h3 {
    font-size: 18px;
  }

  .blog-detail-content ul,
  .blog-detail-content ol {
    padding-left: 20px;
  }

  .blog-quote {
    padding: 18px 20px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero-slider,
  .slider-arrow,
  .slider-dots,
  .testimonial-arrow,
  .testimonial-dots,
  .scroll-to-top,
  .page-loader,
  .ws-footer,
  .back-button,
  .blog-category-badge {
    display: none !important;
  }

  .section,
  .blog-detail-article {
    page-break-inside: avoid;
  }

  .blog-detail-section {
    padding: 20px 0;
  }

  .blog-detail-article {
    box-shadow: none;
    padding: 0;
  }

  .blog-detail-image img {
    max-height: 400px;
    object-fit: contain;
  }
}
