/* Mobile First Responsive CSS for GNIET */

/* Base Mobile Styles (320px+) */
* {
  box-sizing: border-box;
}

body {
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

.container {
  padding-left: 15px;
  padding-right: 15px;
  max-width: 100%;
}

/* Mobile Navigation Adjustments */
.navbar {
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-size: 1.1rem;
}

/* Mobile Hero Adjustments */
.magazine-hero {
  margin-top: clamp(60px, 15vw, 120px);
  padding: 1rem 0;
}

.hero-title {
  font-size: clamp(1.5rem, 6vw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 4vw, 1.2rem);
  padding: 0 0.5rem;
}

/* Mobile Content Adjustments */
.content-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.article-title {
  font-size: clamp(1.1rem, 5vw, 1.8rem);
  line-height: 1.3;
}

.article-excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Mobile Principal Profile */
.principal-profile {
  padding: 1rem !important;
  margin-bottom: 1.5rem;
}

.principal-profile img {
  max-width: 200px !important;
  height: 220px !important;
  margin: 0 auto 1rem !important;
  display: block !important;
}

/* Mobile Grid Layouts */
.about-layout {
  display: block !important;
  gap: 1rem;
}

.about-layout > * {
  margin-bottom: 1.5rem;
}

/* Mobile Typography */
.section-title-editorial {
  font-size: clamp(1.8rem, 8vw, 4rem);
  line-height: 1.1;
  text-align: center;
}

.section-desc {
  font-size: 1rem;
  text-align: center;
  padding: 0 0.5rem;
}

/* Mobile Touch Targets */
.about-article {
  min-height: 44px;
  padding: 0.75rem;
}

.social-icons a {
  padding: 0.5rem;
  margin: 0 0.25rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Message Quote */
.message-quote {
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* Small Mobile (320px-480px) */
@media (max-width: 480px) {
  body {
    font-size: 13px;
  }
  
  .container {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  
  .hero-title {
    font-size: clamp(1.3rem, 7vw, 2rem);
    line-height: 1.1;
  }
  
  .content-section {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .principal-profile img {
    max-width: 180px !important;
    height: 200px !important;
  }
  
  .article-title {
    font-size: clamp(1rem, 5vw, 1.4rem);
  }
  
  .hero-content-wrapper,
  .breadcrumb-wrapper {
    padding: 0 0.5rem;
  }
}

/* Large Mobile (481px-575px) */
@media (min-width: 481px) and (max-width: 575px) {
  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }
  
  .content-section {
    padding: 1.25rem;
  }
  
  .principal-profile img {
    max-width: 220px !important;
    height: 240px !important;
  }
}

/* Tablet Portrait (576px-767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .magazine-hero {
    padding: 1.5rem 0;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  .content-section {
    padding: 1.5rem;
  }
  
  .about-layout {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .principal-profile {
    order: -1;
  }
}

/* Tablet Landscape (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .about-layout {
    display: grid !important;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
  }
  
  .principal-profile {
    order: 2;
  }
  
  .content-section:last-child {
    grid-column: 1 / -1;
  }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
  .about-layout {
    display: grid !important;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
  }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .about-layout {
    grid-template-columns: 1fr 350px;
    gap: 3rem;
  }
}

/* Improve text readability on mobile */
@media (max-width: 767px) {
  .article-excerpt {
    text-align: left;
    hyphens: auto;
    word-wrap: break-word;
  }
  
  .hero-content-wrapper {
    padding: 0 1rem;
  }
  
  .breadcrumb-wrapper {
    padding: 0 1rem;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .magazine-hero {
    padding: 0.5rem 0;
    margin-top: 50px;
  }
  
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
  
  .content-section {
    padding: 0.75rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .hero-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  }
  
  .content-section {
    border: 2px solid #333;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .content-section {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  .principal-profile {
    background-color: #2a2a2a;
  }
  
  .signature-card {
    background-color: #2a2a2a;
    border-left-color: #4a90e2;
  }
}

/* Safe area insets for devices with notches */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }
}

/* Print Styles */
@media print {
  .magazine-hero {
    margin-top: 0;
    padding: 1rem 0;
    background: none !important;
  }
  
  .hero-title {
    color: #000 !important;
    font-size: 2rem;
  }
  
  .content-section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  
  .principal-profile img {
    max-width: 150px !important;
    height: auto !important;
  }
}

/* Focus Styles for Accessibility */
.about-article:focus,
.social-icons a:focus {
  outline: 2px solid #C8102E;
  outline-offset: 2px;
}

.about-article:focus-visible,
.social-link:focus-visible {
  outline: 3px solid #C8102E;
  outline-offset: 2px;
}

/* Performance optimizations */
.about-article,
.principal-profile,
.content-section {
  will-change: transform;
  transform: translateZ(0);
}

/* Loading States */
.content-section.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Error States */
.content-section.error {
  border-left: 4px solid #dc3545;
  background-color: #f8d7da;
}