/* We Warriors Website - Responsive Design */
/* Mobile-first approach for accessibility */

/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Typography scaling */
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 2.5rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Header - Mobile */
  .site-header {
    padding: 0;
    min-height: 70px;
  }
  
  .nav-container {
    padding: 0;
    min-height: 70px;
  }
  
  .logo-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    padding: 12px 15px !important;
    z-index: 1001 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border-radius: 0 0 15px 0 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
    max-width: 200px;
  }
  
  .logo {
    height: 35px !important;
    width: auto !important;
  }
  
  .logo-text {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
  }
  
  .hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--blood-color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-primary);
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
  }
  
  .nav-item {
    width: 100%;
    text-align: center;
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
    min-height: 44px; /* WCAG compliant touch target */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve touch targets for all interactive elements */
  .btn,
  .card-link,
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .nav-link.cta-button {
    margin-top: var(--spacing-lg);
    background: var(--journey-gradient);
    color: white !important;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .nav-link.cta-button:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
  }
  
  /* Hero - Mobile */
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }
  
  .hero-we,
  .hero-warriors {
    font-size: 2.5rem;
  }
  
  .hero-tagline {
    font-size: 1.125rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  /* Journey Visual - Mobile */
  .journey-visual {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
  }
  
  .journey-step {
    width: 60px;
    height: 60px;
  }
  
  .journey-connector {
    display: none;
  }
  
  .step-label {
    font-size: 0.75rem;
  }
  
  /* Grids - Mobile */
  .about-grid,
  .support-grid,
  .involvement-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Ensure Get Involved section is fully visible on mobile */
  .get-involved-section {
    padding: var(--spacing-xl) 0;
    min-height: auto;
    margin-bottom: var(--spacing-xl);
  }
  
  .involvement-card {
    margin-bottom: var(--spacing-lg);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .involvement-card .btn {
    margin-top: auto;
    width: 100%;
    min-height: 48px;
  }
  
  /* Community - Mobile */
  .community-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Faith - Mobile */
  .faith-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Footer - Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: var(--spacing-lg);
  }
  
  /* Enhanced Mobile Touch Targets and Buttons */
  .btn, 
  .btn-primary, 
  .btn-secondary,
  .btn-modern {
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .btn-modern:hover,
  .btn-primary:hover {
    transform: scale(1.02);
  }
  
  /* Cards - Mobile optimized */
  .about-card,
  .involvement-card,
  .support-category,
  .content-card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  
  .card-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
  
  .card-title {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .story-card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-lg);
  }
  
  .story-quote {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
  }
  
  .story-author {
    font-size: 1rem;
    font-weight: 600;
  }
  
  /* Forms - Mobile optimized */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    min-height: 48px;
    padding: var(--spacing-md);
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-fast);
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    border-color: var(--blood-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
  }
  
  /* Enhanced Link Touch Targets */
  .footer-links a,
  .breadcrumb a {
    min-height: 44px;
    padding: var(--spacing-xs) var(--spacing-sm);
    display: inline-flex;
    align-items: center;
  }
}

/* Tablet and Desktop - Show logo text */
@media (min-width: 769px) {
  .logo-text {
    display: block;
  }
}

/* Mobile Performance and Touch Optimizations */
@media (max-width: 768px) {
  /* Improve scroll performance */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Disable hover effects on touch devices */
  .about-card:hover,
  .involvement-card:hover,
  .content-card:hover {
    transform: none;
  }
  
  /* Reduce animations for better performance */
  .float-element {
    animation-duration: 10s;
  }
  
  /* Optimize images for mobile */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  .logo {
    will-change: transform;
  }
}

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
  /* Further typography scaling */
  .hero-we,
  .hero-warriors {
    font-size: 2rem;
  }
  
  .hero-tagline {
    font-size: 1rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  /* Spacing adjustments for very small screens */
  .container,
  .nav-container,
  .footer-container {
    padding: 0 var(--spacing-sm);
  }
  
  /* Button adjustments for small screens */
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-actions .btn {
    text-align: center;
  }
  
  /* Journey steps even smaller */
  .journey-step {
    width: 50px;
    height: 50px;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  /* Cards more compact */
  .about-card,
  .involvement-card,
  .support-category {
    padding: var(--spacing-md);
  }
  
  .card-icon {
    font-size: 2.5rem;
  }
  
  /* Logo smaller on very small screens */
  .logo-container .logo {
    height: 50px;
  }
  
  .footer-logo-img {
    height: 40px;
  }
}

/* Tablet devices (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-container {
    gap: var(--spacing-xl);
  }
  
  .hero-we,
  .hero-warriors {
    font-size: 2.75rem;
  }
  
  /* Adjust grid layouts for tablet */
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .involvement-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Community and Faith sections */
  .community-content,
  .faith-content {
    grid-template-columns: 3fr 2fr;
    gap: var(--spacing-xl);
  }
  
  /* Footer adjustment */
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-lg);
  }
}

/* Large screens (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .container,
  .nav-container,
  .footer-container,
  .hero-container {
    max-width: 1100px;
  }
}

/* Extra large screens (1201px+) */
@media (min-width: 1201px) {
  .hero-we,
  .hero-warriors {
    font-size: 3.5rem;
  }
  
  .hero-tagline {
    font-size: 1.5rem;
  }
  
  .hero-description {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
  
  /* Larger journey steps on big screens */
  .journey-step {
    width: 100px;
    height: 100px;
  }
  
  .step-label {
    font-size: 1rem;
  }
  
  .journey-connector {
    height: 40px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 48px;
  }
  
  .nav-link {
    padding: var(--spacing-md);
    min-height: 44px;
  }
  
  .card-link,
  .support-list a,
  .faith-list a,
  .footer-links a {
    padding: var(--spacing-sm);
    min-height: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .about-card:hover,
  .involvement-card:hover,
  .journey-step:hover {
    transform: none;
  }
  
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-community:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .site-header,
  .hero-visual,
  .mobile-menu-toggle,
  .btn {
    display: none !important;
  }
  
  main {
    margin-top: 0 !important;
  }
  
  .hero-section {
    padding: var(--spacing-lg) 0;
    min-height: auto;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  section {
    padding: var(--spacing-md) 0;
    break-inside: avoid;
  }
  
  .about-grid,
  .support-grid,
  .involvement-grid {
    grid-template-columns: 1fr;
  }
  
  .community-content,
  .faith-content {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #000000;
    --background-primary: #ffffff;
    --background-secondary: #ffffff;
    --background-accent: #ffffff;
    --blood-color: #000000;
    --blood-light: #000000;
    --faith-color: #000000;
  }
  
  .btn-primary {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
  }
  
  .btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
  }
  
  .nav-link:hover,
  .nav-link:focus,
  .nav-link.active {
    background: #000000;
    color: #ffffff;
  }
}