/* Responsive Utility CSS for GryphalCode */

/* Skip-nav focus visibility */
.skip-nav:focus {
  position: fixed !important;
  left: 10px !important;
  top: 10px !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  padding: 12px 24px;
  background: #086ad8;
  color: #fff;
  font-size: 16px;
  z-index: 100000;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Global Hidden States for Mobile Navigation (Desktop/Tablet Default) */
.gryphal-nav-toggle,
.gryphal-mobile-nav {
  display: none !important;
}

@media (max-width: 1400px) {
  .bannertext .heading {
    font-size: 56px !important;
    line-height: 1.1 !important;
  }
  .banner-img {
    right: 5%;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
  .bannertext .heading {
    font-size: 50px !important;
    line-height: 1.2 !important;
  }
  .modern-stats-container {
    gap: 20px;
  }
  .modern-stat-card {
    padding: 15px 20px;
  }
}

@media (max-width: 991px) {
  .container {
    max-width: 720px;
  }
  .section__heading--title {
    font-size: 36px;
    line-height: 42px;
  }
  .mt-70 {
    margin-top: 40px !important;
  }

  /* Navarea needs relative position for dropdown absolute positioning */
  .navarea {
    position: relative;
  }

  /* --- MOBILE VIEW NAVIGATION CORE (Screens < 992px) --- */

  /* Kill legacy desktop interactions & artifacts */
  .mean-container,
  .mean-bar,
  #mobile-menu {
    display: none !important;
  }

  /* ========== HAMBURGER BUTTON (Blue-bordered box with X) ========== */
  .gryphal-nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 2px solid #086ad8;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
    transition: all 0.3s ease;
  }

  .gryphal-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #086ad8;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* Hamburger → hidden when panel is open (close button inside handles it) */
  .gryphal-nav-toggle.active {
    display: none !important;
  }
  .gryphal-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .gryphal-nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .gryphal-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* ========== MOBILE SLIDE-IN PANEL ========== */
  .gryphal-mobile-nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    z-index: 10000;
    transition: right 0.35s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    padding: 0;
  }

  .gryphal-mobile-nav.active {
    right: 0;
  }

  .gryphal-mobile-nav-inner {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* ========== TOP HEADER: Logo + Close ========== */
  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
  }

  .mobile-nav-header img {
    max-width: 130px;
    height: auto;
  }

  .mobile-nav-close {
    width: 36px;
    height: 36px;
    background: #086ad8;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition:
      background 0.2s,
      transform 0.2s;
  }

  .mobile-nav-close:hover {
    background: #0555b0;
    transform: rotate(90deg);
  }

  /* ========== MENU LIST ========== */
  .mobile-main-nav {
    padding: 10px 0;
  }

  .mobile-main-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-main-nav > ul > li {
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    margin: 0;
    padding: 0;
  }

  .mobile-main-nav > ul > li:last-child {
    border-bottom: none;
  }

  .mobile-main-nav > ul > li > a {
    display: block;
    padding: 14px 20px;
    color: #1a1a1a !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
  }

  .mobile-main-nav > ul > li > a:hover {
    color: #086ad8 !important;
  }

  /* ========== DROPDOWN TOGGLE (+) BOX ========== */
  .mobile-main-nav > ul > li.has-dropdown > a {
    padding-right: 55px;
  }

  .mobile-main-nav > ul > li.has-dropdown {
    position: relative;
  }

  .mobile-main-nav .dropdown-toggle-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
  }

  .mobile-main-nav .dropdown-toggle-btn:hover {
    color: #086ad8;
  }

  /* ========== SUB-MENU ========== */
  .mobile-main-nav .sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
  }

  .mobile-main-nav li.has-dropdown.open > .sub-menu {
    display: block;
  }

  .mobile-main-nav .sub-menu li {
    border-bottom: 1px solid #eee;
  }

  .mobile-main-nav .sub-menu li:last-child {
    border-bottom: none;
  }

  .mobile-main-nav .sub-menu li a {
    display: block;
    padding: 11px 20px 11px 35px;
    color: #555 !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition:
      color 0.2s,
      padding-left 0.2s;
  }

  .mobile-main-nav .sub-menu li a:hover {
    color: #086ad8 !important;
    padding-left: 40px;
  }

  /* ========== CONTACT INFO SECTION ========== */
  .mobile-nav-contact {
    padding: 20px;
    border-top: 1px solid #eee;
  }

  .mobile-nav-contact h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
  }

  .mobile-nav-contact .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
  }

  .mobile-nav-contact .contact-item:last-child {
    margin-bottom: 0;
  }

  .mobile-nav-contact .contact-item i {
    color: #086ad8;
    font-size: 14px;
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
  }

  .mobile-nav-contact .contact-item a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
  }

  .mobile-nav-contact .contact-item a:hover {
    color: #086ad8;
  }

  /* ========== CTA BUTTON ========== */
  .mobile-nav-cta {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .mobile-nav-cta .site-btn {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* ========== SOCIAL ICONS ========== */
  .mobile-nav-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 20px 25px;
    margin-top: auto;
  }

  .mobile-nav-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
  }

  .mobile-nav-social a:hover {
    background: #086ad8;
    color: #fff;
  }

  /* ========== SCROLL LOCK ========== */
  html.gryphal-nav-open,
  body.gryphal-nav-open {
    overflow: hidden !important;
    height: 100% !important;
    position: relative !important;
  }
}

@media (max-width: 767px) {
  .container {
    max-width: 540px;
  }
  .section__heading--title {
    font-size: 30px;
    line-height: 38px;
  }
  .pl-20 {
    padding-left: 0 !important;
  }
}

@media (max-width: 575px) {
  .container {
    width: 100%;
    padding: 0 15px;
  }

  /* Mobile Progress Bars Fix */
  .skill__box {
    position: relative !important;
    margin-bottom: 40px !important;
    display: block !important;
  }
  .skill__box .title {
    max-width: 75% !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-bottom: 20px !important;
    display: block !important;
  }
  .skill__box .progress {
    position: static !important;
    overflow: visible !important;
  }
  .skill__box .progress-bar {
    position: static !important;
  }
  .skill__box .progress-bar span {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    font-weight: bold !important;
  }

  /* Structural Scroll Lock: Prevents background movement during navigation */
  html.gryphal-nav-open,
  body.gryphal-nav-open {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
    top: 0;
    left: 0;
    touch-action: none;
  }

  /* Prevent Horizontal Scroll */
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Container Bounds */
  .container {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow-x: hidden !important;
    margin: 0 auto !important;
  }

  /* Fluid Images */
  img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Text Wrapping */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  a,
  span,
  .title,
  .section__heading--title {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  /* About Box UI Repair */
  .about__box {
    margin-left: 0 !important;
    padding: 15px !important;
    height: auto !important;
    overflow: visible !important;
  }
  .about__box p {
    margin-bottom: 20px !important;
  }

  /* Site Button Fix */
  .site-btn {
    white-space: normal !important;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 12px 20px !important;
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* WhatsApp Float */
  .whatsapp-float {
    width: 45px !important;
    height: 45px !important;
    bottom: 15px !important;
    right: 15px !important;
    padding: 8px !important;
    z-index: 9999 !important;
  }
  .whatsapp-float svg {
    width: 25px !important;
    height: 25px !important;
    margin: 0 auto !important;
  }
}
