/* Mobile and Tablet Responsive Fixes for Gaurav Bhardwaj Portfolio */
/* Save this as mobile-responsive.css and link it after your main styles */

/* Fix for expanding circle animation on mobile */
@media (max-width: 1024px) {
  .expanding-circle {
    display: none !important;
  }
  
  .nav-item:not(.active):hover {
    animation: none !important;
  }
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
  .app {
    flex-direction: column;
  }
  
  .nav-wrapper {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    flex-direction: row;
    transform: none !important;
    border-radius: 25px 25px 0 0;
    padding: 0;
    z-index: 100;
  }
  
  .nav-wrapper:hover {
    width: 100%;
    transform: none !important;
    padding: 0;
  }
  
  .nav-list {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    gap: 0;
    padding: 0 10px;
  }
  
  .initials {
    display: none;
  }
  
  .nav-item {
    width: 60px;
    height: 60px;
    margin: 5px 0;
  }
  
  .nav-item span {
    display: none;
  }
  
  .nav-item i {
    width: 24px;
    height: 24px;
  }
  
  .nav-item.active::after {
    left: 50%;
    top: -5px;
    transform: translateX(-50%);
    height: 4px;
    width: 60%;
  }
  
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: 80px; /* Space for bottom navigation */
  }
  
  .content-row {
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
  }
  
  .col-left {
    justify-content: center;
    padding: 0;
    order: 2;
    text-align: center;
  }
  
  .description {
    text-align: center;
    max-width: 100%;
    margin-top: 0;
    font-size: 1.1rem;
  }
  
  .col-center {
    order: 1;
    margin-top: 0;
  }
  
  .avatar-img {
    width: 200px;
  }
  
  .col-right {
    display: none;
  }
  
  h1.main-title {
    font-size: 4.5rem;
    letter-spacing: 0.15em;
  }
  
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding: 40px 20px;
  }
  
  .about-content {
    padding: 0;
    max-width: 100%;
  }
  
  .about-title {
    text-align: center;
  }
  
  .about-divider {
    margin: 20px auto;
    width: 80%;
  }
  
  .about-image {
    width: 280px;
    height: 350px;
  }
  
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .contact-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .contact-email {
    align-items: center;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Disable hover effects on tablet */
  .nav-item:hover {
    transform: scale(0.9) !important;
    background: rgba(248, 247, 244, 0.8) !important;
    box-shadow: none !important;
  }
  
  .nav-item:hover i {
    transform: none !important;
  }
  
  .work-item:hover {
    transform: none !important;
  }
  
  .work-item:hover .work-image {
    transform: none !important;
  }
  
  .work-item-overlay {
    display: none !important;
  }
  
  .skill-card:hover {
    transform: none !important;
  }
}

/* Mobile Styles (up to 767px) */
@media (max-width: 767px) {
  h1.main-title {
    font-size: 3rem;
    letter-spacing: 0.1em;
  }
  
  .description {
    font-size: 0.95rem;
  }
  
  .avatar-img {
    width: 160px;
  }
  
  .nav-wrapper {
    height: 65px;
  }
  
  .nav-item {
    width: 50px;
    height: 50px;
  }
  
  .nav-item i {
    width: 20px;
    height: 20px;
  }
  
  .about-image {
    width: 220px;
    height: 280px;
  }
  
  .about-title, .work-title, .skills-title, .contact-title {
    font-size: 2.2rem;
  }
  
  .work-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .skill-card {
    padding: 25px 20px;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .modal-features {
    grid-template-columns: 1fr;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* Small Mobile Styles (up to 480px) */
@media (max-width: 480px) {
  h1.main-title {
    font-size: 2.5rem;
  }
  
  .description {
    font-size: 0.85rem;
  }
  
  .nav-wrapper {
    height: 60px;
  }
  
  .nav-item {
    width: 45px;
    height: 45px;
  }
  
  .nav-item i {
    width: 18px;
    height: 18px;
  }
  
  .about-image {
    width: 200px;
    height: 250px;
  }
  
  .about-title, .work-title, .skills-title, .contact-title {
    font-size: 2rem;
  }
  
  .about-text, .work-item-desc, .contact-subtitle {
    font-size: 0.95rem;
  }
  
  .email-address {
    font-size: 1.1rem;
  }
  
  .social-icon {
    width: 50px;
    height: 50px;
  }
  
  .social-icon i {
    width: 22px;
    height: 22px;
  }
  
  .work-item-title {
    font-size: 1.2rem;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
}

/* Fix for iOS Safari viewport height issue */
@supports (-webkit-touch-callout: none) {
  .section {
    min-height: -webkit-fill-available !important;
  }
}

/* Improve touch targets for mobile */
@media (max-width: 1024px) {
  .nav-item {
    min-width: 44px;
    min-height: 44px;
  }
  
  .work-item {
    cursor: default;
  }
  
  .modal-button, .work-item-button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Prevent horizontal scrolling */
@media (max-width: 1024px) {
  body, html {
    overflow-x: hidden;
    width: 100%;
  }
  
  .section {
    width: 100%;
  }
}

/* Animation performance improvements for mobile */
@media (max-width: 1024px) {
  .nav-item, .work-item, .skill-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
  }
}

/* Additional touch-specific styles */
.touch-device .nav-item:hover {
    transform: none !important;
    background: rgba(248, 247, 244, 0.8) !important;
    box-shadow: none !important;
}

.touch-device .nav-item:hover i {
    transform: none !important;
}

.touch-device .work-item:hover {
    transform: none !important;
}

.touch-device .work-item:hover .work-image {
    transform: none !important;
}

.touch-device .skill-card:hover {
    transform: none !important;
}

.touch-device .nav-item.touch-active,
.touch-device .work-item.touch-active {
    transform: scale(0.95) !important;
    opacity: 0.9;
}

.touch-device .expanding-circle {
    display: none !important;
}