/* Fonts loaded via <link> in HTML for better performance */

:root {
  --saffron: #E8751A;
  --saffron-dark: #C45E0E;
  --saffron-light: #FFF3E8;
  --green-gov: #1B6B3A;
  --green-dark: #124A28;
  --green-light: #E8F5EE;
  --navy: #1A2744;
  --navy-light: #2C3E5F;
  --white: #FFFFFF;
  --off-white: #FAFAF7;
  --gray-50: #F7F7F5;
  --gray-100: #EFEFEB;
  --gray-200: #DDDDD7;
  --gray-400: #9B9B93;
  --gray-600: #5F5F58;
  --gray-800: #2D2D28;
  --blue-link: #1558B0;
  --red-alert: #C0392B;
  --font-telugu: 'Mandali', 'Noto Sans Telugu', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --max-width: 1140px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(26,39,68,0.08);
  --shadow-md: 0 4px 16px rgba(26,39,68,0.10);
  --shadow-lg: 0 8px 32px rgba(26,39,68,0.12);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}
h1 { font-size: 1.85rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--gray-200); }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; color: var(--green-gov); }
h4 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }

p { margin-bottom: 1rem; }

.telugu { font-family: var(--font-telugu); line-height: 1.9; }
.telugu-block { 
  background: var(--saffron-light); 
  border-left: 4px solid var(--saffron); 
  padding: 1rem 1.25rem; 
  border-radius: 0 var(--radius) var(--radius) 0; 
  margin-bottom: 1.25rem; 
  font-family: var(--font-telugu); 
  line-height: 1.9;
}

a { color: var(--blue-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--saffron-dark); text-decoration: underline; }

ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.35rem; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.content-wrapper { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.main-content { min-width: 0; }
.sidebar { position: sticky; top: 1rem; }

/* ── Top Bar ── */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  padding: 0.4rem 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.top-bar a { color: rgba(255,255,255,0.9); }
.top-bar a:hover { color: var(--saffron); text-decoration: none; }

/* ── Header ── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--saffron);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}
.logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--saffron), var(--green-gov));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-telugu);
}
.logo-text { line-height: 1.2; }
.logo-text .brand { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.logo-text .brand span { color: var(--saffron); }
.logo-text .tagline { font-size: 0.72rem; color: var(--gray-600); letter-spacing: 0.3px; }

/* ── Navigation ── */
.nav-toggle { display: none; background: none; border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 0.4rem 0.65rem; cursor: pointer; font-size: 1.3rem; color: var(--navy); }

.main-nav ul { display: flex; list-style: none; gap: 0.15rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-800);
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--saffron-light);
  color: var(--saffron-dark);
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--green-dark) 100%);
  color: var(--white);
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,117,26,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { color: var(--white); font-size: 2rem; margin-bottom: 0.5rem; position: relative; }
.hero p { opacity: 0.9; font-size: 1.05rem; max-width: 700px; position: relative; }
.hero .telugu { opacity: 0.85; font-size: 0.95rem; }

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.82rem;
  color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-600); }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Quick Links Grid ── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.quick-link {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--navy);
}
.quick-link:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--navy);
}
.quick-link .icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.quick-link .title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.quick-link .desc { font-size: 0.78rem; color: var(--gray-600); }

/* ── CTA Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--saffron); color: var(--white); }
.btn-primary:hover { background: var(--saffron-dark); color: var(--white); text-decoration: none; }
.btn-secondary { background: var(--green-gov); color: var(--white); }
.btn-secondary:hover { background: var(--green-dark); color: var(--white); text-decoration: none; }
.btn-outline { background: transparent; color: var(--saffron); border: 2px solid var(--saffron); }
.btn-outline:hover { background: var(--saffron); color: var(--white); text-decoration: none; }

/* ── Article Content ── */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* ── Step-by-Step Guide ── */
.steps-list { counter-reset: step-counter; list-style: none; padding: 0; margin: 1.25rem 0; }
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--green-gov);
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0.75rem;
  top: 1rem;
  width: 28px;
  height: 28px;
  background: var(--green-gov);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Info Boxes ── */
.info-box {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
.info-box.note { background: #EBF5FB; border-left: 4px solid #2980B9; }
.info-box.warning { background: #FEF9E7; border-left: 4px solid #F1C40F; }
.info-box.important { background: #FDEDEC; border-left: 4px solid var(--red-alert); }
.info-box.success { background: var(--green-light); border-left: 4px solid var(--green-gov); }
.info-box strong { display: block; margin-bottom: 0.25rem; }

/* ── Table ── */
.table-responsive { overflow-x: auto; margin: 1.25rem 0; border-radius: var(--radius); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--gray-200); }
tr:nth-child(even) td { background: var(--gray-50); }
tr:hover td { background: var(--saffron-light); }

/* ── FAQ Accordion ── */
.faq-section { margin: 2rem 0; }
.faq-section h2 { border-bottom-color: var(--saffron); }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--saffron);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 1.25rem 1rem;
}
.faq-answer p { margin-bottom: 0.5rem; }

/* ── Sidebar ── */
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.sidebar-card h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--saffron);
  color: var(--navy);
}
.sidebar-links { list-style: none; padding: 0; margin: 0; }
.sidebar-links li { border-bottom: 1px solid var(--gray-100); }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  color: var(--gray-800);
  transition: all var(--transition);
}
.sidebar-links a:hover { color: var(--saffron); padding-left: 0.5rem; text-decoration: none; }

.portal-btn {
  display: block;
  text-align: center;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius);
  margin-top: 0.75rem;
  text-decoration: none;
  transition: all var(--transition);
}
.portal-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--white); text-decoration: none; }

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; position: relative; padding-bottom: 0.5rem; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--saffron); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 0.88rem; }
.footer-col a:hover { color: var(--saffron); text-decoration: none; }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }

/* ── Responsive ── */
@media (max-width: 992px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .hero { padding: 1.75rem 0; }
  .hero h1 { font-size: 1.55rem; }
  .article-card { padding: 1.25rem; }
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--gray-100); }
  .header-inner { flex-wrap: wrap; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .quick-links { grid-template-columns: 1fr; }
  .top-bar .container { justify-content: center; text-align: center; }
  body { font-size: 15px; }
}

/* ── Print ── */
@media print {
  .site-header, .site-footer, .sidebar, .top-bar, .nav-toggle { display: none; }
  .content-wrapper { grid-template-columns: 1fr; }
  .article-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.5s ease both; }
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }

/* ── TOC ── */
.toc {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.toc h4 { margin: 0 0 0.65rem; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.88rem; }
.toc a { color: var(--gray-800); }
.toc a:hover { color: var(--saffron); }

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--saffron);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* ── Last Updated ── */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--green-light);
  color: var(--green-gov);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
