/* ==========================================================================
   Responsive Styles for DMF Network
   Premium, Apple-inspired responsiveness
   ========================================================================== */

/* --------------------------------------------------------------------------
   Ultra-wide Screens (min-width: 2000px)
   -------------------------------------------------------------------------- */
@media (min-width: 2000px) {
  .container {
    max-width: 1800px;
  }
  .hero {
    min-height: 80vh;
  }
}

/* --------------------------------------------------------------------------
   Large Desktop (min-width: 1401px)
   -------------------------------------------------------------------------- */
@media (min-width: 1401px) {
  .container {
    max-width: 1320px;
  }
}

/* --------------------------------------------------------------------------
   Desktop (max-width: 1400px)
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
  .hero-title {
    font-size: clamp(3.5rem, 5vw, 4.5rem);
  }
}

/* --------------------------------------------------------------------------
   Small Desktop (max-width: 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .hero-title {
    font-size: clamp(3rem, 4.5vw, 4rem);
  }
  
  .about-preview-grid,
  .contact-preview-grid,
  .story-grid,
  .founder-grid,
  .contact-grid {
    gap: 40px;
  }

  .features-grid,
  .why-grid,
  .courses-grid,
  .values-grid,
  .achievements-grid,
  .team-grid {
    gap: 24px;
  }
  
  .mv-grid {
    gap: 32px;
  }
}

/* --------------------------------------------------------------------------
   Tablet & Mobile Menu (max-width: 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Navigation & Mobile Menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
  }

  .hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    margin: 0; /* Remove margin so justify-content handles spacing */
    flex-shrink: 0; /* Prevent flexbox from shrinking the height to 0 */
    background-color: var(--color-white); /* Always white on dark header/sidebar */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--color-white);
  }

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

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--color-white);
  }

      .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: rgba(17, 17, 21, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem 15%;
    z-index: 999;
    box-shadow: none;
    gap: 1.2rem;
    overflow-y: auto;
    transition: right 0.3s ease;
  }
  
  .nav-cta {
    display: none;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links .nav-link {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0;
    border: none;
    color: var(--color-text-dark) !important;
    text-align: left;
    width: 100%;
    display: block;
    margin: 0;
    position: relative;
    white-space: nowrap;
  }
  
  .nav-links .nav-link::after {
    display: none !important;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    color: var(--color-primary) !important;
  }

  .nav-links .nav-link.active::before,
  .nav-links .nav-link:hover::before {
    display: none !important;
  }
  
  .nav-links .nav-link.active,
  .nav-links .nav-link:hover {
    color: var(--color-primary) !important;
    padding-left: 1.5rem !important;
    border-left: 4px solid var(--color-primary) !important;
    background-color: rgba(0, 112, 248, 0.05) !important;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-socials {
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
  }
  
  .mobile-menu-socials a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-socials a:hover {
    color: var(--color-primary);
  }
  
  .mobile-menu-logo {
    display: none;
  }
.mobile-menu-logo {
    display: none;
  }

  /* Mobile Dropdown */
  .has-dropdown {
    position: relative;
    width: 100%;
  }

  .has-dropdown > .nav-link {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .has-dropdown > .nav-link .dropdown-arrow {
    font-size: 1rem;
    margin-left: auto;
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown-menu::before {
    display: none !important;
  }

  .has-dropdown.open > .dropdown-menu {
    max-height: 400px;
  }

  .dropdown-menu a {
    color: rgba(22, 20, 20, 0.7) !important;
    padding: 0.6rem 0 0.6rem 1.5rem !important;
    font-size: 1rem !important;
    border-left: 2px solid rgba(0, 112, 248, 0.3);
    margin-left: 0.5rem;
  }

  .dropdown-menu a:hover {
    color: var(--color-primary) !important;
    background: transparent !important;
    padding-left: 2rem !important;
    border-left-color: var(--color-primary);
  }

  body.no-scroll {
    overflow: hidden;
  }
  
  /* Grids */
  .features-grid,
  .why-grid,
  .courses-grid,
  .values-grid,
  .achievements-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-preview-grid,
  .contact-preview-grid,
  .story-grid,
  .founder-grid,
  .mv-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  
  .footer-col:first-child {
    grid-column: 1 / -1;
  }

  /* Timeline */
  .timeline::before {
    left: 24px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 64px;
    padding-right: 0;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item::after {
    left: 16px;
  }
  
  .timeline-item:nth-child(even)::after {
    left: 16px;
  }
  
  .timeline-content {
    text-align: left;
  }
  
  /* Typography */
  .section-title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }
}

/* --------------------------------------------------------------------------
   Tablet Portrait (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Section Padding */
  .section {
    padding: 80px 0;
  }
  
  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 140px 0 80px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .hero-stats-mini {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
  }
  
  .hero-stat strong {
    font-size: 1.3rem;
  }
  
  .hero-stat span {
    font-size: 0.8rem;
  }
  
  .page-hero {
    padding: 120px 0 60px;
  }

  /* Grids */
  .features-grid,
  .why-grid,
  .courses-grid,
  .values-grid,
  .achievements-grid,
  .team-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Decorative Shapes */
  .floating-shapes,
  .shape {
    display: none;
  }
  
  /* Layout Adjustments */
  .about-preview-image {
    order: -1;
  }
  
  .story-image,
  .founder-image {
    order: -1;
  }
  
  .contact-info-side {
    order: 2;
  }
  
  .contact-form-side {
    order: 1;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Mobile (max-width: 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  /* Layout & Padding */
  .section {
    padding: 60px 0;
  }
  
  .container {
    padding: 0 20px;
  }
  
  /* Typography */
  .hero-title {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  /* Cards */
  .stat-card,
  .feature-card,
  .why-card,
  .course-card,
  .testimonial-card,
  .faq-item,
  .value-card,
  .achievement-card,
  .team-card,
  .contact-info-card,
  .contact-form-card {
    padding: 24px;
  }
  
  /* Forms */
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  
  /* Navbar */
  .navbar {
    padding: 16px 20px;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   Extra Small (max-width: 400px)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-stats-mini {
    gap: 0.8rem;
  }
  
  .hero-stat strong {
    font-size: 1.1rem;
  }
  
  .hero-stat span {
    font-size: 0.75rem;
  }
  
  .nav-links.active {
    max-width: 100%;
  }
  
  .video-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* --------------------------------------------------------------------------
   Mobile (max-width: 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .video-card {
    flex: 0 0 85%;
  }
  .video-nav-btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Safe Area Insets (Modern Phones)
   -------------------------------------------------------------------------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .nav-links.active {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
    padding-top: calc(100px + env(safe-area-inset-top));
  }
}

/* Why Learn With DMF Section Responsive */
@media (max-width: 991px) {
  .why-learn-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .why-learn-card {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.2rem;
    padding: 2rem 1.5rem !important;
  }
  .why-learn-icon {
    margin: 0 auto !important;
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
  .why-learn-content {
    text-align: center !important;
    width: 100%;
  }
  .why-learn-content h3 {
    text-align: center !important;
  }
  .why-learn-content p {
    text-align: center !important;
  }
  .experience-card {
    padding: 2rem 1.5rem !important;
    text-align: left !important;
  }
  .experience-card h3 {
    text-align: left !important;
  }
  .experience-list {
    align-items: flex-start !important;
  }
  .experience-list li {
    justify-content: flex-start !important;
    text-align: left !important;
  }
}

@media (max-width: 576px) {
  .why-learn-card {
    padding: 1.5rem !important;
  }
  .why-learn-icon {
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
  }
  .why-learn-content h3 {
    font-size: 1.15rem;
  }
  .experience-card {
    padding: 1.8rem 1.5rem !important;
  }
  .experience-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
  }
  .experience-list {
    gap: 1rem;
  }
  .experience-list li {
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .navbar,
  .hamburger,
  .nav-links,
  .nav-cta,
  .footer,
  .back-to-top,
  .preloader,
  .hero-buttons,
  .cta-section,
  .hero-scroll-indicator,
  .floating-shapes,
  .contact-form-side,
  .slider-controls {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .section {
    padding: 20px 0 !important;
    page-break-inside: avoid;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    background: transparent !important;
  }
  
  h1, h2, h3, p {
    color: #000 !important;
  }
  
  a {
    text-decoration: underline !important;
    color: #000 !important;
  }
}

/* --------------------------------------------------------------------------
   Prefers Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .floating-shapes,
  .shape {
    display: none !important;
  }
}
/* ==========================================================================
   STUDENT CORNER PAGE RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .student-intro-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .badge-1 { right: 10px; }
  .badge-2 { left: 10px; }
  .badge-3 { right: 10px; bottom: 10px; }
}

@media (max-width: 576px) {
  .floating-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .floating-badge i {
    font-size: 1rem;
  }
  .badge-1 { top: 5%; right: 5px; }
  .badge-2 { bottom: 15%; left: 5px; }
}

/* Center Feature Cards on Mobile */
@media (max-width: 768px) {
  .feature-card {
    text-align: center;
  }
  .feature-card .feature-icon {
    margin: 0 auto 1.5rem auto;
  }
}

/* Center About Preview on Mobile */
@media (max-width: 768px) {
  .about-preview-content, .story-content, .contact-preview-info {
    align-items: center;
    text-align: center;
  }
}

/* Reorder Founder Section on Mobile */
@media (max-width: 991px) {
  .founder-grid {
    display: flex;
    flex-direction: column;
  }
  .founder-content {
    display: contents; /* Unwrap the container */
  }
  
  .founder-content .section-tag { 
    order: 1; 
    align-self: center; 
    margin-bottom: 0.5rem;
  }
  .founder-content .section-title { 
    order: 2; 
    text-align: center; 
  }
  .founder-image { 
    order: 3; 
    margin-bottom: 1.5rem;
  }
  .founder-content .founder-quote { 
    order: 4; 
  }
  .founder-content .founder-info { 
    order: 5; 
  }
}



/* Ensure contact info cards are centered horizontally and full width on mobile */
@media (max-width: 991px) {
  .contact-preview-info,
  .contact-info-side {
    padding-right: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
  }

  .contact-details,
  .contact-info-cards {
    width: 100% !important;
    max-width: 500px !important;
    margin: 2rem auto 0 auto !important;
    align-items: center !important;
  }

  .contact-info-card, .contact-detail-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto 0.5rem auto !important;
    padding: 1.5rem !important;
  }

  /* Responsive Map Border */
  .map-container {
    height: 360px !important;
    padding: 4px !important;
    border-radius: 20px !important;
    margin-top: 2.5rem !important;
  }
  .map-container iframe {
    border-radius: 16px !important;
  }
}




