/* css/style.css */
html {
  font-size: 100%;
}

:root {
  --primary-color: #cc0000;
  --secondary-color: #1a1a1a;
  --bg-color: #f8f9fa;
  --text-dark: #333333;
  --text-light: #ffffff;
  --gray-light: #e0e0e0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utilities */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: #a30000;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-dark);
}

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 75px;
}

.logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: #cc0000;
  letter-spacing: -0.8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.85;
}

.logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #4b5563;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 70%;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Modern Card Design */
.card {
  background: var(--text-light);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}

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

.card-static {
  background: var(--text-light);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
}

/* Responsive Navigation Breakpoint for Phones and Tablets */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
    /* Mobile menu handled via JS */
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--text-light);
    flex-direction: column;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }
}

/* Modal Popup Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 24px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
  transform: rotate(90deg);
}

.modal-header {
  padding: 30px 30px 15px;
  border-bottom: 1px solid #eee;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
}

.modal-subtitle {
  color: var(--primary-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.modal-scroll-container {
  overflow-y: auto;
  padding: 0 30px 30px;
  flex-grow: 1;
}

.modal-holiday-item {
  margin-top: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal-holiday-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.modal-holiday-details {
  padding: 20px;
}

.modal-holiday-details h3 {
  font-size: 1.4rem;
  margin: 10px 0;
  color: var(--text-dark);
}

.modal-holiday-details p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-no-holiday {
  padding: 50px 40px;
  text-align: center;
}

.no-holiday-icon {
  font-size: 4.5rem;
  margin-bottom: 20px;
}

.modal-no-holiday h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 800;
}

.modal-no-holiday p {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.6;
}

.modal-no-holiday .no-holiday-sub {
  color: #888;
  font-size: 0.95rem;
  margin-top: 10px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-public {
  background: rgba(204, 0, 0, 0.1);
  color: #cc0000;
}

.badge-restricted {
  background: rgba(255, 153, 0, 0.1);
  color: #ff9900;
}

.badge-observance {
  background: rgba(0, 153, 204, 0.1);
  color: #0099cc;
}

.badge-bank {
  background: rgba(46, 184, 46, 0.1);
  color: #2eb82e;
}

/* AdSense / Google Ads Collapse Rules */
ins.adsbygoogle {
  margin: 0 auto;
}

ins.adsbygoogle:empty,
ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle[data-ad-status="unfilled"] * {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
}

.google-ad-container {
  margin-top: 30px;
}

.google-ad-container:has(> ins.adsbygoogle:empty),
.google-ad-container:has(> ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Floating AI Chatbot Widget Styles */
#chatbot-launcher {
  position: fixed;
  bottom: 35px;
  right: 35px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(204, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.2s;
  line-height: 1;
  text-align: center;
}

#chatbot-launcher:hover {
  transform: scale(1.1);
}

#chatbot-container {
  position: fixed;
  bottom: 110px;
  right: 35px;
  width: 380px;
  height: 520px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 9999;
  font-family: inherit;
}

@media (max-width: 480px) {
  #chatbot-launcher {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  #chatbot-container {
    bottom: 85px;
    right: 15px;
    left: 15px;
    width: auto;
    height: calc(100vh - 120px);
    max-height: 500px;
    border-radius: 16px;
  }
}

/* Today Highlight Card Responsive Layout */
.today-highlight-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: white;
}

.today-highlight-img {
  flex: 1;
  min-width: 300px;
  min-height: 350px;
}

.today-highlight-text {
  flex: 1.5;
  min-width: 300px;
  padding: 40px;
}

@media (max-width: 768px) {
  .today-highlight-card {
    flex-direction: column;
  }

  .today-highlight-img {
    width: 100%;
    min-height: 250px;
  }

  .today-highlight-text {
    padding: 30px;
    width: 100%;
  }
}

/* Leave Planner Responsive Grids */
.leave-planner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  align-items: start;
}

@media (max-width: 992px) {
  .leave-planner-grid {
    grid-template-columns: 1fr;
  }
}

.leave-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  text-align: center;
  margin-bottom: 25px;
}

@media (max-width: 576px) {
  .leave-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile Layout Responsive Grid */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 992px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   MOBILE RESPONSIVE OVERRIDES
   Targets: 320px / 375px / 425px viewports
   =========================================== */

/* --- Medium-small phones & below (425px and under) --- */
@media (max-width: 480px) {

  /* Scale down the oversized base font for small screens */
  html {
    font-size: 110% !important;
  }

  /* Tighter container padding */
  .container {
    padding: 0 12px;
  }

  /* Header adjustments */
  .header-inner {
    height: 60px;
    gap: 6px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .header-actions .btn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
  }

  .hamburger {
    font-size: 1.3rem;
    margin-left: 4px !important;
  }

  /* Nav menu mobile dropdown */
  .nav-menu {
    top: 60px !important;
    padding: 15px;
  }

  /* ---------- HERO SECTION ---------- */
  section[style*="padding: 100px 0"] {
    padding: 50px 0 !important;
  }

  /* Hero title */
  section h1[style*="font-size: 3.5rem"] {
    font-size: 1.75rem !important;
    margin-bottom: 12px !important;
    letter-spacing: -0.5px !important;
  }

  /* Hero subtitle */
  section p[style*="font-size: 1.3rem"] {
    font-size: 0.95rem !important;
    margin-bottom: 25px !important;
  }

  /* Search form - stack vertically on tiny screens */
  form[id="search-form"] {
    flex-direction: column !important;
    border-radius: 20px !important;
    padding: 10px !important;
    max-width: 100% !important;
    gap: 8px;
  }

  form[id="search-form"] input[type="text"] {
    font-size: 0.95rem !important;
    padding: 12px 10px !important;
    width: 100% !important;
  }

  form[id="search-form"] button[type="submit"] {
    border-radius: 16px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    width: 100%;
    margin-left: 0 !important;
  }

  form[id="search-form"] div[style*="padding: 0 15px"] {
    display: none !important;
  }

  /* ---------- COUNTDOWN SECTION ---------- */
  #countdown-days {
    font-size: 1.5rem !important;
    padding: 4px 10px !important;
  }

  div[style*="min-width: 90px"] {
    min-width: 65px !important;
    padding: 8px 12px !important;
  }

  span[id="countdown-hours"],
  span[id="countdown-mins"],
  span[id="countdown-secs"] {
    font-size: 1.3rem !important;
  }

  /* Countdown card */
  .card[style*="max-width: 800px"] {
    padding: 20px !important;
    border-radius: 18px !important;
  }

  .card[style*="max-width: 800px"] h2 {
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
  }

  /* ---------- TODAY'S HIGHLIGHT SECTION ---------- */
  section[id="today"] {
    padding: 40px 0 !important;
  }

  .section-title {
    font-size: 1.6rem !important;
  }

  h2.section-title[style*="font-size: 2.5rem"] {
    font-size: 1.6rem !important;
  }

  .today-highlight-card {
    border-radius: 16px !important;
  }

  .today-highlight-img {
    min-width: unset !important;
    min-height: 180px !important;
  }

  .today-highlight-text {
    min-width: unset !important;
    padding: 20px !important;
  }

  .today-highlight-text h3 {
    font-size: 1.5rem !important;
    margin: 12px 0 10px !important;
  }

  .today-highlight-text p {
    font-size: 0.95rem !important;
  }

  /* No-holiday placeholder */
  div[style*="padding: 60px 40px"] {
    padding: 30px 20px !important;
  }

  div[style*="font-size: 4rem"] {
    font-size: 2.5rem !important;
  }

  h3[style*="font-size: 2.2rem"] {
    font-size: 1.4rem !important;
  }

  p[style*="font-size: 1.2rem"] {
    font-size: 0.95rem !important;
  }

  /* ---------- THIS MONTH SECTION ---------- */
  div[style*="display: flex; flex-wrap: wrap; overflow: hidden"] {
    flex-direction: column !important;
  }

  div[style*="min-width: 300px"][style*="padding: 60px 50px"] {
    min-width: unset !important;
    padding: 30px 20px !important;
  }

  h3[style*="font-size: 3rem"] {
    font-size: 1.8rem !important;
  }

  p[style*="font-size: 1.15rem"] {
    font-size: 0.95rem !important;
  }

  .btn[style*="padding: 15px 35px"] {
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
  }

  /* Month holiday items */
  div[style*="display: flex; gap: 20px; margin-bottom: 25px"] {
    gap: 12px !important;
    padding: 12px !important;
  }

  div[style*="min-width: 80px"] {
    min-width: 60px !important;
    padding: 8px 10px !important;
  }

  /* ---------- TRENDING SECTION ---------- */
  div[style*="grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  h3[style*="font-size: 1.5rem"] {
    font-size: 1.2rem !important;
  }

  div[style*="font-size: 3.5rem"] {
    font-size: 2.5rem !important;
  }

  .btn[style*="padding: 12px"][style*="font-size: 0.9rem"] {
    font-size: 0.8rem !important;
    padding: 10px !important;
  }

  /* ---------- UPCOMING HOLIDAYS ---------- */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  .btn[style*="padding: 18px 48px"] {
    padding: 14px 30px !important;
    font-size: 1rem !important;
  }

  /* ---------- STATE WISE SECTION ---------- */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  div[style*="display: flex; justify-content: space-between; align-items: flex-end"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  h2.section-title[style*="font-size: 2.2rem"] {
    font-size: 1.5rem !important;
  }

  .btn[style*="padding: 18px 45px"] {
    padding: 14px 30px !important;
    font-size: 1rem !important;
  }

  /* ---------- BLOG SECTION ---------- */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  div[style*="height: 220px"][style*="background: url"] {
    height: 180px !important;
  }

  /* ---------- FAQ SECTION ---------- */
  h2[style*="font-size: 2.2rem"] {
    font-size: 1.4rem !important;
  }

  .card[style*="padding: 25px"] {
    padding: 18px !important;
  }

  h3[style*="font-size: 1.25rem"] {
    font-size: 1.05rem !important;
  }

  /* ---------- FOOTER ---------- */
  footer {
    padding: 35px 0 25px 0 !important;
  }

  footer div[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  footer form[style*="display: flex"] {
    flex-direction: column !important;
    gap: 8px;
  }

  footer form input[type="email"] {
    border-radius: 12px !important;
  }

  footer form button {
    border-radius: 12px !important;
  }

  /* ---------- MODAL POPUP ---------- */
  .modal-card {
    width: 95% !important;
    border-radius: 18px !important;
    max-height: 90vh !important;
  }

  .modal-header {
    padding: 20px 20px 12px !important;
  }

  .modal-title {
    font-size: 1.3rem !important;
  }

  .modal-scroll-container {
    padding: 0 20px 20px !important;
  }

  .modal-holiday-img {
    height: 140px !important;
  }

  .modal-holiday-details h3 {
    font-size: 1.15rem !important;
  }

  .modal-no-holiday {
    padding: 30px 20px !important;
  }

  .no-holiday-icon {
    font-size: 3rem !important;
  }

  .modal-no-holiday h2 {
    font-size: 1.4rem !important;
  }

  /* General section padding reduction */
  section[style*="padding: 80px 0"] {
    padding: 40px 0 !important;
  }

  section[style*="padding: 80px 0 30px 0"] {
    padding: 40px 0 20px 0 !important;
  }

  /* Countdown timer label text */
  span[style*="font-size: 0.9rem"][style*="text-transform: uppercase"][style*="letter-spacing: 2px"] {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
  }

  /* Section subtitle text */
  span[style*="letter-spacing: 1px"][style*="text-transform: uppercase"][style*="font-size: 0.9rem"] {
    font-size: 0.8rem !important;
  }

  /* Trending section header */
  h2.section-title[style*="font-size: 2.5rem"] {
    font-size: 1.5rem !important;
  }

  p[style*="font-size: 1.1rem"] {
    font-size: 0.9rem !important;
  }
}

/* --- Extra-small phones (320px) --- */
@media (max-width: 360px) {

  html {
    font-size: 100% !important;
  }

  .container {
    padding: 0 10px;
  }

  .header-inner {
    height: 55px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .header-actions .btn {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }

  /* Hero */
  section h1[style*="font-size: 3.5rem"] {
    font-size: 1.4rem !important;
  }

  /* Stacked search - even more compact */
  form[id="search-form"] {
    padding: 8px !important;
  }

  form[id="search-form"] input[type="text"] {
    font-size: 0.85rem !important;
    padding: 10px 8px !important;
  }

  form[id="search-form"] button[type="submit"] {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  /* Countdown */
  div[style*="min-width: 90px"] {
    min-width: 55px !important;
    padding: 6px 8px !important;
  }

  span[id="countdown-hours"],
  span[id="countdown-mins"],
  span[id="countdown-secs"] {
    font-size: 1.1rem !important;
  }

  #countdown-days {
    font-size: 1.2rem !important;
  }

  .card[style*="max-width: 800px"] h2 {
    font-size: 1rem !important;
  }

  /* States grid: single column on 320px */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* Today highlight */
  .today-highlight-img {
    min-height: 150px !important;
  }

  .today-highlight-text {
    padding: 15px !important;
  }

  .today-highlight-text h3 {
    font-size: 1.3rem !important;
  }

  /* This month title */
  h3[style*="font-size: 3rem"] {
    font-size: 1.5rem !important;
  }

  /* Card padding tighter */
  .card[style*="padding: 25px"] {
    padding: 14px !important;
  }

  /* Section titles */
  .section-title {
    font-size: 1.35rem !important;
  }

  /* View More buttons */
  .btn[style*="padding: 18px 48px"],
  .btn[style*="padding: 18px 45px"] {
    padding: 12px 22px !important;
    font-size: 0.9rem !important;
  }

  /* Trending cards */
  div[style*="padding: 30px; text-align: center; border-bottom"] {
    padding: 20px !important;
  }

  div[style*="padding: 25px; display: flex; flex-direction: column; flex: 1"] {
    padding: 18px !important;
  }

  /* Footer */
  footer {
    padding: 25px 0 20px 0 !important;
  }
}

/* Prevent any horizontal scroll globally on mobile */
@media (max-width: 480px) {

  html,
  body {
    overflow-x: hidden;
  }
}
/* Global Table Header Styles */
table thead th {
  background-color: #cc0000 !important;
  color: #ffffff !important;
}

/* Responsive Table Global Fix */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  table {
    width: 100% !important;
    min-width: unset !important;
  }
  th, td {
    white-space: normal !important;
    word-break: break-word;
    font-size: 0.85rem !important;
    padding: 10px !important;
  }
}
