/* styles/layout.css - Layout and grid systems */

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.center {
  justify-content: center;
}

.around {
  justify-content: space-around;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-md);
}

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

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

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Header Layout */
.site-header {
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}
/* ...existing code... */
.main-nav a {
  font-family: 'Segoe Rounded', 'Quicksand', 'Poppins', 'Arial Rounded MT Bold', Arial, sans-serif; /* Curvy font */
  font-weight: 800; /* Extra bold */
  font-size: 1.08rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: 2em; /* More curvy */
  transition: 
   background 0.25s cubic-bezier(.4,0,.2,1),
    color 0.18s cubic-bezier(.4,0,.2,1),
    transform 0.15s cubic-bezier(.4,0,.2,1),
    box-shadow 0.18s cubic-bezier(.4,0,.2,1);
  position: relative;
  background-color: #f5f5dc;
  color: #000;
}
.main-nav a:hover,
.main-nav a:focus {
  background-color: #000;
  color: #fff;
}
.main-nav a:active {
  background: linear-gradient(90deg, #e94343 0%, #38f9d7 100%);
  color: #fff;
  transform: scale(0.96) rotate(1deg);
  box-shadow: 0 2px 12px rgba(67,233,123,0.18);
}
.main-nav a[aria-current="page"] {
  background: linear-gradient(90deg, #737975 0%, #7e8181 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 2px 12px rgba(67,233,123,0.18);
}
/* ...existing code... */

/* Mobile Navigation */
@media (max-width: 768px) {
  .main-nav ul {
    gap: var(--space-md);
  }
  
  .main-nav a {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
  }
}

/* Hero Section */
.hero-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  background: #eee;
}
.hero-banner .hero-img {
  width: 100vw;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
@media (max-width: 900px) {
  .hero-banner, .hero-banner .hero-img {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Main Content Areas */
main {
  margin: var(--space-2xl) auto;
  min-height: 60vh;
}

section {
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* News Grid Layout */
.news-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.news-card {
  background: var(--background);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.news-card.large {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .news-card.large {
    grid-column: span 1;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-base);
}

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

.news-card.large .news-image {
  height: 300px;
}

.news-content {
  padding: var(--space-lg);
}

.news-content h3 {
  margin-bottom: var(--space-sm);
  font-size: var(--text-xl);
  line-height: 1.3;
}

.news-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.news-link:hover {
  color: var(--accent);
}

.excerpt {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
  line-height: 1.6;
}

.meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-sm);
  margin-top: var(--space-md);
}

.meta time {
  font-weight: 500;
}

/* Author Section */
.author-card {
  display: flex;
  gap: var(--space-xl);
  background: var(--background-alt);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  align-items: center;
}

.author-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 4px solid var(--accent);
}

.author-info h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.author-info p:first-of-type {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.bio {
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.author-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.stat {
  font-size: var(--text-sm);
  color: var(--text-light);
  padding: var(--space-xs) var(--space-sm);
  background: var(--background);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .author-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
  }
  
  .author-image {
    width: 120px;
    height: 120px;
  }
  
  .author-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Footer Layout */
.site-footer {
  background-color: var(--secondary);
  color: var(--background);
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: var(--accent);
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-section a {
  color: var(--background);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-section a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--background);
  opacity: 0.7;
  font-size: var(--text-sm);
}

/* Responsive Utilities */
.hidden {
  display: none;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none;
  }
}

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

/* --- Side Navigation --- */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 230px;
  height: 100vh;
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
  overflow-y: auto;
  padding-top: 0; /* Remove extra top padding */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.side-nav ul {
  list-style: none;
  padding: 1.5rem 0 1.5rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  align-items: center;
}
.side-nav li {
  width: 90%;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.7em;
  justify-content: flex-start;
  background: linear-gradient(90deg, #ffecd2 0%, #bdb8b7 100%);
  color: #222;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  border-radius: 12px;
  padding: 0.85em 1.2em;
  box-shadow: 0 2px 12px rgba(252,182,159,0.13), 0 1.5px 4px rgba(0,0,0,0.04);
  transition: 
    background 0.25s cubic-bezier(.4,0,.2,1),
    color 0.18s cubic-bezier(.4,0,.2,1),
    transform 0.15s cubic-bezier(.4,0,.2,1),
    box-shadow 0.18s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  outline: none;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}
.side-nav a:hover,
.side-nav a:focus {
  background: linear-gradient(90deg, #a1c4fd 0%, #c2e9fb 100%);
  color: #0056b3;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(161,196,253,0.18);
  border-color: #a1c4fd;
}
.side-nav a:active {
  background: linear-gradient(90deg, #e2dfdd 0%, #ffecd2 100%);
  color: #b3afac;
  transform: scale(0.98);
  border-color: #181413;
}
.side-nav a[aria-current="page"] {
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(67,233,123,0.18);
  border-color: #43e97b;
}
.side-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
  z-index: 0;
}
.side-nav a:active::after {
  width: 180%;
  height: 180%;
  transition: width 0.1s, height 0.1s;
}
.side-nav a span {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .side-nav {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: none;
    overflow-y: visible;
    flex-direction: row;
    align-items: stretch;
    padding-top: 0;
  }
  .side-nav ul {
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem 0;
    width: 100%;
  }
  .side-nav li {
    width: auto;
  }
}
body {
  margin-left: 230px;
  overflow-y: auto;
}
@media (max-width: 900px) {
  body {
    margin-left: 0;
  }
}
.footer-links-columns {
  display: flex;
  gap: 2rem;
}
.footer-links-title {
  text-align: justify;
  width: 100%;
  margin-bottom: 0.7em;
  font-weight: bold;
  letter-spacing: 1px;
}
.footer-links-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links-columns li {
  margin-bottom: 0.4em;
}
@media (max-width: 700px) {
  .footer-links-columns {
    flex-direction: column;
    gap: 0.5rem;
  }
}
#article-content h2 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

#article-content h3 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

#article-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}