/* ================================================================
   RESPONSIVE DESIGN - MOBILE FIRST OPTIMIZATION
   Mobile, Tablet, Desktop Support
   ================================================================ */

/* ROOT RESPONSIVE VARIABLES */
:root {
  /* Mobile Font Sizes */
  --fs-mobile-h1: 1.75rem;
  --fs-mobile-h2: 1.35rem;
  --fs-mobile-h3: 1.1rem;
  --fs-mobile-body: 0.95rem;
  --fs-mobile-small: 0.85rem;
  
  /* Tablet Font Sizes */
  --fs-tablet-h1: 2.2rem;
  --fs-tablet-h2: 1.65rem;
  --fs-tablet-h3: 1.3rem;
  --fs-tablet-body: 1rem;
  
  /* Desktop Font Sizes */
  --fs-desktop-h1: 3rem;
  --fs-desktop-h2: 2.2rem;
  --fs-desktop-h3: 1.5rem;
  --fs-desktop-body: 1.05rem;
  
  /* Mobile Spacing */
  --spacing-mobile-sm: 0.5rem;
  --spacing-mobile-md: 1rem;
  --spacing-mobile-lg: 1.5rem;
  --spacing-mobile-xl: 2rem;
  
  /* Tablet Spacing */
  --spacing-tablet-lg: 2.5rem;
  --spacing-tablet-xl: 3rem;
  
  /* Desktop Spacing */
  --spacing-desktop-xl: 4rem;
  
  /* Touch Target Size */
  --touch-target: 48px;
}

/* ================================================================
   MOBILE FIRST (DEFAULT - 320px to 479px)
   ================================================================ */

/* Body & Text */
body {
  font-size: var(--fs-mobile-body);
  line-height: 1.6;
}

h1, .hero-title {
  font-size: var(--fs-mobile-h1);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2, .section-title {
  font-size: var(--fs-mobile-h2);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: var(--fs-mobile-h3);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Container */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
  max-width: 100%;
}

/* Sections */
section {
  padding: var(--spacing-mobile-lg) var(--spacing-mobile-md);
}

/* Buttons - Touch Friendly */
button,
.btn,
input[type="button"],
input[type="submit"],
.enroll-btn-modern,
.select-course-btn,
.enroll-submit-btn,
.cta-btn,
.course-expand-btn {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 8px;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Forms */
input,
textarea,
select {
  font-size: 16px; /* Prevents zoom on iOS */
  padding: 0.75rem;
  width: 100%;
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: white;
  transition: left 0.3s ease;
  z-index: 999;
  padding-top: 80px;
}

.main-nav.open {
  left: 0;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.main-nav li {
  width: 100%;
}

.main-nav a {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.nav-toggle {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

/* Grid Layouts */
.gallery-grid,
.features-grid,
.stats-grid,
.testimonials-grid,
.courses-grid-modern {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

/* Course Card */
.course-card-modern {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.course-card-modern img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.course-card-header {
  padding: 1rem;
}

.course-card-footer {
  padding: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-card-footer button {
  flex: 1;
  min-width: 120px;
}

/* Forms */
.admission-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  min-height: 300px;
  padding: 2rem 1rem;
}

.hero-title {
  word-break: break-word;
}

/* Footer */
.site-footer {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  margin-top: 3rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  text-align: center;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: #fff;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--color-accent);
  transform: translateX(2px);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.footer-col p a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-col p a:hover {
  text-decoration: underline;
}

/* Social Icons */
.social-icons {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-icons li {
  display: inline-flex;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  border: 2px solid transparent;
}

.social-icons a:hover,
.social-icons a:focus {
  background: var(--color-accent);
  color: #000;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px rgba(255, 180, 0, 0.3);
}

.social-icons svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.social-icons a:hover svg {
  transform: rotate(10deg) scale(1.1);
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Follow Us Section - Mobile Responsive */
.follow-us-section {
  padding: 1.8rem 1rem !important;
}

.follow-us-header {
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.follow-icon {
  width: 24px;
  height: 24px;
}

.follow-us-section h4 {
  font-size: 1.1rem;
}

.follow-subtitle {
  font-size: 0.85rem;
  margin: 0.4rem 0 1.2rem 0;
}

/* ================================================================
   TABLET (480px to 768px)
   ================================================================ */

@media (min-width: 480px) {
  :root {
    font-size: 16px;
  }
  
  body {
    font-size: var(--fs-mobile-body);
  }
  
  h1, .hero-title {
    font-size: var(--fs-tablet-h1);
  }
  
  h2, .section-title {
    font-size: var(--fs-tablet-h2);
  }
  
  h3 {
    font-size: var(--fs-tablet-h3);
  }
  
  .container {
    padding: 0 1.5rem;
    max-width: 100%;
  }
  
  section {
    padding: var(--spacing-mobile-lg) var(--spacing-tablet-lg);
  }
  
  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
  }
  
  .main-nav ul {
    flex-direction: row;
    gap: 0;
  }
  
  .main-nav li {
    width: auto;
  }
  
  .main-nav a {
    border-bottom: none;
    padding: 0.75rem 1rem;
  }
  
  .nav-toggle {
    display: none;
  }
  
  .gallery-grid,
  .features-grid,
  .stats-grid,
  .courses-grid-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .admission-wrapper {
    grid-template-columns: 1fr;
  }
  
  .hero {
    min-height: 400px;
    padding: 3rem 1.5rem;
  }
  
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .footer-col {
    text-align: left;
  }
  
  .social-icons {
    justify-content: flex-start;
  }

  .follow-us-section {
    padding: 2rem 1.5rem !important;
  }

  .follow-us-header {
    gap: 0.75rem;
  }

  .follow-icon {
    width: 26px;
    height: 26px;
  }

  .follow-us-section h4 {
    font-size: 1.2rem;
  }

  .follow-subtitle {
    font-size: 0.9rem;
  }
}

/* ================================================================
   SMALL TABLET / LANDSCAPE (769px to 1024px)
   ================================================================ */

@media (min-width: 769px) {
  h1, .hero-title {
    font-size: var(--fs-tablet-h1);
  }
  
  h2, .section-title {
    font-size: var(--fs-tablet-h2);
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .container {
    padding: 0 2rem;
    max-width: 100%;
  }
  
  section {
    padding: var(--spacing-tablet-xl) var(--spacing-tablet-lg);
  }
  
  .gallery-grid,
  .features-grid,
  .stats-grid,
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .courses-grid-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .admission-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .hero {
    min-height: 450px;
    padding: 4rem 2rem;
  }
  
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .footer-col {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }

  .follow-us-section {
    padding: 2.5rem 2rem !important;
  }

  .follow-us-section h4 {
    font-size: 1.35rem;
  }

  .follow-subtitle {
    font-size: 0.95rem;
  }
}

/* ================================================================
   DESKTOP (1025px+)
   ================================================================ */

@media (min-width: 1025px) {
  h1, .hero-title {
    font-size: var(--fs-desktop-h1);
  }
  
  h2, .section-title {
    font-size: var(--fs-desktop-h2);
  }
  
  h3 {
    font-size: var(--fs-desktop-h3);
  }
  
  body {
    font-size: var(--fs-desktop-body);
  }
  
  .container {
    padding: 0 2rem;
    max-width: 1200px;
  }
  
  section {
    padding: var(--spacing-desktop-xl) 2rem;
  }
  
  .gallery-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .courses-grid-modern {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .admission-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  
  .hero {
    min-height: 500px;
    padding: 5rem 2rem;
  }
  
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
  
  .footer-col {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

/* ================================================================
   EXTRA LARGE DESKTOP (1400px+)
   ================================================================ */

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .gallery-grid,
  .features-grid,
  .testimonials-grid {
    gap: 2.5rem;
  }
  
  .courses-grid-modern {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
  .nav-toggle,
  .main-nav,
  .site-footer,
  button,
  input {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  section {
    page-break-inside: avoid;
  }
}

/* ================================================================
   ACCESSIBILITY - LANDSCAPE MODE FIX
   ================================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  section {
    padding: 1rem;
  }
  
  .hero {
    min-height: 300px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}

/* ================================================================
   HIGH DPI SCREENS (RETINA)
   ================================================================ */

@media (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ================================================================
   FOLLOW US SECTION - RESPONSIVE STYLES
   ================================================================ */

/* Mobile (320px - 479px) */
@media (max-width: 479px) {
  .follow-section {
    padding: 1.5rem 1rem;
  }

  .follow-section h4 {
    font-size: 0.95rem;
    letter-spacing: 0.6px;
  }

  .follow-text {
    font-size: 0.78rem;
    margin-bottom: 1rem;
  }

  .follow-icons {
    gap: 1.2rem;
  }

  .icon-link {
    gap: 0.5rem;
    padding: 0.6rem;
  }

  .icon-link svg {
    width: 32px;
    height: 32px;
  }

  .icon-name {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }
}

/* Small Tablet (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
  .follow-section {
    padding: 1.75rem 1.25rem;
  }

  .follow-section h4 {
    font-size: 1rem;
    letter-spacing: 0.6px;
  }

  .follow-text {
    font-size: 0.82rem;
    margin-bottom: 1.15rem;
  }

  .follow-icons {
    gap: 1.4rem;
  }

  .icon-link {
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .icon-link svg {
    width: 36px;
    height: 36px;
  }

  .icon-name {
    font-size: 0.72rem;
    padding: 0.32rem 0.7rem;
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .follow-section {
    padding: 2rem 1.5rem;
  }

  .follow-section h4 {
    font-size: 1.08rem;
    letter-spacing: 0.65px;
  }

  .follow-text {
    font-size: 0.85rem;
    margin-bottom: 1.3rem;
  }

  .follow-icons {
    gap: 1.6rem;
  }

  .icon-link {
    gap: 0.6rem;
    padding: 0.7rem;
  }

  .icon-link svg {
    width: 40px;
    height: 40px;
  }

  .icon-name {
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
  }
}

/* Desktop (1025px - 1399px) */
@media (min-width: 1025px) and (max-width: 1399px) {
  .follow-section {
    padding: 2.25rem 1.75rem;
  }

  .follow-section h4 {
    font-size: 1.15rem;
    letter-spacing: 0.7px;
  }

  .follow-text {
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
  }

  .follow-icons {
    gap: 1.8rem;
  }

  .icon-link {
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .icon-link svg {
    width: 44px;
    height: 44px;
  }

  .icon-name {
    font-size: 0.78rem;
    padding: 0.38rem 0.85rem;
  }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
  .follow-section {
    padding: 2.5rem 2rem;
  }

  .follow-section h4 {
    font-size: 1.2rem;
    letter-spacing: 0.75px;
  }

  .follow-text {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .follow-icons {
    gap: 2rem;
  }

  .icon-link {
    gap: 0.7rem;
    padding: 0.8rem;
  }

  .icon-link svg {
    width: 50px;
    height: 50px;
  }

  .icon-name {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }
}
   REDUCED MOTION (ACCESSIBILITY)
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   DARK MODE SUPPORT
   ================================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a1a;
    --color-text: #e0e0e0;
    --color-bg-dark: #333;
  }
  
  body {
    background-color: var(--color-bg);
    color: var(--color-text);
  }
  
  .main-nav {
    background: #222;
  }
  
  .main-nav a {
    color: var(--color-text);
    border-color: #444;
  }
}

/* Additional Button Alignment Fixes */
@media (min-width: 480px) and (max-width: 768px) {
  .cta-btn,
  .cta-btn-modern,
  .enroll-btn-modern,
  .enroll-submit-btn {
    width: auto;
    padding: 0.85rem 2rem;
  }
}

@media (min-width: 769px) {
  .cta-btn,
  .cta-btn-modern,
  .enroll-btn-modern {
    width: auto;
    padding: 1rem 2.5rem;
  }
}

/* Mobile Button Placement */
@media (max-width: 480px) {
  .cta-btn,
  .btn,
  .enroll-btn-modern {
    width: 100%;
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .cta-buttons,
  .cta-buttons-modern {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .cta-btn,
  .cta-btn-modern {
    width: 100%;
    max-width: 280px;
  }
}
