/* 
  TRƯỜNG THCS PHÙ ĐỔNG - STYLESHEET CHÍNH THỨC
  Website: https://phudong.edu.vn
  Design System: Modern Vietnamese Educational Identity
*/

:root {
  --primary-color: #0F2C59;
  --primary-dark: #08162E;
  --primary-light: #1E3A8A;
  --secondary-color: #D4AF37;
  --secondary-hover: #B89528;
  --accent-color: #0284C7;
  --accent-light: #E0F2FE;
  
  --bg-main: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-footer: #08162E;
  
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-white: #FFFFFF;
  
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 44, 89, 0.08), 0 2px 4px -1px rgba(15, 44, 89, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 44, 89, 0.12), 0 8px 10px -6px rgba(15, 44, 89, 0.06);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-light);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

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

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.3;
}

.section-title {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: var(--secondary-color);
  margin-top: 6px;
  border-radius: var(--radius-full);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Top Bar */
.topbar {
  background-color: var(--primary-dark);
  color: var(--text-white);
  padding: 7px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
}

.topbar-item a {
  color: #FFFFFF;
}

.topbar-item a:hover {
  color: var(--secondary-color);
}

.topbar-quicklinks {
  display: flex;
  gap: 12px;
}

.topbar-badge {
  background-color: rgba(212, 175, 55, 0.2);
  color: var(--secondary-color);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

/* Main Header */
.main-header {
  background-color: var(--bg-main);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--primary-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo img {
  height: 62px;
  width: 62px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.brand-subhead {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.brand-text h1 {
  font-size: 1.35rem;
  color: var(--primary-color);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.brand-text p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
  white-space: nowrap;
}

/* Navigation Menu */
.navbar {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  padding: 9px 14px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap; /* Prevents word wrapping on menu items */
  transition: var(--transition);
}

.nav-link i {
  font-size: 0.95rem;
  color: var(--primary-color);
  transition: color 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(15, 44, 89, 0.08);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: #FFFFFF;
  font-weight: 700;
}

.nav-link.active i {
  color: var(--secondary-color);
}

.nav-link.nav-cta {
  background: linear-gradient(135deg, #D4AF37 0%, #B89528 100%);
  color: #0F2C59;
  font-weight: 700;
  padding: 9px 18px;
  margin-left: 6px;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.nav-link.nav-cta i {
  color: #0F2C59;
}

.nav-link.nav-cta:hover {
  background: linear-gradient(135deg, #E5B82E 0%, #D4AF37 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  color: #0F2C59;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 6px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--text-white);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content h2 {
  font-size: 2.3rem;
  color: #FFFFFF;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.hero-content h2 span {
  color: var(--secondary-color);
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--secondary-color);
  color: #000000;
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
  color: #000000;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.hero-banner-frame {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.hero-banner-frame img {
  border-radius: var(--radius-md);
  width: 100%;
  height: 340px;
  object-fit: cover;
}

/* Quick Portals Strip */
.portals-strip {
  background: var(--bg-main);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.portal-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.portal-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.portal-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(15, 44, 89, 0.08);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.portal-info h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.portal-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Layouts */
.section {
  padding: 4rem 0;
}

.section-light {
  background-color: var(--bg-light);
}

.section-white {
  background-color: var(--bg-main);
}

/* Introduction Block */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-content p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: justify;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.highlight-box {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
}

.highlight-box h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.highlight-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.news-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

.news-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.news-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-title a {
  color: var(--text-primary);
}

.news-title a:hover {
  color: var(--primary-light);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

/* Activity Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 44, 89, 0.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  color: #FFFFFF;
  opacity: 0.9;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Notice & Document List */
.notice-box {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.notice-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notice-date {
  background: rgba(15, 44, 89, 0.06);
  border: 1px solid rgba(15, 44, 89, 0.1);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 70px;
}

.notice-date .day {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.notice-date .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
}

.notice-content h4 {
  font-size: 0.975rem;
  margin-bottom: 4px;
}

.notice-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: #FFFFFF;
  padding: 2.5rem 0;
}

.breadcrumb-banner h1 {
  color: #FFFFFF;
  font-size: 2rem;
  margin-bottom: 8px;
}

.breadcrumb-list {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-list a {
  color: var(--secondary-color);
}

/* Contact Page Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-card {
  background: var(--bg-main);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  color: var(--accent-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(15, 44, 89, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background-color: var(--bg-footer);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: #FFFFFF;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--secondary-color);
}

.footer-col p {
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.925rem;
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
}

/* Verification Badge */
.verified-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 15px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Popup */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .brand-text p {
    display: none; /* Hide subtitle on smaller desktops to keep clean horizontal layout */
  }
}

@media (max-width: 992px) {
  .hero-grid, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-main);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1050;
  }

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

  .nav-link.nav-cta {
    margin-left: 0;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .topbar-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .brand-logo img {
    height: 48px;
    width: 48px;
  }

  .brand-text h1 {
    font-size: 1.1rem;
  }

  .brand-subhead {
    font-size: 0.65rem;
  }
  
  .hero-content h2 {
    font-size: 1.75rem;
  }
  
  .news-grid, .gallery-grid {
    grid-template-columns: 1fr;
  }
}
