/* ============================================
   Media Queries - Mobile First Approach
   ============================================ */

/* Extra Large Devices (Large desktops) */
@media screen and (max-width: 1400px) {
  body .navbar .nav-link {
    padding: 0 10px !important;
    margin: 0 10px;
    font-size: 18px;
  }
  
  .back-to-top {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Large Devices (Desktops) */
@media screen and (max-width: 1200px) {
  body .navbar .custom-logo-link img {
    width: 80px;
    height: 60px;
    -o-object-fit: contain;
       object-fit: contain;
  }
  body .navbar .nav-link {
    padding: 0 6px !important;
    margin: 0 5px;
    font-size: 16px;
  }
  body .hero-banner {
    background-size: cover;
    height: 50vh;
    min-height: 500px;
    width: 100%;
  }
  body .hero-banner .hero-content-wrapper {
    top: 40%;
  }
  body .hero-banner .hero-content-wrapper h1 {
    font-size: 40px;
    line-height: 40px;
  }
  body .hero-banner .hero-content-wrapper p {
    font-size: 20px;
  }
  body .hero-banner .hero-content-wrapper .subscription-btn-wrapper {
    margin-bottom: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }
  body .hero-banner .hero-content-wrapper .subscription-btn-wrapper .subscription-btn {
    line-height: 20px;
    font-size: 16px;
    padding: 12px 18px;
  }
}

/* Medium Devices (Tablets) */
@media screen and (max-width: 991px) {
  :root {
    --spacing-4xl: 4rem;
    --spacing-3xl: 3rem;
  }
  
  body {
    overflow-x: hidden;
  }
  
  /* Navbar mobile layout */
  body header .navbar .container {
    flex-wrap: wrap;
  }
  body header .custom-logo-link {
    -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
            order: 2;
  }
  body header .navbar-toggler {
    -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
            order: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: none;
    background: transparent;
    z-index: 1001;
  }
  body header .navbar-toggler:focus {
    box-shadow: none;
    outline: 3px solid var(--color-primary);
  }
  body header .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854z'/%3e%3c/svg%3e");
  }
  body header #header-btns-wrapper {
    -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
            order: 3;
  }
  body header #header-btns-wrapper .subscription-btn,
  body header #header-btns-wrapper .header-join-btn {
    padding: 8px 15px;
    font-size: 12px;
  }
  
  /* Mobile menu - hidden by default */
  body header .navbar-collapse {
    position: absolute;
    top: 100%;
    z-index: 1000;
    width: 100%;
    right: 0;
    left: 0;
    background-color: rgba(254, 196, 48, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Hidden state - Bootstrap's collapse class */
  body header .navbar-collapse:not(.show) {
    display: none !important;
  }
  
  /* When menu is open */
  body header .navbar-collapse.show {
    display: block !important;
  }
  
  body header .navbar-collapse.collapsing {
    display: block !important;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
  }
  
  body header .navbar-nav {
    padding: 20px 0;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
  }
  body header .navbar-nav li {
    padding: 15px 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: center;
  }
  body header .navbar-nav .nav-link {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-dark);
  }
  body .hero-banner {
    height: auto;
    min-height: 400px;
    padding: 100px 20px 50px;
  }
  body .hero-banner::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
  }
  body .hero-banner .hero-content-wrapper {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    text-align: center;
  }
  body .hero-banner .hero-content-wrapper h1 {
    font-size: 28px;
    line-height: 36px;
  }
  body .hero-banner .hero-content-wrapper p {
    font-size: 16px;
    line-height: 24px;
  }
  body .hero-banner .hero-content-wrapper .subscription-btn-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  body .hero-banner .hero-content-wrapper .subscription-btn-wrapper .subscription-btn {
    line-height: 18px;
    font-size: 14px;
    padding: 10px 15px;
  }
  body .hero-banner .hero-content-wrapper .scroll-wrapper {
    display: none;
  }
  body .hero-banner #hero-star,
  body .hero-banner #hero-letters {
    display: none;
  }
  body .hero-banner .hero-main-img {
    display: none;
  }
  body .about-academy {
    padding-top: 60px;
    padding-bottom: 40px;
  }
  body .about-academy .about_content_wrapper {
    background-image: none !important;
    padding-right: 0;
    text-align: center;
  }
  body .about-academy .about_title {
    font-size: 20px;
  }
  body .about-academy .about-image,
  body .about-academy .about_image_wrapper img {
    max-width: 100%;
    margin-top: 30px;
  }
  body .our-programs {
    padding: 40px 0;
  }
  body .our-programs::after,
  body .our-programs::before {
    display: none;
  }
  body .our-programs .our_programs_title {
    font-size: 24px;
  }
  body .our-programs-cards {
    padding-bottom: 80px;
  }
  body .our-programs-cards #left-button-slider,
  body .our-programs-cards #right-button-slider {
    width: 50px;
    height: 50px;
  }
  body .our-programs-cards #left-button-slider {
    left: 10px;
  }
  body .our-programs-cards #right-button-slider {
    right: 10px;
  }
  body .our-programs-cards .single_program_card {
    text-align: center;
    margin-bottom: 30px;
  }
  body .our-programs-cards .single_program_card img {
    max-width: 200px;
    margin: 0 auto;
  }
  body .our-programs-cards > img:last-of-type {
    display: none;
  }
  body .latest-news {
    padding: 40px 0;
  }
  body .latest-news #latest-news-content {
    text-align: center;
  }
  body .latest-news #latest-news-content #latest-news-headings h3 {
    font-size: 20px;
  }
  body .latest-news #latest-news-images {
    position: relative;
    height: auto;
    overflow: hidden;
  }
  body .latest-news #latest-news-images img,
  body .latest-news #latest-news-images .news-img {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    max-width: 100%;
    width: 80%;
    margin: 10px auto;
    display: block;
  }
  body .latest-news .news-arrow {
    display: none !important;
  }
  body #occasions-events {
    padding: 40px 0 80px;
  }
  body #occasions-events .left-icon,
  body #occasions-events .right-icon {
    display: none;
  }
  body #occasions-events #occasions-titles-wrapper h1 {
    font-size: 22px;
  }
  body #occasions-events .portfolio-wraper .simplefilter {
    flex-wrap: wrap;
    justify-content: center;
  }
  body #occasions-events .portfolio-wraper .simplefilter li {
    padding: 8px 20px;
    margin: 5px;
    font-size: 14px;
  }
  body #occasions-events .gallery-grid {
    gap: 10px;
  }
  body #occasions-events .gallery-grid .gallery-item {
    width: calc(50% - 10px);
  }
  body #occasions-events .gallery-grid .gallery-item img {
    width: 100%;
    height: auto;
  }
  body #volunteer {
    padding: 40px 0;
  }
  body #volunteer #v-left-icon,
  body #volunteer #v-right-icon {
    display: none;
  }
  body #volunteer #volunteer-content-wrapper {
    text-align: center;
  }
  body #volunteer #volunteer-content-wrapper h1 {
    font-size: 22px;
  }
  body #volunteer #volunteer-content-wrapper p {
    font-size: 16px;
  }
  body #volunteer #volunteer-buttons-wrapper {
    flex-direction: column;
    gap: 15px;
  }
  body #volunteer #volunteer-buttons-wrapper a {
    margin: 0 !important;
    padding: 12px 20px;
  }
  body .contact {
    padding: 40px 0;
    background-size: 0 !important;
  }
  body .contact #contact-home-icon,
  body .contact #contact-star-icon {
    display: none;
  }
  body .contact #contact-titles-wrapper {
    text-align: center;
  }
  body .contact #contact-titles-wrapper h1 {
    font-size: 22px;
  }
  body .contact .contact-form {
    padding: 0 15px;
  }
  body .contact-info {
    margin-bottom: 40px;
  }
  body .contact-info .row > div {
    margin-bottom: 30px;
  }
  body .contact-info .single-contact-info-wrapper {
    flex-direction: column;
    text-align: center;
  }
  body .statistics {
    padding: 60px 0;
  }
  body .statistics .kid-img {
    display: none;
  }
  body .statistics .stat-item {
    margin-bottom: 30px;
  }
  body .statistics .stat-number {
    font-size: 32px;
  }
  body .statistics .stat-title {
    font-size: 14px;
  }
  body footer {
    padding: 60px 0 20px;
  }
  body footer .row > div {
    margin-bottom: 30px;
  }
  body footer #footer-desc-column {
    text-align: center;
  }
  body footer #footer-desc-column svg {
    margin: 0 auto 20px;
  }
  body footer #footer-desc-column p {
    font-size: 12px;
    line-height: 22px;
  }
  body footer #footer-menu-wrapper {
    text-align: center;
  }
  body footer #footer-menu-wrapper .footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  body footer #footer-menu-wrapper .footer-menu li {
    margin-bottom: 10px;
  }
  body footer #footer-contact-column {
    text-align: center;
  }
  body footer #footer-contact-column .footer-single-info {
    justify-content: center;
  }
}

/* Small Devices (Landscape phones) */
@media screen and (max-width: 767px) {
  :root {
    --spacing-4xl: 3rem;
    --spacing-3xl: 2rem;
  }
  
  body .hero-banner .hero-content-wrapper h1 {
    font-size: 24px;
    line-height: 32px;
  }
  body .hero-banner .hero-content-wrapper p {
    font-size: 14px;
  }
  body .about-academy .blob-background {
    display: none;
  }
  body .about-academy .row {
    flex-direction: column;
  }
  body .about-academy .about_image_wrapper {
    order: -1;
    margin-bottom: 20px;
  }
  body .our-programs-cards .single_program_card img {
    max-width: 150px;
  }
  body #occasions-events .gallery-grid .gallery-item {
    width: 100%;
  }
  body .statistics .row {
    flex-direction: column;
  }
  body .statistics .stat-item {
    width: 100%;
  }
  
  /* Footer adjustments */
  footer .row > div {
    text-align: center;
  }
  footer #footer-desc-column svg {
    margin: 0 auto 20px;
  }
}

/* Extra Small Devices (Portrait phones) */
@media screen and (max-width: 575px) {
  :root {
    --spacing-4xl: 2.5rem;
    --spacing-3xl: 1.5rem;
  }
  
  body header #header-btns-wrapper {
    flex-direction: row;
    gap: 5px;
  }
  body header #header-btns-wrapper .subscription-btn,
  body header #header-btns-wrapper .header-join-btn {
    padding: 5px 10px;
    font-size: 10px;
  }
  /* Hide language switcher on very small screens */
  body header #header-btns-wrapper .language-switcher {
    display: none;
  }
  body .hero-banner {
    min-height: 350px;
    padding: 80px 15px 40px;
  }
  body .hero-banner .hero-content-wrapper h1 {
    font-size: 20px;
    line-height: 28px;
  }
  body .our-programs .our_programs_title {
    font-size: 20px;
  }
  body .latest-news #latest-news-content #latest-news-headings h3 {
    font-size: 18px;
  }
  body #occasions-events #occasions-titles-wrapper h1 {
    font-size: 18px;
  }
  body #volunteer #volunteer-content-wrapper h1 {
    font-size: 18px;
  }
  body .contact #contact-titles-wrapper h1 {
    font-size: 18px;
  }
  body footer #footer-menu-wrapper .footer-menu li a {
    font-size: 14px;
  }
  
  /* Back to top button mobile position */
  .back-to-top {
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
  }
  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
  
  /* Lightbox mobile adjustments */
  .lightbox-overlay {
    padding: 10px;
  }
  .lightbox-close {
    top: 10px;
    left: 10px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .navbar .nav-link,
  .header-join-btn,
  .subscription-btn,
  .about_btn,
  button[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Increase tap targets */
  .footer-menu li a {
    padding: 10px 0;
    display: inline-block;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #FFD000;
    --color-secondary: #FF0050;
  }
  
  body .hero-banner::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
  }
}

/* Print styles */
@media print {
  .navbar,
  .back-to-top,
  #header-btns-wrapper,
  .hero-banner .subscription-btn-wrapper,
  .scroll-wrapper,
  iframe {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
  
  .hero-banner {
    height: auto !important;
    min-height: auto !important;
    padding: 20px !important;
    background: #f5f5f5 !important;
  }
  
  section {
    page-break-inside: avoid;
  }
}