/*
iPhone < 5:
@media screen and (device-aspect-ratio: 2/3) {}

iPhone 5:
@media screen and (device-aspect-ratio: 40/71) {}

iPad:
@media screen and (device-aspect-ratio: 3/4) {}
*/



/*
All handheld
*/
@media handheld,
  screen and (device-aspect-ratio: 2/3),
  screen and (device-aspect-ratio: 40/71),
  screen and (device-aspect-ratio: 3/4),
  only screen and (max-width: 1080px) {
  .fullPage-slidesNav span {
    width: 20px;
    height: 20px;
  }

  .fullPage-slidesNav li {
    width: 40px;
    height: 40px;
    margin: 20px;
  }

  .controlArrow.next {
    border-width: 4em 0 4em 4em;
  }
  .controlArrow.prev {
    border-width: 4em 4em 4em 0;
  }

  .contact_items {
    float: none;
    clear: both;
    width: 100%;
    margin-bottom: 30px;
  }

  .tech_stacks {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 16px;
    padding: 24px 16px;
  }
  .tech_stacks .tech_items {
    padding: 12px;
  }

  /* Portfolio mobile adjustments */
  .portfolio-grid,
  .contact-grid,
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    padding: 20px 10px !important;
  }

  .contact-info {
    gap: 10px;
  }
}

/* Hamburger Menu Styles for screens < 690px */
@media only screen and (max-width: 690px) {
  /* Hide hamburger by default */
  .hamburger-btn {
    display: none;
  }

  /* Show hamburger on mobile */
  @media only screen and (max-width: 690px) {
    .hamburger-btn {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: fixed;
      top: 15px;
      right: 15px;
      z-index: 100;
      width: 50px;
      height: 50px;
      background: white;
      border: none;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      cursor: pointer;
      padding: 10px;
      transition: all 0.3s ease;
    }

    .hamburger-btn:hover {
      background: #f4f4f4;
    }

    .hamburger-btn span {
      display: block;
      width: 26px;
      height: 3px;
      background: #343741;
      margin: 4px 0;
      border-radius: 3px;
      transition: all 0.35s ease;
      position: relative;
      transform-origin: center;
    }

    /* Active (X) state */
    .hamburger-btn.active span:nth-child(1) {
      transform: translateX(1px) translateY(10px) rotate(45deg);
    }

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

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

    /* Mobile menu styles */
    #menu {
      position: fixed;
      top: 0;
      left: -100%;
      width: 280px;
      height: 100vh;
      background: white;
      flex-direction: column;
      justify-content: flex-start;
      align-items: stretch;
      padding: 80px 0 20px 0;
      margin: 0;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
      transition: left 0.3s ease;
      overflow-y: auto;
      z-index: 90;
    }

    #menu.mobile-active {
      left: 0;
      max-height: 90vh;
      overflow-y: auto;
    }

    #menu li {
      display: block;
      margin: 0 !important;
      padding: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      width: 100%;
    }

    #menu li.company-brand {
      position: absolute;
      top: 24px;
      width: 100%;
      background: transparent !important;
      border-radius: 99rem !important;
      padding: 5px 10px !important;
    }

    #menu li.company-brand a,
    #menu li.company-brand.active a {
      background: transparent !important;
      border-bottom: none !important;
      font-size: var(--font-h3) !important;
    }

    #menu li.company-brand a {
      padding: 5px 10px !important;
    }

    #menu li:first-child {
      margin-right: 0 !important;
    }

    #menu li a {
      display: block;
      padding: 15px 20px !important;
      color: #343741;
      border-bottom: 1px solid #f0f0f0;
      background: transparent !important;
      border-radius: 0 !important;
      margin: 0 !important;
      text-align: left;
      white-space: normal;
    }

    #menu li a:hover,
    #menu li.active a {
      background: #f4f4f4 !important;
      color: #b82927;
    }

    /* Dropdown styles for mobile - always visible */
    #menu li.has-dropdown .dropdown,
    #menu li.has-dropdown:hover .dropdown,
    #menu li.has-dropdown .modern-dropdown {
      position: static !important;
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      min-width: 100% !important;
      padding: 0 !important;
      transform: none !important;
      transition: none !important;
    }

    #menu li.has-dropdown .dropdown li {
      background: transparent !important;
    }

    #menu li.has-dropdown .dropdown li a {
      padding-left: 40px !important;
      background: #f9f9f9 !important;
      border-bottom: 1px solid #e5e5e5 !important;
    }

    #menu li.has-dropdown .dropdown li:hover a {
      background: #eeeeee !important;
    }

    #menu li.has-dropdown > a .fa {
      display: none !important;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
      overflow: hidden;
    }

    /* Overlay */
    body.menu-open::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 80;
    }

    /* disable portfolio card overlay & effects*/
    .portfolio-card:hover {
      transform: none !important;
      box-shadow: none !important;
      border: none !important;
    }
    .portfolio-card:hover .portfolio-card-overlay {
      opacity: 0 !important;
      transform: none !important;
    }
    .portfolio-card:hover .portfolio-card-image img {
      transform: none !important;
    }
    .portfolio-card-footer {
      display: block !important;
      padding: 16px 32px !important;
    }
  }
}
