/* ==========================================================================
   TEAM ARROW - CENTRALIZED RESPONSIVE STYLES
   ========================================================================== */

/* --- 1. GLOBAL RESPONSIVE DEFAULTS --- */
:root {
  --hero-font-size-desktop: 10vw;
  --hero-font-size-mobile: 15vw;
  --section-padding-desktop: 50px 20px;
  --section-padding-mobile: 20px 10px;
  /* Tighter padding for mobile */
}

/* --- 1.1. GLOBAL TEAM COMPONENT FIXES --- */
.name-row {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 8px !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
}

.name-row span.name,
.name-row #name {
  margin: 0 !important;
  display: inline-block !important;
  font-size: 1.8rem !important; /* Larger to match 2024 style */
}

.name-row a {
  display: inline-flex !important;
  align-items: center !important;
  color: #0077b5 !important;
  font-size: 1.1rem !important;
  text-decoration: none !important;
}

.name-row a i {
  color: #0077b5 !important;
}

/* Note: overflow-x: hidden on html/body can break position: sticky on desktop.
   We move it to mobile-only where sticky behavior is less critical or handled differently. */

/* --- 1.5. LARGE TABLET / SMALL DESKTOP (max-width: 1360px) --- */
@media screen and (max-width: 1360px) {
  .navbar ul li img {
    display: none;
  }
}

/* --- 1.6. SEARCH BAR TABLET (max-width: 1300px) --- */
@media screen and (max-width: 1300px) {
  .search-wrapper {
    width: 16vw;
    float: left;
    margin-left: 15px;
  }

  .search-input {
    width: 0;
    opacity: 0;
    padding: 0;
    margin-left: 4px;
    border: none;
    pointer-events: none;
    transition: width 0.4s ease, opacity 0.3s ease;
  }

  .search-wrapper.active .search-input {
    width: 160px;
    opacity: 1;
    padding: 10px 16px 10px 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto;
  }

  .search-icon {
    left: auto;
    margin: 0 0 0 12px;
  }
}

/* --- 1.7. MEDIUM TABLET (max-width: 1200px) --- */
@media screen and (max-width: 1200px) {
  .card {
    width: calc(50% - 15px);
  }
}

/* --- 2. TABLET BREAKPOINT (max-width: 1024px) --- */
@media screen and (max-width: 1024px) {
  .comp_div {
    flex-direction: column-reverse;
    text-align: center;
    width: 90%;
  }

  .text-container,
  .img-container {
    flex: 1;
    width: 100%;
  }

  .comptitle {
    font-size: 40px;
    justify-content: center;
  }

  .comp_logo {
    width: 70px;
  }
}

/* --- 3. MOBILE BREAKPOINT (max-width: 900px) --- */
/* Migrated from header.css and index.css */
@media screen and (max-width: 900px) {

  html,
  body {
    overflow-x: hidden;
  }

  .nav-hamburger {
    display: flex;
    z-index: 2001;
    margin-right: 15px;
    /* Add some breathing room */
  }

  /* Hide header social icons on mobile to declutter */
  .header-content {
    display: none !important;
  }

  .header-top {
    height: 70px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    /* Align socials and hamburger to right */
    padding: 0 15px !important;
    position: static !important;
    background: #000;
  }

  /* Logo Link (direct child) */
  .header-top>a:first-child {
    display: flex !important;
    align-items: center !important;
    margin-right: auto !important;
    /* Pushes socials and hamburger to the right */
  }

  #logo_header img {
    height: 40px !important;
    width: auto !important;
  }

  /* Social Icons (direct child) */
  .header-content {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    transform: none !important;
    margin: 0 10px 0 0 !important;
    /* Tight spacing before hamburger */
    gap: 6px !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* Globally hide search on mobile for all pages */
  .search-wrapper {
    display: none !important;
  }

  .social-icon-item {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .social-icon-item a {
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: white !important;
  }

  /* Hamburger Link (direct child) */
  .nav-hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 18px !important;
    width: 28px !important;
    z-index: 100000001 !important;
    /* Higher than header-head */
    margin: 10px 10px 0 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  .nav-hamburger-line {
    width: 100% !important;
    height: 3px !important;
    background-color: white !important;
    border-radius: 2px !important;
  }

  .header-head {
    position: fixed;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 1) !important;
    /* Full black for high-impact contrast */
    backdrop-filter: blur(15px);
    top: -110%;
    left: 0;
    width: 100%;
    height: 100dvh;
    transition: top 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    flex-direction: column;
    justify-content: center;
    z-index: 100000000 !important;
    /* Absolute top-most priority */
  }

  .header-head.active {
    top: 0;
  }

  .header-head ul {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
  }

  .header-head ul li {
    width: 100%;
    text-align: center;
    margin: 10px 0 !important;
    height: auto !important;
    /* Fix: prevents dropdown li from stretching 100% on mobile */
  }

  .nav-hamburger.active .nav-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-hamburger.active .nav-hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-hamburger.active .nav-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .header-head ul li a,
  .header-head ul li button,
  .dropbtn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.8rem !important;
    font-family: 'Anton', sans-serif !important;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 3px;
    cursor: pointer;
    transition: color 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
  }

  .header-head ul li a:hover,
  .header-head ul li button:hover {
    color: #ff6200 !important;
  }



  .dropdown-content {
    display: none;
    position: static;
    background-color: transparent !important;
    width: 100%;
    box-shadow: none;
    padding: 10px 0;
  }

  .dropdown-content a {
    font-size: 1.2rem !important;
    padding: 8px 0 !important;
    opacity: 0.8;
  }

  .dropdown.active .dropdown-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
  }

  /* Ensure floating buttons (Sponsor/Top) stay BEHIND the menu when open */
  .header-head.active~.footer-actions,
  .header-head.active~#sponsor-popup,
  .header-head.active~.footer-top-btn {
    display: none !important;
  }

  /* --- HERO SCROLL EFFECT FOR MOBILE --- */
  #vidd,
  #logo,
  #overlay {
    display: none;
  }

  section.vid {
    height: 100vh;
    /* Instant scroll transition */
    background: #000;
    position: relative;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .holder {
    position: relative !important;
    /* Switch to relative for instant scroll */
    top: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    z-index: 5;
  }

  .mobile-vid {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000;
  }

  .mobile-vid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #logo-mobile {
    display: flex !important;
    flex-direction: column;
    /* Stack logo and tagline */
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
  }

  #logo-mobile img {
    width: 70vw !important;
    height: auto !important;
    max-width: 320px;
  }

  .hero-tagline-mobile {
    color: white;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-top: 15px;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    font-family: 'Anton', sans-serif;
  }

  /* Ensure text is visible during scroll on mobile */
  .scroll-container1,
  .scroll-container2 {
    display: flex !important;
    opacity: 1 !important;
    /* Force override GSAP if it's hiding them */
    visibility: visible !important;
    z-index: 101;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    justify-content: center;
    align-items: center;
    pointer-events: none;
  }

  .scroll-text1,
  .scroll-text2 {
    display: block !important;
    font-size: 1.8rem !important;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    width: 80%;
  }

  /* Recruitment Card Fixes */
  .recruitment-card {
    flex-direction: column-reverse;
    text-align: center;
  }

  .recruit-left {
    padding-right: 0;
  }

  .recruit-logo {
    max-width: 180px;
    margin-bottom: 20px;
  }

  /* About Us - FAQ & Map Mobile Fixes */
  .cyber-workspace,
  .cyber-faq-map {
    flex-direction: column !important;
  }

  .cw-visual {
    min-height: 300px !important;
    clip-path: none !important;
  }

  .cyber-faq-col {
    padding: 40px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cyber-map-col {
    position: relative !important;
    top: 0 !important;
    height: 350px !important;
    width: 100% !important;
    margin-top: 20px !important;
    z-index: 1 !important;
  }

  .cyber-map-col iframe {
    height: 100% !important;
    width: 100% !important;
    filter: grayscale(100%) invert(100%) contrast(1.2);
    opacity: 0.8 !important;
  }

  .cyber-title {
    font-size: 2.8rem !important;
    text-align: center !important;
  }

  .cyber-faq-content {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #ccc !important;
  }

  /* --- GLOBAL PAGE HEADER MOBILE REFINEMENTS (Projects, Competitions, Blogs) --- */
  .head1 {
    font-size: clamp(3.2rem, 14vw, 4.5rem) !important;
    /* Calibrated to fit 'COMPETITIONS' safely */
    line-height: 0.85 !important;
    margin-bottom: 0 !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    /* Center the span */
    justify-content: center !important;
    max-height: none !important;
  }

  .head2 {
    font-size: 1.4rem !important;
    transform: none !important;
    opacity: 1 !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    /* Center the span */
    justify-content: center !important;
    margin-top: 15px !important;
    /* Move tagline lower for more breathing room */
    z-index: 2 !important;
    max-height: none !important;
  }

  .title {
    padding: 60px 15px 30px !important;
    /* Even smaller padding */
    min-height: 40vh !important;
    /* Further reduced min-height */
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 10 !important;
    background-size: cover !important;
    /* Fix: ensures the grey image covers the entire text area */
    background-position: center !important;
  }

  /* Fix for Competitions page elements being shifted up by 200px+ in competition.css */
  .flex-container1,
  .flex-container2,
  .achievement,
  .seperator-ach,
  .achievement-list,
  .ach-head,
  .out-ach-container,
  /* Added to fix overlap */
  .main-footer,
  footer {
    bottom: 0 !important;
    /* Zero out the aggressive shifts */
    margin-top: 20px !important;
    position: relative !important;
  }

  /* Projects Page Year Sections */
  .year-section h2,
  .ach-head {
    font-size: 2.5rem !important;
    margin-top: 10px !important;
    /* Minimal top margin */
    margin-bottom: 15px !important;
    /* Tighter bottom margin */
    letter-spacing: -1px !important;
    text-align: center !important;
    width: 100% !important;
  }

  .year-section {
    padding-top: 20px !important;
    /* Even less top padding */
    padding-bottom: 20px !important;
  }

  .year-section .card-container h1 {
    font-size: 3.5rem !important;
    letter-spacing: 4px !important;
    text-align: center !important;
  }

  /* 2-Card Layout for Projects on Mobile */
  .card-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 10px !important;
    width: 100% !important;
  }

  .flip-card {
    width: 100% !important;
    height: 240px !important;
    /* Calibrated height for 2-up layout */
    perspective: 1000px;
  }

  .flip-card-inner {
    transition: transform 0.6s !important;
  }

  .flip-card-front,
  .flip-card-back {
    padding: 10px !important;
    border-radius: 8px !important;
  }

  .flip-card-front img {
    height: 140px !important;
    margin-bottom: 8px !important;
    border-radius: 6px !important;
  }

  .flip-card-front h3 {
    font-size: 1rem !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }


  .flip-card-back h3 {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
  }

  .flip-card-back ul li {
    font-size: 10px !important;
    margin: 5px 0 !important;
  }

  .flip-card-back ul li i {
    font-size: 11px !important;
    margin-right: 5px !important;
  }

  /* Year Nav Strip Mobile Refinement */
  .year-nav {
    position: sticky !important;
    top: 70px !important;
    /* Below the mobile header-top */
    background: rgba(15, 15, 15, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    padding: 8px 10px !important;
    /* Narrower strip to save space */
    z-index: 99 !important;
    /* Below hamburger/header-head but above content */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 98, 0, 0.2) !important;
  }

  .year-nav a {
    color: white !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 0.5px !important;
  }

  .year-nav a:active,
  .year-nav a:hover {
    background: linear-gradient(135deg, #ff6200, #ff8c00) !important;
    color: white !important;
    border-color: transparent !important;
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(255, 98, 0, 0.4) !important;
  }

  /* Pulse animation for Sponsor Button */
  @keyframes pulse-glow {
    0% {
      box-shadow: 0 0 0 0 rgba(255, 98, 0, 0.7);
    }

    70% {
      box-shadow: 0 0 0 10px rgba(255, 98, 0, 0);
    }

    100% {
      box-shadow: 0 0 0 0 rgba(255, 98, 0, 0);
    }
  }

  .footer-sponsor-btn {
    animation: pulse-glow 2s infinite !important;
    background: linear-gradient(135deg, #ff6200, #ff4500) !important;
    border: none !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    box-shadow: 0 8px 25px rgba(255, 98, 0, 0.4) !important;
  }

  .footer-top-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 40px !important;
    padding: 10px 24px !important;
    color: white !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  }

  .footer-actions {
    bottom: 25px !important;
    right: 25px !important;
    gap: 15px !important;
  }

  /* --- 9. UNIVERSAL COMPETITION GRID (2-per-row High Density) --- */
  /* This covers all years and all competition types (DDC, SUAS, SAE, IROC, etc.) */

  .ddc-specs-grid,
  .mission-grid-container,
  .cards-grid,
  .systems-grid,
  .technical-3x3-grid,
  .drone-specs-grid,
  .highlights-grid,
  .gallery-specs-grid,
  .out-ach-container,
  .missions,
  .mission-highlights,
  .design-grid,
  .achievements-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 10px 5px !important;
    margin: 0 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    position: relative !important;
    bottom: 0 !important;
    top: 0 !important;
  }

  .design-grid > .design-card:last-child:nth-child(odd),
  .achievements-grid > .achievement-card:last-child:nth-child(odd),
  .mission-highlights > .highlight-card:last-child:nth-child(odd) {
    grid-column: span 2 !important;
  }

  /* Universal Block Styling */
  .ddc-specs-panel,
  .spec-card,
  .sys-module,
  .tech-tile,
  .objective-card,
  .class-card,
  .highlight-card,
  .gallery-spec-card,
  .achievement-container,
  .mission-card,
  .design-card,
  .achievement-card {
    width: 100% !important;
    padding: 15px 8px !important;
    min-height: auto !important;
    height: auto !important;
    border-radius: 12px !important;
    margin: 0 !important;
    flex-direction: column !important;
    /* Stack content inside cards */
    display: flex !important;
    align-items: center !important;
    text-align: center !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }

  .design-card::after,
  .highlight-card::after {
    display: none !important; /* Hide 'click to view' text on mobile to declutter */
  }

  .card-number {
    font-size: 2.5rem !important;
    margin-bottom: 10px !important;
  }

  .card-features {
    padding: 0 !important;
    margin: 10px 0 0 0 !important;
    width: 100% !important;
  }

  .card-features li {
    justify-content: center !important;
    font-size: 0.7rem !important;
    padding: 4px 0 !important;
    gap: 5px !important;
  }

  /* Specific Card Content Refinements */
  .mission-card .image-container,
  .objective-image-card,
  .logo-section-achivement,
  .image-container {
    width: 100% !important;
    height: 120px !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    flex: none !important;
  }

  .mission-card .content,
  .text-section-achivement,
  .objective-content,
  .content {
    width: 100% !important;
    padding: 10px !important;
    text-align: center !important;
    flex: none !important;
  }

  .mission-card img,
  .objective-image-card img,
  .logo-section-achivement img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  /* Typography rescaling for high-density cards */
  .mission-card h2,
  .achievement-title,
  .tech-tile h3,
  .spec-card h3,
  .class-card h3,
  .content h2,
  .ddc-specs-panel-header h3,
  .design-card h3,
  .achievement-label {
    font-size: 0.85rem !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.2 !important;
    width: 100% !important;
    text-align: center !important;
  }

  .mission-card p,
  .achievement-details,
  .tech-tile p,
  .class-card p,
  .content p,
  .ddc-specs-list li,
  .design-card p,
  .achievement-card p {
    font-size: 0.72rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Hero & Section Heading Normalization */
  /* Force full centering for all hero layouts */
  .hero-overlay,
  .hero-section,
  .hero-text,
  .video-overlay,
  .video-text,
  #hero-video,
  .hero-video {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    /* Lift it up from center */
    align-items: center !important;
    text-align: center !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 15vh 20px 0 !important;
    /* Generate space at top */
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    object-fit: cover !important;
  }

  .video-text h1,
  .hero-text h1,
  .description h1,
  .hero-title,
  .ach-head,
  .mission-main-title,
  .team-heading,
  .section-heading,
  .he {
    font-size: clamp(2.5rem, 12vw, 4rem) !important;
    margin: 20px auto 10px !important;
    width: 100% !important;
    text-align: center !important;
    letter-spacing: normal !important;
    position: relative !important;
    bottom: 0 !important;
    top: 0 !important;
    display: block !important;
  }

  .video-text p,
  .hero-text p,
  .description p,
  .hero-subtitle,
  .tex {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    text-align: center !important;
    width: 100% !important;
    margin: 5px auto 15px !important;
  }

  /* Specific fix for DDC Pages with percentage-based font sizes */
  .title-line {
    font-size: 15vw !important;
    letter-spacing: 2px !important;
    margin-bottom: 5px !important;
  }

  .title-year {
    font-size: 12vw !important;
    letter-spacing: 1px !important;
    margin-top: 0 !important;
  }

  /* Gallery Frame Section Mobile Integration */
  .gallery-frame-container {
    flex-direction: column !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  .gallery-frame-nav {
    width: 100% !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 98, 0, 0.2) !important;
    height: auto !important;
    padding: 10px 0 !important;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-nav-item {
    height: auto !important;
    min-width: 160px !important;
    padding: 15px 10px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
    background: transparent !important;
  }

  .gallery-nav-item.active {
    background: #ff6200 !important;
  }

  .gallery-nav-icon {
    font-size: 1.5rem !important;
    margin-bottom: 5px !important;
  }

  .gallery-nav-text h2 {
    font-size: 1rem !important;
    margin: 0 !important;
  }

  .gallery-nav-text p {
    font-size: 0.7rem !important;
    opacity: 0.8 !important;
  }

  .gallery-frame-content,
  .gallery-frame-wrapper {
    width: 100% !important;
    height: auto !important;
  }

  #gallery-content-frame {
    min-height: 400px !important;
  }

  /* Remove any aggressive shifts from competition.css */
  .flex-container1, .flex-container2, .seperator-ach, .achievement-list {
    position: relative !important;
    bottom: 0 !important;
    top: 0 !important;
    margin: 20px auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .separator1 {
    width: 60px !important;
    height: 3px !important;
    margin: 10px auto !important; /* Tighter vertical space */
    background: #ff6200 !important;
    position: relative !important;
    bottom: 0 !important;
  }

  .container {
    padding-top: 10px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    gap: 20px !important;
  }

  /* Team Grid (Generic fallback) */
  .team-grid,
  .ddc-team-grid,
  .team-photo {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 15px !important;
    width: 100% !important;
    margin: 0 !important;
    position: relative !important;
    bottom: 0 !important;
  }

  .ddc-team-member,
  .row1-photo1 {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .row1-data1 {
    width: 100% !important;
    padding: 0 10px !important;
    margin: 10px auto 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .ddc-team-member #pass,
  .row1-photo1 img,
  .team-placeholder {
    width: 100% !important;
    max-width: 160px !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  .name {
    font-size: 1.25rem !important;
    line-height: 1.1 !important;
  }

  .name-row {
    justify-content: center !important;
    gap: 8px !important;
  }

  .role {
    font-size: 0.75rem !important;
    opacity: 0.8 !important;
  }
}


/* --- 4. SMALL TABLET / LARGE PHONE (max-width: 768px) --- */
/* Migrated from comp.css */
@media screen and (max-width: 768px) {
  .premium-card {
    flex-direction: column;
    height: auto;
  }

  .image-box {
    height: 200px;
    flex: none;
    clip-path: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .content-box {
    padding: 20px;
  }

  .sec1head {
    font-size: 2.2rem;
    margin-top: 40px !important; /* Add space above as requested */
    margin-bottom: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .blog-container {
    gap: 20px;
    padding: 0 15px;
  }

  .card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .highlight-text {
    font-size: 1.3rem;
  }

  .sponsor-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 5. MOBILE PHONE (max-width: 750px) --- */
/* Migrated from index.css (Navbar part) */
@media screen and (max-width: 750px) {
  .navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
    /* Minimal padding */
    margin-top: 0 !important;
    background-color: #000;
  }

  .navbar ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
  }

  .navbar li {
    margin: 8px 0;
    width: 100%;
    justify-content: center;
  }

  .navbar a {
    padding: 5px;
    font-size: 14px;
  }

  .search-wrapper {
    /* Handled in header-top section for mobile */
  }

  /* Contact Form - Compact Mobile Version */
  .contact-container {
    width: 94% !important;
    margin: 20px auto !important;
  }

  .contact-left,
  .contact-right {
    padding: 15px 12px !important;
  }

  .contact-left h3,
  .contact-right h3 {
    font-size: 1.3rem !important;
    margin-bottom: 8px !important;
  }

  .contact-right h4 {
    font-size: 1.1rem !important;
  }

  .contact-head {
    font-size: 1.8rem !important;
    margin-bottom: 5px !important;
  }

  .contact-para {
    font-size: 0.9rem !important;
    margin-bottom: 15px !important;
    line-height: 1.4 !important;
  }

  .input-row {
    margin-bottom: 8px !important;
  }

  .input-group {
    margin-bottom: 8px !important;
  }

  /* Minimize the gap created by empty <p> tags in HTML */
  .contact-left p {
    margin: 0 !important;
    height: 0 !important;
  }

  label {
    font-size: 13px !important;
    margin-bottom: 2px !important;
    display: block;
  }

  input,
  textarea {
    padding: 10px 8px !important;
    font-size: 14px !important;
    margin-top: 0 !important;
  }

  .submit-btn {
    padding: 14px !important;
    font-size: 15px !important;
    background: linear-gradient(135deg, #ff6200, #ff8c00) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 98, 0, 0.3) !important;
    text-transform: uppercase !important;
  }
}

/* --- 6. SMALL MOBILE (DEPRECATED: Combined with 900px above) --- */
@media screen and (max-width: 720px) {
  .background-gradient {
    display: none;
  }
}

/* --- 7. EXTREME MOBILE (max-width: 480px) --- */
@media screen and (max-width: 480px) {
  .sec1head {
    font-size: 1.8rem;
  }

  .content-box h2 {
    font-size: 1.5rem;
  }

  .brand-tagline {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }

  .blog-container {
    margin-top: 30px;
    gap: 15px;
  }

  .card {
    width: 100%;
    min-height: 380px !important;
  }

  .image {
    height: 320px !important;
    /* Unified heroic height across all cards */
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.03) !important;
    /* Subtle background matching blogs card feel */
    overflow: hidden !important;
    border-radius: 15px 15px 0 0 !important;
  }

  .image img {
    height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
    /* Safety for logos to avoid cropping */
    padding: 15px !important;
    /* Elegant breathing room for logos */
  }

  .flex-container1,
  .flex-container2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    padding: 15px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 95% !important;
    margin: 0 auto 30px !important;
  }

  .text,
  .he,
  .tex {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 10px !important;
    display: block !important;
  }

  .out-ach-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* 2 side-by-side */
    gap: 12px !important;
    padding: 10px !important;
    width: 100% !important;
  }

  .achievement-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 15px 10px !important;
    width: 100% !important;
    min-height: 180px !important;
    /* Smaller height for small side-by-side cards */
    margin: 0 !important;
    aspect-ratio: auto !important;
  }

  .logo-section-achivement {
    height: 80px !important;
    /* Increased for better visibility */
    width: 100% !important;
    margin-bottom: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .logo-section-achivement img {
    max-height: 70px !important;
    /* Larger logo */
    width: auto !important;
    padding: 5px !important;
    /* Less padding, more logo visibility */
    object-fit: contain !important;
  }

  .achievement-title {
    font-size: 0.9rem !important;
    /* Smaller text for side-by-side */
    line-height: 1.2 !important;
    margin-bottom: 5px !important;
  }

  .achievement-details {
    font-size: 0.8rem !important;
    opacity: 0.8 !important;
  }

  .content,
  .content2,
  .content3 {
    padding: 15px !important;
  }

  .highlight-text {
    font-size: 1.2rem !important;
    margin-bottom: 10px !important;
  }

  .read-more {
    padding: 12px 28px !important;
    font-size: 0.9rem !important;
    background: linear-gradient(135deg, #ff6200, #ff8c00) !important;
    border: none !important;
    color: white !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 5px 15px rgba(255, 98, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
  }

  /* --- 8. TEAM GRID MOBILE REFINEMENT (2-per-row) --- */
  .team-photo,
  .team-grid,
  .team-grid-new,
  .team-grid-flex,
  .team-grid-new-design,
  .ddc-team-grid,
  .gallery-specs-grid,
  .ddc-team-section {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    max-width: 100% !important;
    padding: 10px !important;
    width: 100% !important;
  }

  /* Modern Glass Cards (Competitive Years/IARC/IROC) */
  .team-card-new {
    width: calc(50% - 10px) !important;
    min-width: 0 !important;
    padding: 12px 8px !important;
    border-radius: 15px !important;
    height: auto !important;
  }

  .team-card-new .image-wrapper {
    height: 160px !important;
    /* Calibrated for side-by-side */
    margin-bottom: 10px !important;
    border-radius: 12px !important;
  }

  .team-card-new .name-box h3 {
    font-size: 1rem !important;
    line-height: 1.2;
  }

  .team-card-new .role-tag {
    font-size: 0.65rem !important;
    letter-spacing: 0.5px !important;
    margin-top: 4px !important;
  }

  /* Legacy Cards (General Team Pages) */
  .row1-photo1,
  .ddc-team-member {
    width: calc(50% - 12px) !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding-bottom: 20px !important;
    min-width: 0 !important; /* Allow shrinking */
  }

  .row1-photo1 #pass,
  .ddc-team-member #pass {
    width: 100% !important;
    max-width: 150px !important;
    height: 180px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    margin: 0 auto !important;
  }

  .row1-data1 {
    width: 100% !important;
    text-align: center !important;
    padding: 0 5px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #name,
  .name {
    font-size: 1.1rem !important;
    /* Smaller for 2-up */
    margin-top: 5px !important;
    display: block !important;
    line-height: 1 !important;
    font-family: 'Anton', sans-serif !important;
    color: white !important;
  }

  #role,
  .role {
    font-size: 0.7rem !important;
    text-align: center !important;
    margin-top: 4px !important;
    opacity: 0.8 !important;
    color: #ff6200 !important;
    letter-spacing: 1px !important;
  }

  .separator1 {
    width: 40% !important;
    height: 2px !important;
    margin: 8px auto !important;
    background: #ff6200 !important;
  }

  .name-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 5px !important;
  }

  .name-row span.name {
    margin: 0 !important;
  }

  .name-row a {
    display: flex !important;
    align-items: center !important;
    color: #0077b5 !important; /* LinkedIn Blue */
    font-size: 1.1rem !important;
  }

  .name-row a i {
    color: #0077b5 !important;
  }

  .name-row a:hover {
    color: white !important;
  }

  .gallery-image-view {
    height: 220px !important;
    width: 100% !important;
  }
}