/* Responsive Breakpoints */
@media (min-width: 1024px) {
  .desktop-only {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: 1.5rem;
  }
  .mobile-only,
  .mobile-menu-btn,
  .mobile-menu-backdrop {
    display: none !important;
  }
}
@media (max-width: 1023px) {
  .desktop-only {
    display: none;
  }
  .hamburger-btn {
    display: flex; /* Changed from block to flex for proper centering */
  }
  .logo {
    margin-right: 0;
  }
  nav {
    justify-content: space-between;
  }
  .social-links:not(.mobile-social-links) { /* Hide header social links on mobile */
    display: none;
  }
}
@media (max-width: 768px) {
  .mobile-only {
    width: 60%;
  }
}
@media (max-width: 480px) {
  .mobile-only {
    width: 70%;
  }
  .social-links {
    gap: 8px;
  }
  .social-links a {
    font-size: 18px;
  }
}
@media (max-width: 400px) {
  .mobile-only {
    width: 80%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-btn .hamburger-line,
  .mobile-menu-backdrop,
  .mobile-only {
    transition: none;
  }
}
/* Desktop styles */
@media (min-width: 1024px) {
  .hero {
    min-height: min(78vh, 900px);
    text-align: left;
    padding-top: calc(var(--header-h) + 2rem);
  }
}
@media (min-width: 769px) {
  .hero {
    text-align: left;
  }
  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}
@media (min-width: 769px) {
  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}
@media (max-width: 768px) {
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Ensure hero buttons inside hero-core behave fully responsive */
@media (max-width: 768px) {
  .hero-core .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-core .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .custom-cursor-trail {
    display: none;
  }
}
@media (max-width: 992px) {
  .footer-map {
    grid-column: span 2;
  }
}
@media (max-width: 768px) {
  .footer-map {
    grid-column: span 1;
  }
}
@media (max-width: 768px) {
  .section {
    padding: 3rem 1rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .settings-panel {
    width: 100vw;
    right: -100vw;
    padding: 1.5rem;
  }
  .floating-action-buttons {
    position: fixed;
    display: flex;
    flex-direction: column;
    bottom: 1.5rem;
    right: 1rem;
    gap: 1rem;
    z-index: 9999;
  }
  .back-to-top,
  .settings-toggle,
  .ai-button {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
  .hero {
    padding: 3rem 1rem;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    margin: 0.5rem 0;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
@media (max-width: 768px) {
  .pca-grid-2-col {
    grid-template-columns: 1fr;
  }
  .hero-core {
    padding: 3rem 1.5rem;
    text-align: center;
  }
  .hero-core h1 {
    font-size: 2.2rem;
  }
  .hero-buttons .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
  }
  .pca-section {
    padding: 3rem 1.5rem;
  }
  #mission .pca-grid-2-col {
    grid-auto-flow: dense;
  }
  #mission .pca-image-col {
    grid-row: 1;
  }
  .pca-section-title {
    font-size: 2rem;
  }
  .pca-timeline {
    margin: 2rem auto;
  }
  .footer-section ul {
    display: inline-block;
    text-align: left;
  }
  .cta-buttons .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
  }
}
/* Gallery Responsive */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}
@media (max-width: 768px) {
  .gallery-header h1 {
    font-size: 2rem;
  }
  .gallery-header p {
    font-size: 1rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  .filter-buttons {
    gap: 10px;
  }
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
  .search-box {
    width: 100%;
  }
  .controls {
    flex-direction: column;
  }
  .gallery-grid.list-view .gallery-item {
    flex-direction: column;
  }
  .gallery-grid.list-view .image-wrapper {
    width: 100%;
    padding-top: 75%;
  }
  .gallery-grid.list-view .item-info {
    width: 100%;
  }
  .lightbox.active {
    padding: 20px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  .lightbox-caption {
    margin-top: 20px;
    padding: 15px;
  }
  .lightbox-caption h3 {
    font-size: 1.1rem;
  }
  .lightbox-caption p {
    font-size: 0.9rem;
  }
  .stats-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .filter-btn i {
    display: none;
  }
  .lightbox-content {
    max-width: 95%;
  }
}
@media (max-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .pca-grid-2-col {
    grid-template-columns: 1fr;
  }
  .pca-timeline::after {
    left: 25px;
  }
  .pca-timeline-item,
  .pca-timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 70px;
    padding-right: 1rem;
    text-align: left;
  }
  .pca-timeline-item:nth-child(odd) {
    padding-right: 1rem;
    text-align: left;
  }
  .pca-timeline-icon,
  .pca-timeline-item:nth-child(odd) .pca-timeline-icon,
  .pca-timeline-item:nth-child(even) .pca-timeline-icon {
    left: 0;
  }
}

/* something new */

/* MOBILE BUTTON FIXES - Critical for Android */
@media (max-width: 768px) {
  /* Force buttons to stack and wrap text */
  .hero-buttons,
  .cta-buttons,
  .about-cta-content-centered .hero-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 1rem;
  }
  
  /* Make all buttons full-width and wrap text */
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-keep-orange {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100%;
    justify-content: center !important;
    white-space: normal !important; /* Allow text wrapping */
    text-align: center;
    height: auto !important;
    min-height: 48px;
    padding: 1rem 1.5rem !important;
    font-size: 0.95rem !important;
    line-height: 1.4;
  }
  
  /* Fix SVG icons in buttons */
  .btn svg {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
  
  /* Button text wrapper */
  .btn-text, .cta-text {
    display: inline-block;
    word-wrap: break-word;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .btn, .btn-primary, .btn-secondary {
    font-size: 0.875rem !important;
    padding: 0.875rem 1.25rem !important;
  }
}
