/* ============================================
   NP-Law - Responsive Styles (responsive.css)
   Mobile-first breakpoints
   ============================================ */

/* --- Breakpoints ---
   Mobile: < 768px (default)
   Tablet: 768px - 1024px
   Desktop: > 1024px
*/

/* ===================
   TABLET & BELOW (max-width: 768px)
   =================== */

@media (max-width: 768px) {
  
  /* Container padding */
  :root {
    --container-pad: 1rem;
    --header-height: 70px;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero__visual {
    display: none;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .hero__subtitle {
    font-size: 1rem;
  }
  
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Stats bar */
  .stats-bar {
    padding: 2rem 0;
  }
  
  .stats-bar__inner {
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    text-align: center;
  }
  
  .stats-bar__item {
    flex: 0 0 calc(50% - 1rem);
  }
  
  /* Expertise banner */
  .expertise-banner {
    padding: 2rem 0;
  }
  
  .expertise-banner .container {
    text-align: center;
  }
  
  .expertise-banner__heading {
    font-size: 1.5rem;
  }
  
  /* Practice cards */
  .practices-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem 0;
  }
  
  .card-practice__link {
    padding: 1.25rem;
    min-height: 140px;
  }
  
  .card-practice__title {
    font-size: 0.875rem;
  }
  
  /* Team cards */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem 0;
  }
  
  .card-team {
    height: 340px;
  }
  
  .card-team__photo-placeholder {
    height: 220px;
  }
  
  .card-team__name {
    font-size: 1rem;
  }
  
  .card-team__position {
    font-size: 0.8125rem;
  }
  
  .card-team__back {
    padding: 1.25rem;
  }
  
  .card-team__back-bio {
    font-size: 0.8125rem;
  }
  
  /* Blog cards */
  .blog-grid--3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
  }
  
  .card-blog__image-wrapper {
    height: 180px;
  }
  
  /* Contact CTA */
  .contact-cta {
    padding: 3rem 0;
  }
  
  .contact-cta__title {
    font-size: 2rem;
  }
  
  .contact-cta__subtitle {
    font-size: 1rem;
  }
  
  .contact-cta__buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .contact-cta__buttons .btn {
    width: 100%;
  }
  
  /* Page header */
  .page-header {
    padding: 3rem 0 2rem;
  }
  
  .page-header__title {
    font-size: 2rem;
  }
  
  .page-header__subtitle {
    font-size: 1rem;
  }
  
  /* Sidebar layout */
  .sidebar-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }
  
  .sidebar-layout__sidebar {
    position: static;
  }
  
  /* Section spacing */
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .section--sm {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .section--lg {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  /* Grid helpers */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
  
  /* Archive header */
  .archive-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
  }
  
  .archive-header__title {
    font-size: 2rem;
  }
  
  .archive-header__description {
    font-size: 1rem;
  }
  
  /* Error 404 */
  .error-404 {
    padding: 3rem 0;
  }
  
  .error-404__number {
    font-size: 5rem;
  }
  
  .error-404__title {
    font-size: 2rem;
  }
  
  .error-404__message {
    font-size: 1rem;
  }

  /* Show mobile menu toggle */
  .menu-toggle {
    display: flex;
  }

  /* Hide desktop navigation */
  .primary-nav {
    display: none;
  }

  .header-cta {
    display: none;
  }

  /* Footer stacks */
  .footer-widgets {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-bottom .container,
  .footer-bottom__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .footer-bottom__contact {
    flex-direction: column;
    justify-content: center;
  }

  .footer-bottom__right {
    flex-direction: column;
  }

  /* Values grid */
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* Timeline */
  .timeline {
    padding-left: var(--space-xl);
  }

  /* Member profile: stack on mobile */
  .member-profile {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
  }

  .member-profile__photo {
    max-width: 200px;
    margin: 0 auto;
  }

  .practice-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  /* Back to top */
  .back-to-top {
    bottom: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
  }

  /* Contact info */
  .contact-info {
    padding-right: 0;
  }
}

/* ===================
   MOBILE ONLY (max-width: 480px)
   =================== */

@media (max-width: 480px) {
  
  /* Practice cards - single column */
  .practices-grid {
    grid-template-columns: 1fr;
  }
  
  /* Team cards - single column */
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .card-team {
    height: 360px;
  }
  
  /* Stats bar */
  .stats-bar__inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .stats-bar__item {
    flex: 1 1 100%;
  }
  
  .stats-bar__number {
    font-size: 2rem;
  }
  
  /* Hero */
  .hero__title {
    font-size: 1.75rem;
  }
  
  .hero__label {
    font-size: 0.75rem;
    letter-spacing: 2px;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
  }
  
  .btn--lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
  }
  
  /* Pagination */
  .pagination {
    gap: 0.25rem;
  }
  
  .pagination__link,
  .pagination__current,
  .pagination .page-numbers {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
  
  /* Contact CTA */
  .contact-cta__title {
    font-size: 1.75rem;
  }
  
  /* Page header */
  .page-header__title {
    font-size: 1.75rem;
  }
}

/* ---- Small tablets (>= 576px) ---- */
@media (min-width: 576px) {
  .grid-2,
  .practices-grid,
  .blog-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar .container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stats-bar__inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stats-bar__divider {
    width: 1px;
    height: 40px;
  }

  .hero__cta,
  .hero__actions {
    flex-direction: row;
    align-items: center;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom__contact {
    flex-direction: row;
  }

  .footer-bottom__inner {
    flex-direction: row;
    text-align: left;
  }

  .footer-bottom__right {
    flex-direction: row;
  }
}

/* ---- Tablets (>= 768px) ---- */
@media (min-width: 768px) {
  .grid-3,
  .team-grid,
  .blog-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4,
  .practices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 60vh;
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__subtitle {
    font-size: var(--text-lg);
  }

  .page-hero .page-title {
    font-size: var(--text-3xl);
  }

  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .section-header h2 {
    font-size: var(--text-3xl);
  }

  .section-cta__title {
    font-size: var(--text-3xl);
  }

  .card-team {
    height: 400px;
  }

  .member-profile {
    grid-template-columns: 250px 1fr;
    margin-top: calc(-1 * var(--space-3xl));
  }

  .member-profile__photo {
    max-width: none;
  }

  .practice-hero__inner {
    flex-direction: row;
    align-items: center;
  }
}

/* ---- Desktop (>= 992px) ---- */
@media (min-width: 992px) {
  /* Navigation: horizontal on desktop */
  .menu-toggle {
    display: none;
  }

  .mobile-nav-overlay {
    display: none;
  }

  .primary-nav {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
    margin-left: var(--space-lg);
  }

  .header-lang {
    margin-left: var(--space-md);
  }

  /* Grids */
  .grid-3,
  .team-grid,
  .blog-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4,
  .practices-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Hero split layout on desktop */
  .hero__container {
    flex-direction: row;
  }

  .hero__visual {
    display: block;
  }

  /* Footer */
  .footer-widgets {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-bottom .container {
    flex-direction: row;
    text-align: left;
  }

  /* Hero */
  .hero {
    min-height: 70vh;
  }

  .hero__title {
    font-size: var(--text-5xl);
  }

  .page-hero .page-title {
    font-size: var(--text-4xl);
  }

  /* Sections */
  .section {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }

  .section-header h2 {
    font-size: var(--text-4xl);
  }

  .section-cta__title {
    font-size: var(--text-4xl);
  }

  /* Values */
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Team cards */
  .card-team {
    height: 420px;
  }

  /* Stats */
  .stat-item__number {
    font-size: var(--text-4xl);
  }
}

/* ---- Large desktop (>= 1200px) ---- */
@media (min-width: 1200px) {
  .hero__content {
    max-width: 750px;
  }

  .hero__title {
    font-size: var(--text-hero);
  }

  /* Wider navigation gaps */
  .primary-nav__list {
    gap: var(--space-2xl);
  }
}

/* ===================
   LARGE DESKTOP (min-width: 1440px)
   =================== */

@media (min-width: 1440px) {
  
  :root {
    --container-max: 1360px;
  }
  
  /* Hero */
  .hero__title {
    font-size: 3.75rem;
  }
  
  .hero__subtitle {
    font-size: 1.25rem;
  }
  
  /* Stats bar */
  .stats-bar__number {
    font-size: 3rem;
  }
  
  .stats-bar__label {
    font-size: 0.8125rem;
  }
  
  /* Cards can breathe more */
  .practices-grid {
    gap: 1.5rem;
  }
  
  .team-grid {
    gap: 2rem;
  }
  
  .blog-grid--3 {
    gap: 2rem;
  }
}

/* ===================
   PRINT STYLES
   =================== */

@media print {
  
  body {
    padding-top: 0;
  }
  
  .site-header,
  .site-footer,
  .btn,
  .hero__cta,
  .contact-cta,
  .pagination,
  .breadcrumbs,
  .sidebar-widget {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 1rem 0;
  }
  
  .card-team {
    page-break-inside: avoid;
  }
  
  .card-blog {
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ===================
   ACCESSIBILITY
   =================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  
  :root {
    --color-border: #000;
  }
  
  .card-practice,
  .card-team__front,
  .card-blog {
    border-width: 2px;
  }
  
  .btn {
    border-width: 3px;
  }
}

/* Reduced transparency for low-vision users */
@media (prefers-reduced-transparency: reduce) {
  
  .hero__particles {
    opacity: 1;
  }
  
  .card-team__back-tag {
    background: rgba(255, 255, 255, 0.4);
  }
}
