/* 
* Family Law Resource Library & Hub - Responsive Styles
* Version: 1.0
*/

/* ========== LARGE DEVICES (Desktops) ========== */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .container {
    max-width: 960px;
  }
}

/* ========== MEDIUM DEVICES (Tablets) ========== */
@media (max-width: 991.98px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 2.5rem;
  }
  
  html {
    font-size: 0.95rem;
  }
  
  .hero {
    height: 70vh;
  }
  
  .hero-slide {
    height: 70vh;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .container {
    max-width: 720px;
  }
  
  .services-grid,
  .price-grid,
  .feature-grid,
  .coreinfo-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .navbar-collapse {
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-item {
    margin: 0.5rem 0;
  }
}

/* ========== SMALL DEVICES (Landscape Phones) ========== */
@media (max-width: 767.98px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
  }
  
  html {
    font-size: 0.9rem;
  }
  
  .hero {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-slide {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .container {
    max-width: 540px;
  }
  
  .row {
    margin-right: -10px;
    margin-left: -10px;
  }
  
  .section-title h2 {
    font-size: 1rem;
  }
  
  .services-grid,
  .price-grid,
  .feature-grid,
  .coreinfo-grid,
  .team-grid,
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-sm);
  }
  
  /* Stack items in footer columns */
  .footer [class^="col-"] {
    margin-bottom: var(--spacing-md);
  }
  
  /* Reduce size of team photos */
  .team-photo {
    height: 250px;
  }
  
  /* Adjust spacing in contact form */
  .contact-form {
    padding: var(--spacing-md);
  }
  
  .form-group {
    margin-bottom: var(--spacing-sm);
  }
  
  /* Reduce slider height in testimonials */
  .review-slider {
    padding: var(--spacing-sm) 0;
  }
  
  /* Make service items full width */
  .service-item {
    width: 100%;
  }
  
  /* Reduce price item padding */
  .price-item {
    padding: var(--spacing-sm);
  }
}

/* ========== EXTRA SMALL DEVICES (Portrait Phones) ========== */
@media (max-width: 575.98px) {
  :root {
    --spacing-xl: 2.5rem;
    --spacing-lg: 1.8rem;
    --spacing-md: 1.2rem;
    --spacing-sm: 0.8rem;
  }
  
  html {
    font-size: 0.85rem;
  }
  
  .hero {
    height: 50vh;
    min-height: 350px;
  }
  
  .hero-slide {
    height: 50vh;
    min-height: 350px;
  }
  
  .hero-title {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
  }
  
  .container {
    padding-right: 15px;
    padding-left: 15px;
  }
  
  .section-title h2 {
    font-size: 1.6rem;
  }
  
  .section-title h2:after {
    width: 40px;
    left: calc(50% - 20px);
  }
  
  /* Make all grid items full width */
  .services-grid,
  .price-grid,
  .feature-grid,
  .coreinfo-grid,
  .team-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  /* Reduce feature item padding */
  .feature-item {
    padding: var(--spacing-sm);
  }
  
  /* Stack review author info */
  .review-author {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .review-author-img {
    margin-bottom: var(--spacing-xs);
    margin-right: 0;
  }
  
  /* Make form controls smaller */
  .form-control,
  .form-select {
    padding: 0.6rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
  }
  
  /* Reduce team photo height */
  .team-photo {
    height: 220px;
  }
  
  /* Adjust footer spacing */
  .footer {
    padding: var(--spacing-lg) 0 var(--spacing-xs);
  }
}

/* ========== PREFERS REDUCED MOTION ========== */
@media (prefers-reduced-motion) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .fade-in,
  .fade-in-delay-1,
  .fade-in-delay-2,
  .fade-in-delay-3 {
    animation: none !important;
    opacity: 1 !important;
  }
  
  .service-item:hover,
  .feature-item:hover,
  .price-item:hover,
  .team-member:hover,
  .blog-item:hover,
  .about-feature:hover,
  .coreinfo-item:hover,
  .add-page-item:hover {
    transform: none !important;
  }
  
  .service-item:hover .service-img img,
  .team-member:hover .team-photo img,
  .blog-item:hover .blog-img img,
  .about-image:hover img {
    transform: none !important;
  }
}

/* ========== ACCESSIBILITY FOCUS STYLES ========== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color-3);
  outline-offset: 2px;
}

/* Skip to content link - for keyboard users */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color-3-dark);
  color: white;
  padding: 8px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
} 