/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile Header Optimization */
@media (max-width: 768px) {
  #header {
    padding: 20px 15px;
    height: auto;
    min-height: 100vh;
  }

  #header h1 {
    font-size: 28px !important;
    text-align: center;
    margin-bottom: 15px;
  }

  #header h2 {
    font-size: 16px !important;
    line-height: 24px !important;
    text-align: center;
    margin-top: 10px !important;
  }

  #header .social-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px !important;
  }

  #header .social-links a {
    width: 50px !important;
    height: 50px !important;
    font-size: 20px !important;
  }

  /* Mobile Navigation */
  .mobile-nav-toggle {
    display: block;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.3), rgba(0, 242, 254, 0.3));
    border: 2px solid rgba(79, 172, 254, 0.5);
    border-radius: 8px;
    padding: 10px;
    width: 45px;
    height: 45px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
  }

  .mobile-nav {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(79, 172, 254, 0.3);
  }

  .mobile-nav a {
    font-size: 16px;
    padding: 15px 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* About Section Mobile */
@media (max-width: 768px) {
  .about-me .row {
    flex-direction: column;
  }

  .about-me img {
    max-width: 250px;
    margin: 0 auto 30px;
    display: block;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
  }

  .about-me .content h3 {
    font-size: 20px !important;
    text-align: center;
    margin-bottom: 20px;
  }

  .about-me .content ul {
    font-size: 14px;
  }

  .about-me .content ul li {
    padding-bottom: 8px;
  }

  .about-me .content p {
    font-size: 14px;
    line-height: 24px;
    text-align: justify;
  }
}

/* Skills Section Mobile */
@media (max-width: 768px) {
  .skills .progress {
    padding: 12px !important;
    margin-bottom: 20px !important;
  }

  .skills .progress .skill {
    font-size: 14px;
    padding: 8px 0;
  }

  .skills .progress-bar-wrap {
    height: 8px;
  }
}

/* Interests Section Mobile */
@media (max-width: 768px) {
  .interests .icon-box {
    padding: 15px;
    margin-bottom: 15px;
  }

  .interests .icon-box h3 {
    font-size: 14px !important;
  }
}

/* Resume Section Mobile */
@media (max-width: 768px) {
  .resume .resume-title {
    font-size: 20px !important;
    text-align: center;
    margin-top: 30px;
  }

  .resume .resume-item {
    padding: 0 0 15px 15px;
  }

  .resume .resume-item h4 {
    font-size: 15px !important;
    line-height: 22px;
  }

  .resume .resume-item h5 {
    font-size: 13px;
    padding: 4px 10px;
  }

  .resume .resume-item ul {
    padding-left: 15px;
    font-size: 13px;
  }

  .resume .resume-item p {
    font-size: 14px;
  }

  .resume1 .btn {
    padding: 12px 30px !important;
    font-size: 14px !important;
    width: 100%;
    max-width: 250px;
  }

  .resume1 .text-center p {
    font-size: 20px !important;
  }
}

/* Services Section Mobile */
@media (max-width: 768px) {
  .services .icon-box {
    padding: 40px 20px !important;
    margin-bottom: 20px;
  }

  .services .icon-box h4 {
    font-size: 18px !important;
  }

  .services .icon-box p {
    font-size: 13px !important;
    line-height: 22px;
  }

  .services .icon-box .icon {
    width: 50px;
    height: 50px;
  }

  .services .icon-box .icon i {
    font-size: 24px !important;
  }
}

/* Portfolio Section Mobile */
@media (max-width: 768px) {
  .portfolio #portfolio-flters {
    padding: 10px;
  }

  .portfolio #portfolio-flters li {
    font-size: 12px;
    padding: 8px 12px;
    margin: 5px 3px;
  }

  .portfolio .portfolio-item {
    margin-bottom: 20px;
  }

  .portfolio .portfolio-wrap .portfolio-info h4 {
    font-size: 18px !important;
  }

  .portfolio .portfolio-wrap .portfolio-info p {
    font-size: 12px;
  }
}

/* Contact Section Mobile */
@media (max-width: 768px) {
  .contact .info-box {
    margin-bottom: 20px;
    padding: 20px 15px !important;
  }

  .contact .info-box h3 {
    font-size: 16px !important;
    margin: 10px 0 8px 60px !important;
  }

  .contact .info-box p {
    font-size: 13px !important;
    margin: 0 0 0 60px !important;
    word-break: break-word;
  }

  .contact .info-box i.bx {
    font-size: 20px !important;
    padding: 12px !important;
  }

  .contact .info-box .social-links {
    margin: 10px 0 0 60px !important;
    flex-wrap: wrap;
  }

  .contact .info-box .social-links a {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }

  .contact .php-email-form {
    padding: 20px !important;
  }

  .contact .php-email-form input,
  .contact .php-email-form textarea {
    font-size: 14px !important;
    padding: 15px !important;
  }

  .contact .php-email-form button[type="submit"] {
    width: 100%;
    padding: 15px 30px !important;
    font-size: 16px !important;
  }

  #customModal > div {
    width: 95% !important;
    margin: 20% auto !important;
    padding: 0 !important;
  }

  #customModal h2 {
    font-size: 22px !important;
  }

  #customModal button {
    padding: 10px 20px !important;
    font-size: 13px !important;
    margin: 5px 0 !important;
  }

  #customModal > div > div {
    padding: 20px !important;
  }

  #customModal > div > div > div:last-child {
    flex-direction: column;
    gap: 10px !important;
  }

  #customModal button {
    width: 100%;
  }
}

/* Section Spacing Mobile */
@media (max-width: 768px) {
  section {
    top: 100px !important;
  }

  section.section-show {
    top: 70px !important;
    padding-bottom: 30px !important;
  }

  section .container {
    padding: 20px !important;
    background: none !important;
  }

  .section-title h2 {
    font-size: 12px;
  }

  .section-title p {
    font-size: 28px !important;
  }
}

/* Counts Section Mobile */
@media (max-width: 768px) {
  .counts {
    padding: 40px 0 30px;
  }

  .counts .count-box {
    padding: 25px 20px !important;
    margin-bottom: 20px;
  }

  .counts .count-box span {
    font-size: 36px !important;
  }

  .counts .count-box p {
    font-size: 16px !important;
  }
}

/* Smooth Scrolling for Mobile */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
  #header {
    min-height: auto;
    padding: 15px;
  }

  #header h1 {
    font-size: 24px !important;
  }

  #header h2 {
    font-size: 14px !important;
    line-height: 20px !important;
  }

  #header .social-links {
    margin-top: 15px !important;
  }

  #header .social-links a {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  #header h1 {
    font-size: 24px !important;
  }

  #header h2 {
    font-size: 14px !important;
  }

  .about-me img {
    max-width: 200px;
  }

  .resume .resume-item h4 {
    font-size: 14px !important;
  }

  .services .icon-box {
    padding: 30px 15px !important;
  }

  .portfolio #portfolio-flters li {
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* Loading Animation for Mobile */
@media (max-width: 768px) {
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  section.section-show {
    animation: fadeInUp 0.5s ease;
  }
}

/* Improve readability on mobile */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.6;
  }

  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
  }
}

/* Fix for mobile viewport height */
@media (max-width: 768px) {
  #header {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
}

/* Optimize images for mobile */
@media (max-width: 768px) {
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Better spacing for mobile cards */
@media (max-width: 768px) {
  .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }
}
