/**
 * Responsive CSS for Arsha Template
 * Mobile-first design approach for all devices
 */

/*--------------------------------------------------------------
# Base Mobile-First Styles
--------------------------------------------------------------*/

/* Mobile-first approach - start with mobile styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*--------------------------------------------------------------
# Responsive Typography
--------------------------------------------------------------*/

/* Fluid typography scale */
:root {
  --fluid-min-width: 320;
  --fluid-max-width: 1920;
  --fluid-min-size: 16;
  --fluid-max-size: 18;
  --fluid-screen: 100vw;
  --fluid-bp: calc(
    (var(--fluid-screen) - var(--fluid-min-width) / 16 * 1rem) /
    (var(--fluid-max-width) - var(--fluid-min-width))
  );
}

@media screen and (min-width: 320px) {
  :root {
    --fluid-screen: calc(var(--fluid-min-width) * 1px);
  }
}

@media screen and (min-width: 1920px) {
  :root {
    --fluid-screen: calc(var(--fluid-max-width) * 1px);
  }
}

/* Responsive font sizes */
.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.section-title h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.section-title p {
  font-size: clamp(1rem, 2vw, 1.1rem);
}

/*--------------------------------------------------------------
# Responsive Grid System
--------------------------------------------------------------*/

/* Mobile-first grid */
.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.col {
  flex: 1 0 0%;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

/* Responsive column classes */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

/*--------------------------------------------------------------
# Responsive Breakpoints
--------------------------------------------------------------*/

/* Extra Small devices (phones, 320px and up) */
@media (min-width: 320px) {
  .container {
    max-width: 100%;
  }
  
  .hero {
    padding: 80px 0 40px;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn-get-started, .btn-getstarted {
    width: 100%;
    max-width: 280px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
  
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
  
  .btn-get-started, .btn-getstarted {
    width: auto;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  .hero {
    padding: 100px 0 60px;
  }
  
  .hero-content {
    text-align: left;
  }
  
  .hero-buttons {
    justify-content: flex-start;
  }
  
  .service-item, .steps-item {
    margin-bottom: 2rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  .hero {
    padding: 120px 0 80px;
  }
  
  .service-item, .steps-item {
    margin-bottom: 0;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/*--------------------------------------------------------------
# Responsive Navigation
--------------------------------------------------------------*/

/* Mobile navigation */
@media (max-width: 1199px) {
  .header {
    padding: 0.5rem 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
  }
  
  .header .container-fluid {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  
  /* Ensure logo is visible */
  .header .logo {
    display: flex !important;
    visibility: visible !important;
  }
  
  .header .logo .logo-text {
    flex-direction: column; /* Stack subtitle below title on mobile */
    align-items: center;
    gap: 0.25rem;
  }

  /* Company name styling moved to company-name-clean.css */

  .navmenu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    transition: right 0.3s ease;
    z-index: 9998;
    padding: 80px 2rem 2rem;
    overflow-y: auto;
  }
  
  .navmenu.active {
    right: 0;
  }

  /* Force show when body has mobile state */
  body.mobile-nav-active #navmenu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 85% !important;
    max-width: 360px !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px);
    z-index: 10000 !important;
    transform: none !important;
  }
  body.mobile-nav-active #navmenu ul {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
    padding: 100px 24px 24px 24px !important; /* leave space for header */
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Ensure items are visible and clickable */
  body.mobile-nav-active #navmenu ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  body.mobile-nav-active #navmenu ul li a {
    color: #ffffff !important;
    font-size: 1.1rem;
    padding: 14px 0;
  }

  /* Reset any hidden/visibility rules from base CSS */
  body.mobile-nav-active #navmenu,
  body.mobile-nav-active #navmenu ul {
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .navmenu ul {
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }
  
  .navmenu ul li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navmenu ul li a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: none;
  }
  
  .mobile-nav-toggle {
    display: block !important;
    position: relative;
    z-index: 9999;
    color: #ffffff !important;
    font-size: 28px !important;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-toggle:hover {
    color: #06b6d4 !important;
    transform: scale(1.1);
  }
  
  .mobile-nav-toggle.bi-x {
    color: #ffffff !important;
  }
  
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Tablet navigation adjustments */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Company name styling moved to company-name-clean.css */
}

/*--------------------------------------------------------------
# Responsive Hero Section
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .hero {
    padding: 100px 0 40px;
    text-align: center;
  }
  
  .hero-title {
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    margin-bottom: 1.5rem;
  }
  
  .hero-image-wrapper {
    margin-top: 2rem;
  }
  
  .hero-image-wrapper img {
    max-width: 100%;
    height: auto;
  }
  
  .hero-shapes .shape {
    display: none;
  }
}

@media (max-width: 575px) {
  .hero {
    padding: 80px 0 30px;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
}

/*--------------------------------------------------------------
# Responsive Services Section
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .services .row {
    gap: 1.5rem;
  }
  
  .service-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .service-item .icon {
    font-size: 2rem;
  }
  
  .service-item h4 {
    font-size: 1.25rem;
  }
  
  .service-item p {
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .service-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .service-item .icon {
    font-size: 1.75rem;
  }
  
  .service-item h4 {
    font-size: 1.1rem;
  }
}

/*--------------------------------------------------------------
# Responsive Work Process Section
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .work-process .row {
    gap: 1.5rem;
  }
  
  .steps-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .steps-item .step-number {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .steps-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .steps-item p {
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .steps-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .steps-item .step-number {
    font-size: 2rem;
  }
  
  .steps-item h4 {
    font-size: 1.1rem;
  }
}

/*--------------------------------------------------------------
# Responsive Contact Section
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .contact .row {
    gap: 2rem;
  }
  
  .contact-info {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .contact-info .info-item {
    margin-bottom: 1.5rem;
  }
  
  .contact-info .info-item i {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .contact-info .info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-info .info-item p {
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .contact-info .info-item {
    margin-bottom: 1.25rem;
  }
  
  .contact-info .info-item i {
    font-size: 1.25rem;
  }
  
  .contact-info .info-item h4 {
    font-size: 1rem;
  }
}

/*--------------------------------------------------------------
# Responsive Footer
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .footer {
    padding: 12px 0;
    text-align: center;
  }
  
  .footer .copyright p {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  
  .footer .credits {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .main {
    padding-bottom: 70px;
  }
}

@media (max-width: 575px) {
  .footer {
    padding: 10px 0;
  }
  
  .footer .copyright p {
    font-size: 0.75rem;
  }
  
  .footer .credits {
    font-size: 0.7rem;
  }
  
  .main {
    padding-bottom: 60px;
  }
}

/*--------------------------------------------------------------
# Responsive Cards and Components
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .glass-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .glass-card h4 {
    font-size: 1.25rem;
  }
  
  .glass-card p {
    font-size: 0.9rem;
  }
  
  .btn-liquid {
    padding: 12px 30px;
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .glass-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .glass-card h4 {
    font-size: 1.1rem;
  }
  
  .btn-liquid {
    padding: 10px 25px;
    font-size: 0.85rem;
  }
}

/*--------------------------------------------------------------
# Responsive Particles and Effects
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .particles-bg {
    display: none; /* Hide particles on mobile for performance */
  }
  
  .scroll-indicator {
    height: 3px;
  }
  
  .section-divider {
    height: 60px;
  }
}

/*--------------------------------------------------------------
# Touch Device Optimizations
--------------------------------------------------------------*/

/* Touch-friendly button sizes */
@media (hover: none) and (pointer: coarse) {
  .btn-get-started, .btn-getstarted, .btn-liquid {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
  }
  
  .navmenu ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .mobile-nav-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

/*--------------------------------------------------------------
# High DPI Display Support
--------------------------------------------------------------*/

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image-wrapper img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/*--------------------------------------------------------------
# Print Styles
--------------------------------------------------------------*/

@media print {
  .header,
  .footer,
  .particles-bg,
  .scroll-indicator,
  .mobile-nav-toggle,
  .btn-get-started,
  .btn-getstarted {
    display: none !important;
  }
  
  .hero {
    padding: 0;
    background: none;
    color: #000;
  }
  
  .hero-title {
    color: #000;
    font-size: 2rem;
  }
  
  .hero-subtitle {
    color: #333;
  }
  
  .main {
    padding: 0;
  }
  
  .section {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
  
  .service-item,
  .steps-item {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}

/*--------------------------------------------------------------
# Accessibility Improvements
--------------------------------------------------------------*/

/* Focus indicators for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .btn-get-started:focus,
  .btn-getstarted:focus,
  .btn-liquid:focus,
  .navmenu ul li a:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-title {
    color: #000;
    text-shadow: none;
  }
  
  .hero-subtitle {
    color: #333;
  }
  
  .service-item,
  .steps-item {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particles-bg,
  .scroll-indicator {
    display: none;
  }
}

/*--------------------------------------------------------------
# Landscape Orientation Support
--------------------------------------------------------------*/

@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding: 60px 0 30px;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .hero-buttons {
    margin-bottom: 1rem;
  }
}

/*--------------------------------------------------------------
# Ultra-Wide Screen Support
--------------------------------------------------------------*/

@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .section-title h2 {
    font-size: 3rem;
  }
  
  .service-item,
  .steps-item {
    padding: 3rem;
  }
}

/*--------------------------------------------------------------
# Dark Mode Support
--------------------------------------------------------------*/

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
  }
  
  .glass-card {
    background: rgba(45, 45, 45, 0.8);
    color: #ffffff;
  }
  
  .service-item,
  .steps-item {
    background: #2d2d2d;
    color: #ffffff;
    border-color: #444;
  }
}
