/* =============================================
   Dr. Amalan | JSS Hospital Karaikudi
   Theme: DMK Black & Red
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #1a1a1a;
  --red: #c0392b;
  --red-dark: #922b21;
  --red-light: #e74c3c;
  --white: #ffffff;
  --off-white: #f8f8f8;
  --gray-light: #f0f0f0;
  --gray: #888;
  --text: #2c2c2c;
  --text-muted: #666;
  --nav-h: 64px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Noto Sans Tamil', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--black);
  border-bottom: 3px solid var(--red);
  transition: box-shadow 0.3s;
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--red-light);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--red);
  color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, #1a1a1a 0%, #2c0a0a 50%, #8B0000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(192,57,43,0.05) 40px,
    rgba(192,57,43,0.05) 80px
  );
}

.hero-flag-stripe {
  position: absolute;
  top: var(--nav-h);
  left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #1a1a1a 50%, var(--red) 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem 4rem;
}

.hero-avatar {
  margin-bottom: 1.5rem;
}

.avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--red-light);
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 0 8px rgba(192,57,43,0.2);
}

.avatar-initials {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--red-light);
  font-family: 'Noto Sans Tamil', serif;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.hero-qual {
  color: #f0a0a0;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.tag {
  background: rgba(192,57,43,0.25);
  color: #ffaaaa;
  border: 1px solid rgba(192,57,43,0.5);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.hero-hospital {
  color: #ccc;
  margin-bottom: 2rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.cta-btn:hover {
  background: transparent;
  border-color: var(--red-light);
  color: var(--red-light);
  transform: translateY(-2px);
}

.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
}

.hero-wave svg { width: 100%; height: 100%; }

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 1.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--black);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--red);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.section-title.light { color: var(--white); }
.section-title.light::after { background: var(--red-light); }

/* ===== ABOUT ===== */
.about-section { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.8rem;
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.about-card:hover { transform: translateY(-4px); }

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--red-dark);
  margin-bottom: 0.8rem;
}

.about-card ul {
  list-style: none;
  padding: 0;
}

.about-card ul li {
  padding: 4px 0 4px 16px;
  position: relative;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--red);
}

.about-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* ===== SERVICES ===== */
.services-section {
  background: var(--gray-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 4px solid var(--red);
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.service-card:hover {
  background: var(--black);
  transform: translateY(-6px);
}

.service-card:hover h3 { color: var(--red-light); }
.service-card:hover p { color: #bbb; }

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  transition: color 0.3s;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  transition: color 0.3s;
}

/* ===== POLITICS ===== */
.politics-section {
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.politics-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 30px,
    rgba(192,57,43,0.04) 30px,
    rgba(192,57,43,0.04) 60px
  );
}

.politics-header {
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.dmk-flag-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.flag-black, .flag-red {
  display: block;
  width: 80px;
  height: 12px;
  border-radius: 2px;
}

.flag-black { background: #fff; }
.flag-red { background: var(--red); }

.politics-content { position: relative; z-index: 1; }

.politics-quote {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid var(--red);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.politics-quote p {
  color: #e0e0e0;
  font-size: 0.96rem;
  line-height: 1.8;
  font-style: italic;
}

.politics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.politics-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
  transition: all 0.3s;
}

.politics-card:hover {
  background: rgba(192,57,43,0.15);
  border-color: var(--red-light);
  transform: translateY(-4px);
}

.pol-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.politics-card h3 {
  color: var(--red-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.politics-card p {
  color: #aaa;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact-section { background: var(--white); }

.contact-grid {
  display: flex;
  justify-content: center;
}

.contact-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--red);
}

.contact-avatar {
  width: 80px;
  height: 80px;
  background: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--red-light);
  margin: 0 auto 1rem;
  border: 3px solid var(--red);
}

.contact-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.3rem;
}

.contact-qual {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.contact-details {
  background: var(--white);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e0e0e0;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contact-row:last-child { border-bottom: none; }

.contact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 200px;
}

.phone-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}

.call-btn {
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  padding: 16px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: #888;
  text-align: center;
  padding: 1.5rem;
}

.dmk-strip {
  display: flex;
  height: 6px;
  margin-bottom: 1rem;
}

.dmk-strip span:first-child {
  flex: 1;
  background: #fff;
}

.dmk-strip span:last-child {
  flex: 1;
  background: var(--red);
}

.footer p { font-size: 0.85rem; margin-bottom: 4px; }
.footer-party { color: var(--red-light); font-size: 0.8rem; }

/* Book title — Tamil text highlight */
.book-title-tamil {
  font-family: 'Noto Sans Tamil', serif;
  color: var(--red-light);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 2px solid var(--red);
    transform: translateY(-110%);
    transition: transform 0.3s;
    z-index: 999;
  }

  .nav-links.open { transform: translateY(0); }

  .about-grid,
  .services-grid,
  .politics-grid { grid-template-columns: 1fr; }

  .section { padding: 3.5rem 1rem; }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}