/* ==========================================================================
   Responsive CSS - Media Queries
   CPR Training Website

   Breakpoints:
   - Mobile: 0 - 767px (default/base styles)
   - Tablet: 768px - 1023px
   - Desktop: 1024px+
   ========================================================================== */

/* ==========================================================================
   BASE / MOBILE STYLES (0 - 767px)
   Mobile-first approach: these are the default styles
   ========================================================================== */

/* Typography - Mobile */
h1 {
  font-size: 2rem; /* 32px */
}

h2 {
  font-size: 1.75rem; /* 28px */
}

h3 {
  font-size: 1.25rem; /* 20px */
}

/* Container - Mobile */
.container {
  padding: 0 var(--spacing-md, 1rem);
}

.section {
  padding: var(--spacing-xl, 2rem) 0;
}

/* Header/Navigation - Mobile */
.header {
  padding: 0.9375rem 1.25rem;
}

.nav-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: #ffffff;
  flex-direction: column;
  padding: 5rem 1.875rem 1.875rem;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 999;
}

.nav-menu.active {
  display: flex;
  right: 0;
}

.nav-menu li {
  margin: 0.9375rem 0;
}

.hamburger {
  display: flex;
}

.nav-cta {
  display: none;
}

.mobile-cta {
  display: block;
}

/* Hero Section - Mobile */
.hero {
  min-height: auto;
  padding: 6rem 0 4rem;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: 1.75rem;
  margin-bottom: 0.9375rem;
}

.hero-subtitle {
  font-size: 1rem;
}

/* Course Finder - Mobile */
.course-finder {
  padding: var(--spacing-md, 1rem);
}

.course-finder-row {
  grid-template-columns: 1fr;
  gap: var(--spacing-sm, 0.75rem);
}

.course-finder .form-group--button {
  margin-top: var(--spacing-sm, 0.75rem);
}

.course-finder .form-group--button .btn,
.course-finder select,
.course-finder button {
  width: 100%;
}

/* Statistics Section - Mobile */
.stats-section {
  padding: 2.5rem 1.25rem;
}

.stats-grid {
  grid-template-columns: 1fr;
  gap: 1.875rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
}

/* Course Cards - Mobile */
.courses-section {
  padding: 2.5rem 1.25rem;
}

.courses-grid {
  grid-template-columns: 1fr;
  gap: 1.5625rem;
}

.course-card {
  max-width: 100%;
}

/* Testimonials - Mobile */
.testimonials-section {
  padding: 2.5rem 1.25rem;
}

.testimonial-card {
  padding: 1.5625rem 1.25rem;
}

.testimonial-text {
  font-size: 1rem;
}

/* Locations - Mobile */
.locations-section {
  padding: 2.5rem 1.25rem;
}

.locations-grid {
  grid-template-columns: 1fr;
  gap: 1.5625rem;
}

/* CTA Banner - Mobile */
.cta-banner {
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.cta-banner h2 {
  font-size: 1.5rem;
}

/* Footer - Mobile */
.footer {
  padding: 2.5rem 1.25rem 1.25rem;
}

.footer__grid {
  grid-template-columns: 1fr;
  gap: 1.875rem;
  text-align: center;
}

.footer__bottom-container,
.footer-bottom {
  flex-direction: column;
  gap: 0.9375rem;
  text-align: center;
}

/* Course Page - Mobile */
.course-hero {
  padding: 6.25rem 1.25rem 3.75rem;
}

.course-details {
  flex-direction: column;
  gap: 1.875rem;
}

.course-sidebar {
  order: -1;
}

.schedule-table {
  display: block;
  overflow-x: auto;
}

/* FAQ Accordion - Mobile */
.faq-section {
  padding: 2.5rem 1.25rem;
}

.accordion-header {
  padding: 0.9375rem;
  font-size: 1rem;
}

/* Group Training - Mobile */
.benefits-grid {
  grid-template-columns: 1fr;
  gap: 1.5625rem;
}

.quote-form,
.quote-form-wrapper {
  padding: 1.5625rem 1.25rem;
}

/* Contact Page - Mobile */
.contact-section {
  padding: 2.5rem 1.25rem;
}

.contact-grid {
  grid-template-columns: 1fr;
  gap: 1.875rem;
}

.contact-form {
  order: -1;
}

.map-container {
  height: 300px;
}

/* Buttons - Mobile */
.btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
}

.btn-inline {
  width: auto;
}

/* Forms - Mobile */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  flex-direction: column;
  gap: 1.25rem;
}

input,
select,
textarea {
  font-size: 16px; /* Prevents zoom on iOS */
}


/* ==========================================================================
   TABLET STYLES (768px - 1023px)
   ========================================================================== */

@media screen and (min-width: 768px) {
  /* Typography - Tablet */
  h1 {
    font-size: 2.5rem; /* 40px */
  }

  h2 {
    font-size: 2rem; /* 32px */
  }

  h3 {
    font-size: 1.375rem; /* 22px */
  }

  /* Container - Tablet */
  .container {
    padding: 0 var(--spacing-xl, 2rem);
  }

  .section {
    padding: var(--spacing-3xl, 3rem) 0;
  }

  /* Header/Navigation - Tablet */
  .header {
    padding: 0.9375rem 2.5rem;
  }

  .nav-menu {
    display: flex;
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    flex-direction: row;
    padding: 0;
    box-shadow: none;
  }

  .nav-menu li {
    margin: 0 0.9375rem;
  }

  .hamburger {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
  }

  .mobile-cta {
    display: none;
  }

  .mobile-overlay {
    display: none !important;
  }

  /* Hero Section - Tablet */
  .hero {
    min-height: 100vh;
    padding: var(--spacing-3xl, 3rem) 0;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  /* Course Finder - Tablet */
  .course-finder {
    padding: var(--spacing-lg, 1.5rem);
  }

  .course-finder-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md, 1rem);
  }

  .course-finder .form-group--button {
    grid-column: 1 / -1;
    margin-top: var(--spacing-sm, 0.75rem);
  }

  .course-finder .form-group--button .btn {
    width: 100%;
  }

  .course-finder select {
    width: auto;
    min-width: 200px;
  }

  .course-finder button {
    width: auto;
  }

  /* Statistics Section - Tablet */
  .stats-section {
    padding: 3.75rem 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .stat-number {
    font-size: 2.625rem;
  }

  /* Course Cards - Tablet */
  .courses-section {
    padding: 3.75rem 2.5rem;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.875rem;
  }

  /* Testimonials - Tablet */
  .testimonials-section {
    padding: 3.75rem 2.5rem;
  }

  .testimonial-card {
    padding: 2.1875rem 1.875rem;
  }

  /* Locations - Tablet */
  .locations-section {
    padding: 3.75rem 2.5rem;
  }

  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.875rem;
  }

  /* CTA Banner - Tablet */
  .cta-banner {
    padding: 3.75rem 2.5rem;
  }

  .cta-banner h2 {
    font-size: 1.75rem;
  }

  /* Footer - Tablet */
  .footer {
    padding: 3.75rem 2.5rem 1.25rem;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    text-align: left;
  }

  .footer__bottom-container,
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Course Page - Tablet */
  .course-hero {
    padding: 7.5rem 2.5rem 5rem;
  }

  .course-details {
    flex-direction: row;
    gap: 2.5rem;
  }

  .course-main {
    flex: 2;
  }

  .course-sidebar {
    flex: 1;
    order: 0;
  }

  /* FAQ Accordion - Tablet */
  .faq-section {
    padding: 3.75rem 2.5rem;
  }

  .accordion-header {
    padding: 1.125rem 1.25rem;
    font-size: 1.0625rem;
  }

  /* Group Training - Tablet */
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.875rem;
  }

  .quote-form,
  .quote-form-wrapper {
    padding: 2.1875rem 1.875rem;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Contact Page - Tablet */
  .contact-section {
    padding: 3.75rem 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-form {
    order: 0;
  }

  .map-container {
    height: 350px;
  }

  /* Buttons - Tablet */
  .btn {
    width: auto;
    padding: 0.875rem 1.75rem;
  }

  /* Forms - Tablet */
  .form-row {
    flex-direction: row;
    gap: 1.25rem;
  }

  .form-row .form-group {
    flex: 1;
  }
}


/* ==========================================================================
   DESKTOP STYLES (1024px and above)
   ========================================================================== */

@media screen and (min-width: 1024px) {
  /* Typography - Desktop */
  h1 {
    font-size: 3rem; /* 48px */
  }

  h2 {
    font-size: 2.25rem; /* 36px */
  }

  h3 {
    font-size: 1.5rem; /* 24px */
  }

  /* Container - Desktop */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-2xl, 2.5rem);
  }

  /* Header/Navigation - Desktop */
  .header {
    padding: 0.9375rem 3.75rem;
  }

  .nav-menu li {
    margin: 0 1.25rem;
  }

  .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }

  .nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Hero Section - Desktop */
  .hero {
    padding: 5rem 0;
    min-height: 600px;
  }

  .hero-content {
    max-width: 800px;
  }

  .hero-title {
    font-size: 3rem;
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  /* Course Finder - Desktop */
  .course-finder {
    padding: var(--spacing-xl, 2rem);
    max-width: 900px;
    margin: 2.5rem auto 0;
  }

  .course-finder-row {
    grid-template-columns: 1fr 1fr auto;
    gap: 1.25rem;
    align-items: end;
  }

  .course-finder .form-group--button {
    grid-column: auto;
    margin-top: 0;
  }

  .course-finder .form-group--button .btn {
    width: auto;
  }

  .course-finder select {
    min-width: 250px;
  }

  /* Statistics Section - Desktop */
  .stats-section {
    padding: 5rem 3.75rem;
  }

  .stats-content {
    display: flex;
    align-items: center;
    gap: 3.75rem;
  }

  .stats-text {
    flex: 1;
  }

  .stats-grid {
    flex: 1;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .stat-number {
    font-size: 3rem;
  }

  /* Course Cards - Desktop */
  .courses-section {
    padding: 5rem 3.75rem;
  }

  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.1875rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Testimonials - Desktop */
  .testimonials-section {
    padding: 5rem 3.75rem;
  }

  .testimonials-container {
    max-width: 800px;
    margin: 0 auto;
  }

  .testimonial-card {
    padding: 2.8125rem 3.125rem;
  }

  .testimonial-text {
    font-size: 1.125rem;
  }

  /* Locations - Desktop */
  .locations-section {
    padding: 5rem 3.75rem;
  }

  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .location-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .location-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }

  /* CTA Banner - Desktop */
  .cta-banner {
    padding: 5rem 3.75rem;
  }

  .cta-banner h2 {
    font-size: 2.25rem;
  }

  .cta-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
  }

  /* Footer - Desktop */
  .footer {
    padding: 5rem 3.75rem 1.875rem;
  }

  .footer__container {
    padding: 0 2rem;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
    gap: 3.75rem;
  }

  .footer__bottom {
    margin-top: 4rem;
  }

  .footer__bottom-container {
    padding: 0 2rem;
  }

  /* Course Page - Desktop */
  .course-hero {
    padding: 9.375rem 3.75rem 6.25rem;
  }

  .course-details {
    gap: 3.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 3.75rem;
  }

  .course-main {
    flex: 2;
  }

  .course-sidebar {
    flex: 1;
    position: sticky;
    top: 100px;
    align-self: flex-start;
  }

  /* Schedule Table - Desktop */
  .schedule-section {
    padding: 5rem 3.75rem;
  }

  .schedule-table {
    max-width: 1000px;
    margin: 0 auto;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 1.125rem 1.25rem;
  }

  /* FAQ Accordion - Desktop */
  .faq-section {
    padding: 5rem 3.75rem;
  }

  .faq-container {
    max-width: 800px;
    margin: 0 auto;
  }

  .accordion-header {
    padding: 1.25rem 1.5625rem;
    font-size: 1.125rem;
  }

  .accordion-content {
    padding: 0 1.5625rem 1.25rem;
  }

  /* Group Training - Desktop */
  .group-hero {
    padding: 9.375rem 3.75rem 6.25rem;
  }

  .benefits-section {
    padding: 5rem 3.75rem;
  }

  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .quote-section {
    padding: 5rem 3.75rem;
  }

  .quote-form,
  .quote-form-wrapper {
    padding: 3.125rem;
    max-width: 700px;
  }

  /* Contact Page - Desktop */
  .contact-section {
    padding: 5rem 3.75rem;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.75rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .map-container {
    height: 400px;
  }

  /* Buttons - Desktop */
  .btn {
    padding: 1rem 2rem;
  }

  .btn:hover {
    transform: translateY(-2px);
  }

  /* Forms - Desktop */
  .form-group label {
    font-size: 0.9375rem;
  }
}


/* ==========================================================================
   LARGE DESKTOP STYLES (1440px and above)
   ========================================================================== */

@media screen and (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }

  .hero {
    padding: 11.25rem 5rem 7.5rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .stats-section,
  .courses-section,
  .testimonials-section,
  .locations-section,
  .faq-section,
  .benefits-section,
  .quote-section,
  .contact-section,
  .schedule-section {
    padding: 6.25rem 5rem;
  }

  .footer {
    padding: 6.25rem 5rem 2.5rem;
  }
}


/* ==========================================================================
   UTILITY CLASSES FOR RESPONSIVE VISIBILITY
   ========================================================================== */

/* Hide on mobile (visible on tablet+) */
.hide-mobile {
  display: none;
}

/* Show only on mobile */
.show-mobile-only {
  display: block;
}

@media screen and (min-width: 768px) {
  .hide-mobile {
    display: block;
  }

  .hide-tablet {
    display: none;
  }

  .show-mobile-only {
    display: none;
  }

  .show-tablet-only {
    display: block;
  }
}

@media screen and (min-width: 1024px) {
  .hide-tablet {
    display: block;
  }

  .hide-desktop {
    display: none;
  }

  .show-tablet-only {
    display: none;
  }
}

/* Inline versions for flex/inline elements */
.hide-mobile-inline {
  display: none;
}

@media screen and (min-width: 768px) {
  .hide-mobile-inline {
    display: inline;
  }
}

.hide-mobile-flex {
  display: none;
}

@media screen and (min-width: 768px) {
  .hide-mobile-flex {
    display: flex;
  }
}


/* ==========================================================================
   RESPONSIVE IMAGES
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
}

.responsive-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}


/* ==========================================================================
   RESPONSIVE SPACING UTILITIES
   ========================================================================== */

/* Section spacing adjustments */
.section-sm {
  padding: 1.875rem 1.25rem;
}

.section-md {
  padding: 2.5rem 1.25rem;
}

.section-lg {
  padding: 3.75rem 1.25rem;
}

@media screen and (min-width: 768px) {
  .section-sm {
    padding: 2.5rem 2.5rem;
  }

  .section-md {
    padding: 3.75rem 2.5rem;
  }

  .section-lg {
    padding: 5rem 2.5rem;
  }
}

@media screen and (min-width: 1024px) {
  .section-sm {
    padding: 3.125rem 3.75rem;
  }

  .section-md {
    padding: 4.375rem 3.75rem;
  }

  .section-lg {
    padding: 6.25rem 3.75rem;
  }
}


/* ==========================================================================
   RESPONSIVE TEXT ALIGNMENT UTILITIES
   ========================================================================== */

.text-center-mobile {
  text-align: center;
}

@media screen and (min-width: 768px) {
  .text-center-mobile {
    text-align: left;
  }

  .text-center-tablet {
    text-align: center;
  }
}

@media screen and (min-width: 1024px) {
  .text-center-tablet {
    text-align: left;
  }
}


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

@media print {
  .header,
  .footer,
  .nav-menu,
  .hamburger,
  .cta-banner,
  .testimonials-section,
  .course-finder {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 18pt;
  }

  h3 {
    font-size: 14pt;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  .btn {
    border: 1px solid #000;
    background: transparent !important;
    color: #000 !important;
  }
}
