/* Responsive Styles for Nonprofit Grant Roadshow Template */

/* Mobile First Approach - Base styles for mobile (320px+) */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  :root {
    --h1-size: 1.6rem;
    --h2-size: 1.4rem;
    --h3-size: 1.2rem;
    --p-size: 0.9rem;
    --navbar-brand-size: 1rem;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 12px !important;
    font-size: var(--navbar-brand-size) !important;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-nav {
    text-align: center;
    padding-top: 1rem;
  }
  
  .navbar-nav .nav-link {
    font-size: 10px !important;
    padding: 0.75rem 0;
    margin: 0;
  }
  
  /* Hero Section */
  .hero {
    min-height: 60vh;
    text-align: center;
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-image {
    margin-top: 2rem;
    border-radius: 10px;
  }
  
  .hero-shape-1, .hero-shape-2 {
    display: none;
  }
  
  /* Sections */
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  /* Cards and layouts */
  .service-card {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }
  
  .price-card {
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  /* Team photos */
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  /* Forms */
  .form-control {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .btn-primary {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  /* Contact info */
  .contact-info {
    padding: 1.5rem;
  }
  
  .contact-info-item {
    flex-direction: column;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .contact-info-item i {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 1.5rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --h1-size: 1.9rem;
    --h2-size: 1.6rem;
    --h3-size: 1.3rem;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-photo {
    width: 150px;
    height: 150px;
  }
  
  .contact-info-item {
    flex-direction: row;
    text-align: left;
  }
  
  .contact-info-item i {
    margin-right: 1rem;
    margin-bottom: 0;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Swiper and sliders - disable autoplay and effects on mobile <768px */
  .swiper {
    --swiper-navigation-size: 30px;
  }
  
  .swiper-slide {
    transition: none;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .price-card {
    padding: 2.5rem 2rem;
  }
  
  .team-photo {
    width: 180px;
    height: 180px;
  }
  
  .hero {
    min-height: 80vh;
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hero {
    min-height: 90vh;
  }
  
  .section {
    padding: 3.5rem 0;
  }
  
  /* Enable full Swiper functionality on desktop */
  .swiper {
    --swiper-navigation-size: 44px;
  }
  
  .swiper-slide {
    transition: transform 0.3s ease;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero {
    min-height: 100vh;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .container {
    max-width: 1200px;
  }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: 100vh;
    padding: 1rem 0;
  }
  
  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .team-photo,
  .gallery-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .navbar,
  .hero-shape-1,
  .hero-shape-2,
  .btn,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    background: white !important;
    color: black !important;
  }
  
  .hero h1,
  .hero p {
    color: black !important;
  }
  
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  
  .service-card,
  .price-card,
  .feature-card {
    box-shadow: none !important;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-shape-1,
  .hero-shape-2 {
    animation: none !important;
  }
  
  .swiper {
    --swiper-transition-duration: 0ms;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-green: #000000;
    --secondary-blue: #000000;
    --accent-orange: #000000;
    --neutral-gray: #000000;
    --warm-gold: #000000;
  }
  
  .btn-primary {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
  }
  
  .btn-outline-primary {
    background: transparent !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
  }
  
  .service-card,
  .price-card,
  .feature-card {
    border: 2px solid #000000;
  }
}

/* Dark mode preferences */
@media (prefers-color-scheme: dark) {
  /* This template uses a light theme by default, but we can add subtle dark mode touches */
  .navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .service-card,
  .price-card,
  .feature-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
}

/* Focus indicators for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-green);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover,
  .price-card:hover,
  .feature-card:hover {
    transform: none;
  }
  
  .gallery-item:hover {
    transform: none;
  }
  
  .btn-primary:hover,
  .btn-outline-primary:hover {
    transform: none;
  }
}

/* Container max-width adjustments */
@media (min-width: 1200px) {
  .container-xl {
    max-width: 1200px;
  }
}

/* Specific adjustments for navbar collapse */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--white);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 360px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero h1 {
    font-size: 1.4rem;
  }
  
  .service-card,
  .price-card,
  .feature-card {
    padding: 1rem;
  }
  
  .contact-info {
    padding: 1rem;
  }
} 