/* 
 * Sprout Advocates - Responsive Stylesheet
 * Ensures website looks great on all devices
 */

/* Mobile First Approach */
@media (max-width: 576px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .hero {
    height: 70vh;
    padding: 80px 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .practice-card {
    height: auto;
    min-height: 250px;
  }
  
  .timeline:before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    margin-left: 0;
    padding-left: 45px;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 0;
  }
  
  .timeline-icon {
    left: 0;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .timeline-item:nth-child(odd) .timeline-icon {
    right: auto;
    left: 0;
  }
  
  .timeline-content {
    margin-left: 0;
    margin-right: 0;
    padding: var(--spacing-md);
  }
  
  .timeline-item:nth-child(odd) .timeline-content:before,
  .timeline-item:nth-child(even) .timeline-content:before {
    display: none;
  }
  
  .testimonial-container {
    height: 300px;
  }
  
  .form-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .form-step {
    flex-direction: row;
    width: 100%;
  }
  
  .form-step:not(:last-child)::after {
    display: none;
  }
  
  .step-number {
    margin-right: var(--spacing-sm);
    margin-bottom: 0;
  }
  
  .form-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .form-buttons .btn {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-md);
  }
  
  .footer h4:after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .social-links {
    justify-content: center;
  }
  
  .chat-popup {
    width: 280px;
    right: -10px;
  }
  
  .progress-tracker {
    display: none;
  }
}

/* Small devices (landscape phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.9rem;
  }
  
  .hero {
    height: 70vh;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
  
  .timeline:before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    margin-left: 0;
    padding-left: 60px;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 0;
  }
  
  .timeline-icon {
    left: 5px;
  }
  
  .timeline-item:nth-child(odd) .timeline-icon {
    right: auto;
    left: 5px;
  }
  
  .timeline-content {
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(odd) .timeline-content:before,
  .timeline-item:nth-child(even) .timeline-content:before {
    display: none;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
  
  .progress-tracker {
    display: none;
  }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-white);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md) 0;
    z-index: 1000;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    margin: 0;
    text-align: center;
    padding: var(--spacing-sm) 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Extra large devices */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  .chat-widget,
  .back-to-top,
  .progress-tracker,
  .hero-buttons,
  .form-buttons,
  .social-links {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  .practice-card,
  .feature,
  .team-card,
  .insight-card,
  .faq-item,
  .timeline-content {
    page-break-inside: avoid;
    border: 1px solid #ddd;
    box-shadow: none;
  }
  
  .practice-grid,
  .features-grid,
  .team-grid,
  .insights-grid {
    display: block;
  }
  
  .practice-card,
  .feature,
  .team-card,
  .insight-card {
    margin-bottom: 20px;
  }
  
  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }
  
  .hero {
    height: auto;
    padding: 20px 0;
  }
  
  .hero-overlay {
    background: none;
  }
  
  .hero h1,
  .hero p {
    color: #000;
    text-shadow: none;
  }
  
  .video-background {
    display: none;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .practice-card:hover,
  .feature:hover,
  .team-card:hover,
  .insight-card:hover,
  .timeline-item:hover .timeline-content,
  .faq-item:hover,
  .social-link:hover,
  .btn:hover {
    transform: none !important;
  }
  
  .chat-button::before {
    animation: none !important;
  }
}

/* High contrast mode */
@media (forced-colors: active) {
  .btn,
  .practice-card,
  .feature,
  .team-card,
  .insight-card,
  .timeline-content,
  .faq-item,
  .contact-info,
  .contact-form,
  .social-link,
  .chat-button,
  .chat-popup,
  .back-to-top {
    border: 2px solid currentColor;
  }
  
  .timeline:before,
  .section-title h2:after,
  .footer h4:after {
    background-color: currentColor;
  }
}
