/* ===== MANASYA INFOSOLUTIONS - RESPONSIVE CSS ===== */

/* Enhanced Responsive Design - Mobile-First Approach */

/* ===== DESKTOP FIRST OPTIMIZATIONS ===== */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
    padding: 0 3rem;
  }

  .hero-glass-container {
    padding: 4rem;
    max-width: 1000px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .industries-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 2.5rem;
  }

  .about-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

  section {
    padding: 10rem 0;
  }

  .theme-switcher {
    bottom: 3rem;
    right: 3rem;
  }

  .contact-form-container {
    padding: 3rem;
  }
}

/* ===== LARGE SCREENS ===== */
@media (min-width: 1200px) and (max-width: 1439px) {
  .hero-glass-container {
    padding: 3.5rem;
    max-width: 950px;
  }

  .process-content,
  .careers-content,
  .contact-content {
    gap: 5rem;
  }

  .about-container {
    gap: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }
}

/* ===== TABLET LANDSCAPE ===== */
@media (max-width: 1024px) {
  .nav-container {
    padding: 1rem 2rem;
  }

  .hero-content-center {
    padding: 1.5rem;
  }

  .hero-glass-container {
    padding: 2.5rem;
    max-width: 800px;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-divider {
    height: 30px;
  }

  /* Grid Layouts - Tablet */
  .about-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-3d-container {
    order: -1;
    height: 350px;
  }

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

  .process-visualization {
    height: 300px;
    position: static;
    order: -1;
  }

  .process-cards-container {
    max-height: none;
    overflow-y: visible;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-tertiary);
  }

  .process-cards-container::-webkit-scrollbar {
    height: 8px;
  }

  .process-cards-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
  }

  .process-cards-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
  }

  .process-card {
    min-width: 350px;
    flex-shrink: 0;
  }

  .careers-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .careers-3d-container {
    order: -1;
    height: 350px;
  }

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

  .contact-3d {
    order: -1;
    height: 350px;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
  }

  .industries-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
  }

  .about-features {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .careers-benefits {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  /* Theme Switcher - Tablet */
  .theme-switcher {
    bottom: 2rem;
    right: 2rem;
  }

  .theme-toggle-container {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  /* Form Enhancements - Tablet */
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .contact-form-container {
    padding: 2rem;
  }
}

/* ===== TABLET PORTRAIT & LARGE MOBILE ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .nav-container {
    padding: 1rem;
    height: 70px;
  }

  /* Navigation - Mobile */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.3s ease;
  }

  .hamburger:hover {
    background: rgba(139, 92, 246, 0.1);
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 1px;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px var(--shadow-color);
    z-index: 998;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    text-align: center;
  }

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

  .nav-cta {
    display: none;
  }

  /* Hero Section - Mobile */
  .hero {
    padding-top: 70px;
    min-height: 100vh;
  }

  .hero-glass-container {
    padding: 2rem;
    border-radius: 20px;
    margin: 1rem 0;
  }

  .hero-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .stat-item {
    padding: 0.75rem;
    min-width: 120px;
  }

  .stat-divider {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    justify-content: center;
    min-width: auto;
    padding: 1rem 1.5rem;
  }

  /* Sections - Mobile */
  section {
    padding: 5rem 0;
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .section-description {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    margin-bottom: 2.5rem;
  }

  .section-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  /* About Section - Mobile */
  .about-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-item {
    padding: 1.5rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .feature-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    margin: 0 auto;
  }

  /* Services - Mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .service-icon-3d {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
  }

  .service-features {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .service-price {
    margin-top: 1rem;
    font-size: 0.85rem;
  }

  .featured-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }

  /* Industries - Mobile */
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .industry-card {
    padding: 1.5rem 1rem;
  }

  .industry-3d {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
  }

  /* Process - Mobile */
  .process-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .process-visualization {
    height: 250px;
  }

  .process-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: visible;
    padding: 0;
  }

  .process-card {
    min-width: auto;
    padding: 1.5rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .process-number {
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
  }

  .process-number span {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .process-icon {
    font-size: 1.25rem;
  }

  /* Careers - Mobile */
  .careers-benefits {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .benefit-item {
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .benefit-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    margin: 0 auto;
  }

  .careers-positions {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
  }

  .position-item {
    padding: 1rem 0;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .career-cta-section {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  /* Contact - Mobile */
  .contact-methods {
    gap: 1rem;
  }

  .contact-method {
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .method-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    margin: 0 auto;
  }

  .contact-form {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }

  .form-group input,
  .form-group select,
  .contact-form textarea {
    padding: 0.7rem;
    font-size: 0.9rem;
  }

  .contact-form h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .form-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  /* Footer - Mobile */
  .footer {
    padding: 3rem 0 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-brand {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Theme Switcher - Mobile */
  .theme-switcher {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.25rem;
  }

  .theme-toggle-container {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .theme-toggle-track {
    width: 50px;
    height: 26px;
  }

  .theme-toggle-thumb {
    width: 20px;
    height: 20px;
    top: 1px;
    left: 1px;
  }

  .thumb-inner {
    font-size: 0.6rem;
  }

  [data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(24px);
  }

  .theme-label {
    font-size: 0.6rem;
  }

  /* Canvas Heights - Mobile */
  .hero-3d,
  .about-3d,
  .careers-3d,
  .contact-3d canvas,
  .process-3d {
    height: 250px;
  }

  /* Typography - Mobile */
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }

  .hero-description {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin-bottom: 2rem;
  }

  .stat-number {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }

  .stat-label {
    font-size: 0.75rem;
  }
}

/* ===== SMALL MOBILE DEVICES ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0.75rem;
    height: 60px;
  }

  .logo-image {
    width: 35px;
    height: 35px;
  }

  .logo-text h2 {
    font-size: 1.25rem;
  }

  .logo-subtitle {
    font-size: 0.65rem;
  }

  .nav-menu {
    top: 60px;
    padding: 1.5rem;
  }

  /* Hero - Small Mobile */
  .hero {
    padding-top: 60px;
    min-height: 100vh;
  }

  .hero-glass-container {
    padding: 1.5rem;
    margin: 0.5rem 0;
    border-radius: 16px;
  }

  .hero-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-item {
    padding: 0.75rem 0.5rem;
  }

  .stat-number {
    font-size: clamp(1.1rem, 5vw, 1.75rem);
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }

  .primary-button,
  .secondary-button {
    padding: 0.9rem 1.25rem;
    font-size: 0.9rem;
  }

  /* Sections - Small Mobile */
  section {
    padding: 3rem 0;
  }

  .section-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    margin-bottom: 1rem;
  }

  /* Cards - Small Mobile */
  .service-card,
  .industry-card,
  .feature-item,
  .benefit-item,
  .contact-method {
    padding: 1rem;
  }

  .process-card {
    padding: 1rem;
  }

  .careers-positions {
    padding: 1rem;
  }

  .contact-form {
    padding: 1rem;
    border-radius: 12px;
  }

  .career-cta-section {
    padding: 1.25rem;
  }

  /* 3D Elements - Small Mobile */
  .service-icon-3d,
  .industry-3d {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.75rem;
  }

  .feature-icon,
  .benefit-icon,
  .method-icon {
    width: 45px;
    height: 45px;
  }

  .hero-3d,
  .about-3d,
  .careers-3d,
  .contact-3d canvas,
  .process-3d {
    height: 200px;
  }

  /* Industries Grid - Small Mobile */
  .industries-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Typography - Small Mobile */
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .section-description {
    font-size: clamp(0.85rem, 3vw, 1rem);
  }

  .service-content h3,
  .industry-content h3 {
    font-size: 1.1rem;
  }

  .feature-content h3,
  .benefit-content h4 {
    font-size: 1rem;
  }

  .contact-form h3 {
    font-size: 1rem;
  }

  .form-subtitle {
    font-size: 0.8rem;
  }

  /* Form Elements - Small Mobile */
  .form-group input,
  .form-group select,
  .contact-form textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.8rem;
  }

  /* Footer - Small Mobile */
  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-logo {
    width: 50px;
    height: 50px;
  }

  .brand-info h3 {
    font-size: 1.25rem;
  }

  .brand-info p {
    font-size: 0.85rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .social-link {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  /* Theme Switcher - Small Mobile */
  .theme-switcher {
    bottom: 1rem;
    left: 1rem;
  }

  .theme-toggle-track {
    width: 45px;
    height: 24px;
  }

  .theme-toggle-thumb {
    width: 18px;
    height: 18px;
  }

  .thumb-inner {
    font-size: 0.5rem;
  }

  [data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(21px);
  }

  /* Loading Screen - Small Mobile */
  .loading-logo img {
    width: 60px;
    height: 60px;
  }

  .loading-progress {
    width: 150px;
    height: 3px;
  }

  .loading-text {
    font-size: 0.8rem;
  }
}

/* ===== EXTRA SMALL MOBILE ===== */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero-glass-container {
    padding: 1.25rem;
  }

  .section-title {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-item {
    padding: 0.5rem 0.25rem;
  }

  .primary-button,
  .secondary-button {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  .service-card,
  .industry-card,
  .feature-item,
  .benefit-item,
  .contact-method,
  .process-card {
    padding: 0.875rem;
  }

  .contact-form {
    padding: 0.875rem;
  }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 60px;
  }

  .hero-glass-container {
    padding: 1.5rem;
    margin: 0.5rem 0;
  }

  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .stat-divider {
    display: block;
    height: 20px;
  }

  section {
    padding: 3rem 0;
  }

  .nav-container {
    height: 60px;
  }

  .nav-menu {
    top: 60px;
    padding: 1rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .theme-switcher,
  .hero-3d,
  .about-3d,
  .service-icon-3d,
  .industry-3d,
  .process-3d,
  .careers-3d,
  .contact-3d,
  .loading-screen,
  canvas {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }

  .hero-glass-container {
    background: transparent !important;
    border: 1px solid #333 !important;
    padding: 2rem !important;
  }

  .primary-button,
  .secondary-button,
  .cta-button {
    border: 1px solid #333 !important;
    color: #333 !important;
    background: transparent !important;
  }

  .service-card,
  .industry-card,
  .feature-item {
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  .section-title {
    break-after: avoid;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-element,
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .hamburger span {
    transition: none !important;
  }

  .nav-menu {
    transition: none !important;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .service-card,
  .industry-card,
  .feature-item,
  .benefit-item,
  .contact-method,
  .process-card {
    border-width: 2px !important;
    border-color: #000 !important;
  }

  .nav-link,
  .primary-button,
  .secondary-button {
    border: 2px solid #000 !important;
  }
}

/* ===== SCREEN SIZE SPECIFIC OPTIMIZATIONS ===== */
@media (max-width: 320px) {
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .section-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .theme-toggle-container {
    padding: 0.4rem;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .nav-link,
  .primary-button,
  .secondary-button,
  .cta-button {
    min-height: 44px;
    min-width: 44px;
  }

  .hamburger {
    min-height: 44px;
    min-width: 44px;
  }

  .theme-toggle-track {
    min-height: 32px;
    min-width: 60px;
  }

  .social-link {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===== FOCUS VISIBLE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  .nav-link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
  }

  .primary-button:focus-visible,
  .secondary-button:focus-visible {
    outline: 3px solid var(--text-primary);
    outline-offset: 2px;
  }

  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 1px;
  }
}
