/* ========================================
   ENHANCED MOBILE RESPONSIVE DESIGN
   Tech-Aligned Font System
   ======================================== */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
  html, body {
    font-size: 14px;
    overflow-x: hidden;
  }

  /* Header & Navigation */
  .pre-header {
    display: none !important;
  }

  .header-area {
    padding: 8px 0 !important;
    height: 65px;
  }

  .header-area .main-nav .logo img {
    max-width: 100px !important;
    width: 100px !important;
  }

  .header-area .main-nav .nav {
    display: none;
  }

  .menu-trigger {
    display: block !important;
    cursor: pointer;
    padding: 8px 10px;
    color: white;
    border-radius: 5px;
    font-size: 13px;
    width: auto;
  }

  .header-area .main-nav .menu-trigger {
    width: 28px !important;
    height: 28px !important;
    right: 20px !important;
    top: 28px !important;
  }

  .header-area .main-nav .menu-trigger span,
  .header-area .main-nav .menu-trigger span:before,
  .header-area .main-nav .menu-trigger span:after {
    width: 22px !important;
    height: 2px !important;
  }

  .header-area .main-nav .nav li a {
    height: 42px !important;
    line-height: 42px !important;
    padding: 0 15px !important;
  }

  /* Headings - Tech Styled with Modern Fonts */
  h1 { 
    font-size: 24px !important; 
    line-height: 1.3; 
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700; 
  }
  
  h2 { 
    font-size: 22px !important; 
    line-height: 1.3; 
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700; 
  }
  
  h3 { 
    font-size: 18px !important; 
    line-height: 1.3; 
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; 
  }
  
  h4 { 
    font-size: 16px !important; 
    line-height: 1.3; 
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; 
  }
  
  h5 { font-size: 15px !important; line-height: 1.3; }
  h6 { 
    font-size: 13px !important; 
    line-height: 1.2;
    font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  }

  p {
    font-size: 14px !important;
    line-height: 24px !important;
    font-family: 'Poppins', 'Inter', sans-serif;
  }

  /* Sections */
  .section {
    padding: 40px 0 !important;
  }

  .main-banner {
    padding: 60px 0 40px 0 !important;
  }

  .main-banner .left-content h6 {
    font-size: 12px !important;
    margin-left: 55px;
  }

  .main-banner .left-content h2 {
    font-size: 19px !important;
    line-height: 1.4;
    margin-left: 45px;
  }

  .main-banner .left-content p {
    font-size: 10px !important;
    line-height: 22px;
    margin-left: 45px;
  }

  .col-lg-6, .col-lg-12 {
    margin-bottom: 20px !important;
  }

  .right-image img {
    max-width: 100% !important;
    height: auto !important;
    width: 100%;
  }

  /* Buttons - Touch-Friendly */
  .border-first-button a,
  .main-button {
    display: inline-block !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    width: 100% !important;
    text-align: center;
    border-radius: 8px !important;
    touch-action: manipulation;
    min-height: 44px;
    line-height: 20px;
  }

  button:active,
  .main-button:active {
    transform: scale(0.98);
  }

  button, 
  a,
  input[type="submit"],
  input[type="button"] {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Forms - Mobile Optimized */
  form input,
  form textarea,
  form .form-control {
    width: 100% !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: 'Inter', 'Poppins', sans-serif;
    -webkit-appearance: none;
    appearance: none;
  }

  form input:focus,
  form textarea:focus,
  form .form-control:focus {
    outline: none;
    border-color: #0f6ada;
    box-shadow: 0 0 5px rgba(15, 106, 218, 0.3);
  }

  form .col-lg-4,
  form .col-lg-6,
  form .col-lg-12 {
    margin: 0 0 12px 0 !important;
    padding: 0 5px !important;
  }

  /* Services Section */
  .services .naccs .menu div {
    flex: 1 1 calc(50% - 5px) !important;
    margin: 5px !important;
    padding: 10px !important;
  }

  .services .naccs .menu div .thumb {
    font-size: 11px !important;
    padding: 5px !important;
    font-family: 'Space Grotesk', sans-serif;
  }

  .services ul.nacc li {
    padding: 20px !important;
  }

  .left-text h4,
  .left-text p {
    font-size: 14px !important;
  }

  .ticks-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .ticks-list span {
    font-size: 12px !important;
    padding: 8px !important;
    background: #f5f5f5;
    border-radius: 4px;
  }

  /* Skills/Progress */
  .skill-item {
    margin: 20px 0 !important;
  }

  .progress {
    max-width: 120px !important;
  }

  /* Portfolio */
  .our-portfolio {
    padding: 40px 0 !important;
  }

  .portfolio-item {
    margin: 10px !important;
  }

  .portfolio-item .thumb {
    max-height: 200px !important;
  }

  .loop {
    margin: 0 -10px !important;
  }

  .loop .item {
    padding: 10px !important;
  }

  /* Blog */
  .blog-post {
    margin-bottom: 20px !important;
  }

  .blog-post .thumb img,
  .blog-posts .thumb img {
    max-width: 100% !important;
    height: auto !important;
  }

  .post-item {
    margin-bottom: 15px !important;
    padding: 10px !important;
  }

  .post-item .thumb img {
    max-width: 80px !important;
  }

  .blog-post .down-content span.category,
  .post-item .right-content span.category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
  }

  /* Contact */
  #map iframe {
    min-height: 300px !important;
  }

  .contact-us {
    padding: 40px 0 !important;
  }

  form#contact {
    padding: 20px !important;
  }

  .fill-form {
    padding: 20px !important;
  }

  .info-post {
    margin-bottom: 20px !important;
    text-align: center;
  }

  /* Text Alignment */
  .section-heading h4 {
    font-size: 20px !important;
  }

  .section-heading h6 {
    font-size: 11px !important;
    letter-spacing: 1px;
  }

  /* Footer */
  footer {
    padding: 30px 0 !important;
  }

  footer p {
    font-size: 12px !important;
    line-height: 20px !important;
  }

  .pre-header-down {
    padding: 20px 0 !important;
  }

  .pre-header-down .logo img {
    max-width: 80px !important;
  }

  /* Line decorations */
  .line-dec {
    width: 30px !important;
  }

  /* Spacing utilities for mobile */
  .mobile-top-fix {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
  }

  .mobile-bottom-fix {
    margin-bottom: 20px !important;
  }

  .mobile-bottom-fix-big {
    margin-bottom: 40px !important;
  }

  /* Hide decorative elements on mobile */
  .main-banner:after,
  .main-banner:before,
  .services:after,
  .services:before,
  .our-portfolio:before,
  .our-portfolio:after,
  .blog:before,
  form#contact:before,
  form#contact:after,
  .contact-dec {
    display: none !important;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
  html, body {
    font-size: 15px;
  }

  h1 { 
    font-size: 28px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
  }
  
  h2 { 
    font-size: 26px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
  }
  
  h3 { 
    font-size: 20px;
    font-family: 'Space Grotesk', sans-serif;
  }
  
  h4 {
    font-size: 18px;
    font-family: 'Space Grotesk', sans-serif;
  }

  .main-banner .left-content h2 {
    font-size: 24px;
    line-height: 1.4;
  }

  .border-first-button a,
  .main-button {
    padding: 12px 28px !important;
    font-size: 15px !important;
    width: auto;
  }

  form input,
  form textarea,
  form .form-control {
    padding: 12px 15px;
    font-size: 14px;
    margin-bottom: 12px;
  }

  .services .naccs .menu div {
    flex: 1 1 calc(50% - 5px);
  }

  .section-heading h4 {
    font-size: 28px;
  }

  .services ul.nacc li.active {
    padding: 40px !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
  html, body {
    font-size: 15px;
  }

  h1 { 
    font-size: 32px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
  }
  
  h2 { 
    font-size: 30px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
  }
  
  h3 { 
    font-size: 22px;
    font-family: 'Space Grotesk', sans-serif;
  }
  
  h4 {
    font-size: 20px;
    font-family: 'Space Grotesk', sans-serif;
  }

  .main-banner .left-content h2 {
    font-size: 28px;
    line-height: 1.4;
  }

  .section-heading h4 {
    font-size: 32px;
  }

  .border-first-button a,
  .main-button {
    padding: 12px 32px;
    font-size: 16px;
  }

  form input,
  form textarea,
  form .form-control {
    padding: 12px 18px;
    font-size: 15px;
    margin-bottom: 15px;
  }

  .services .naccs .menu div {
    flex: 1 1 calc(33.333% - 5px);
  }

  form#contact {
    padding: 40px !important;
  }

  .fill-form {
    padding: 40px 30px !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  h1, h2, h3, h4 { 
    font-family: 'Space Grotesk', 'Inter', sans-serif;
  }

  h5, h6 {
    font-family: 'Inter', 'Poppins', sans-serif;
  }

  .section-heading h6 {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
  }

  code, pre {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  }
}

/* Ultra-wide screens (4K and above) */
@media (min-width: 1921px) {
  html, body {
    font-size: 18px;
  }

  h1 { font-size: 48px; }
  h2 { font-size: 42px; }
  h3 { font-size: 32px; }
  h4 { font-size: 28px; }

  .section-heading h4 {
    font-size: 48px;
  }

  .border-first-button a,
  .main-button {
    padding: 16px 48px;
    font-size: 18px;
  }
}

/* ========================================
   TECH-ALIGNED TYPOGRAPHY
   ======================================== */

/* Code and technical elements */
code {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', monospace !important;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', monospace !important;
  background: #1a1a1a;
  color: #00ff00;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
}

/* Section labels with tech font */
.section-heading h6 {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Form inputs with modern font */
input, 
textarea,
.form-control {
  font-family: 'Inter', 'Poppins', sans-serif;
}

/* Navigation with modern font */
nav, 
.main-nav {
  font-family: 'Poppins', 'Inter', sans-serif;
}

/* ========================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  button,
  a,
  .border-first-button a,
  .main-button,
  input[type="submit"],
  input[type="button"],
  input[type="text"],
  input[type="email"],
  textarea {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 16px;
  }

  a {
    padding: 8px;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

/* ========================================
   ADDITIONAL MOBILE OPTIMIZATIONS
   ======================================== */

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
}

/* Better tap targets */
a, button, input[type="button"], input[type="submit"] {
  -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  body {
    font-family: 'Poppins', sans-serif;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
  }
}
