/* ==========================================================================
   UCCCSL Co-operative Bank Design System
   ========================================================================== */

:root {
  --primary-color: #003366;
  --secondary-color: #0056b3;
  --accent-color: #f4b400;
  --dark-bg: #0a192f;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 51, 102, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 51, 102, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 51, 102, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: #ffffff;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary-color);
}

.serif-font {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ==========================================================================
   TOP BAR & NAVIGATION
   ========================================================================== */
.top-bar {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar a {
  color: #ffffff;
  text-decoration: none;
}

.top-bar a:hover {
  color: var(--accent-color);
}

/* --- BRAND BAR: Row 2 (Logo + Login Buttons) --- */
.brand-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,51,102,0.06);
  position: sticky;
  top: 0;
  z-index: 1001;
}

.bank-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--accent-color);
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-color);
  flex-shrink: 0;
}

.bank-logo-img {
  max-height: 48px;
  max-width: 160px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-name-text {
  color: var(--primary-color);
  font-size: clamp(0.85rem, 2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* --- NAV MENU BAR: Row 3 (Navigation Links) --- */
.bank-navbar-menu {
  background-color: var(--primary-color);
  border-bottom: 3px solid var(--accent-color);
  position: sticky;
  top: 72px; /* height of brand-bar */
  z-index: 1000;
}

.nav-menu-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu-list::-webkit-scrollbar { display: none; }

.nav-menu-link {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 12px 16px;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-menu-link:hover {
  color: #ffffff;
  background-color: rgba(255,255,255,0.08);
}

.nav-menu-link:hover::after,
.nav-menu-link.active::after {
  transform: scaleX(1);
}

.nav-menu-link.active {
  color: var(--accent-color);
  background-color: rgba(255,255,255,0.07);
}

/* Mobile menu toggle button */
.navbar-toggler-custom {
  display: none;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 0;
  text-align: left;
  cursor: pointer;
  gap: 8px;
  align-items: center;
}

.nav-menu-collapse { display: block; }

/* Responsive: mobile stacked menu */
@media (max-width: 991.98px) {
  .brand-bar { position: sticky; top: 0; }
  .bank-navbar-menu { position: static; }
  .navbar-toggler-custom { display: flex; }
  .nav-menu-collapse { display: none; }
  .nav-menu-collapse.open { display: block; }
  .nav-menu-list {
    flex-direction: column;
    align-items: flex-start;
    overflow-x: unset;
    padding: 4px 0 8px;
  }
  .nav-menu-link {
    width: 100%;
    padding: 10px 8px;
    font-size: 0.95rem;
  }
  .nav-menu-link::after { display: none; }
}

.btn-accent {
  background-color: var(--accent-color);
  color: #000000;
  font-weight: 700;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(244, 180, 0, 0.35);
  font-size: 0.85rem;
}

.btn-accent:hover {
  background-color: #e5a800;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 180, 0, 0.45);
}

.btn-bank-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

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

.btn-outline-bank {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-outline-bank:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* ==========================================================================
   HERO SLIDER & HEADERS
   ========================================================================== */
.hero-slider {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  padding: 90px 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #ffffff;
  padding: 60px 0;
  text-align: center;
  border-bottom: 4px solid var(--accent-color);
}

.page-header h1 {
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   CARDS & SECTIONS
   ========================================================================== */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  position: relative;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.bank-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  height: 100%;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bank-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 86, 179, 0.3);
}

.card-icon-box {
  width: 56px;
  height: 56px;
  background-color: rgba(0, 86, 179, 0.08);
  color: var(--secondary-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.rate-badge {
  background-color: rgba(244, 180, 0, 0.15);
  color: #92400e;
  border: 1px solid rgba(244, 180, 0, 0.4);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 50px;
}

/* ==========================================================================
   CALCULATORS & FORMS
   ========================================================================== */
.calculator-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.result-display {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
}

.form-control, .form-select {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* ==========================================================================
   TABLES & BADGES
   ========================================================================== */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.custom-table thead {
  background-color: var(--primary-color);
  color: #ffffff;
}

.custom-table th {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background-color: rgba(0, 86, 179, 0.03);
}

/* ==========================================================================
   DASHBOARDS (CUSTOMER & ADMIN)
   ========================================================================== */
.sidebar {
  background-color: var(--primary-color);
  color: #ffffff;
  min-height: calc(100vh - 60px);
  padding: 24px 16px;
  width: 250px;
  min-width: 250px;
  flex-shrink: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-link.active {
  background-color: var(--accent-color);
  color: #000000;
}

.dashboard-content {
  padding: 32px 24px;
  background-color: var(--light-bg);
  min-height: calc(100vh - 60px);
  flex-grow: 1;
}

/* ==========================================================================
    DASHBOARD RESPONSIVE (Mobile & Tablet)
    ========================================================================== */
@media (max-width: 991.98px) {
  body {
    overflow-x: hidden;
  }

  .bank-navbar {
    padding: 8px 0;
  }

  .bank-navbar .container-fluid {
    flex-wrap: wrap;
    gap: 6px;
  }

  .bank-navbar .navbar-brand {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 4px;
  }

  .bank-navbar .navbar-brand span {
    font-size: 0.75rem !important;
  }

  .bank-navbar .navbar-brand .badge {
    font-size: 0.6rem !important;
    padding: 2px 6px;
  }

  .bank-navbar .d-flex.gap-3 {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px !important;
  }

  .bank-navbar .btn-sm {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .dashboard-content {
    padding: 16px 12px;
    width: 100%;
    min-width: 0;
  }

  .dashboard-content .row.g-4 > [class*="col-"] {
    margin-bottom: 12px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .bank-card {
    padding: 16px 14px;
  }

  .card-icon-box {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .table-responsive {
    font-size: 0.8rem;
    border-radius: var(--radius-md);
  }

  .custom-table th,
  .custom-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .form-control,
  .form-select {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  .modal-dialog {
    margin: 8px;
    max-width: calc(100% - 16px);
  }

  .welcome-banner-mobile {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .welcome-banner-mobile .btn {
    align-self: stretch;
  }

  #user-search,
  input[style*="min-width:200px"] {
    min-width: 140px !important;
    flex: 1;
  }
}

@media (max-width: 575.98px) {
  body {
    overflow-x: hidden;
  }

  .dashboard-content {
    padding: 12px 8px;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .bank-card {
    padding: 14px 12px;
  }

  .custom-table th,
  .custom-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .btn-sm {
    padding: 3px 6px;
    font-size: 0.7rem;
  }

  #user-search,
  input[style*="min-width:200px"] {
    min-width: 100% !important;
    width: 100%;
  }
}

/* ==========================================================================
    WEBSITE RESPONSIVE (Mobile & Tablet)
    ========================================================================== */
@media (max-width: 991.98px) {
  .hero-slide {
    padding: 60px 0;
    min-height: 360px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .hero-slide .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
    margin-bottom: 24px;
  }

  .page-header {
    padding: 40px 0;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .brand-name-text {
    font-size: 0.9rem;
  }

  .bank-logo {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .bank-logo-img {
    max-height: 40px;
    max-width: 120px;
  }
}

@media (max-width: 575.98px) {
  .hero-slide {
    padding: 40px 0;
    min-height: 280px;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .bank-card {
    padding: 16px 14px;
  }

  .result-value {
    font-size: 1.5rem;
  }

  .dashboard-content {
    padding: 16px 12px;
  }

  .modal-dialog {
    margin: 8px;
  }
}

/* Mobile sidebar overlay */
@media (max-width: 767.98px) {
  .sidebar.mobile-sidebar-open {
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 1040;
    width: 260px;
    min-width: 260px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
  }

  .sidebar-overlay.active {
    display: block;
  }
}

/* ==========================================================================
    FOOTER
    ========================================================================== */
.bank-footer {
  background-color: var(--dark-bg);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 24px 0;
  margin-top: auto;
  border-top: 4px solid var(--accent-color);
  font-size: 0.875rem;
}

.bank-footer h5 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bank-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: var(--transition);
}

.bank-footer a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 40px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* i18n language switch fade */
body { transition: opacity 0.12s ease; }
[lang=kn] { font-family: 'Noto Sans Kannada', 'Inter', sans-serif; }

/* ==========================================================================
   NEWS PHOTO GALLERY (Admin Dashboard)
   ========================================================================== */
.news-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  min-height: 40px;
}

.news-photo-thumb {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: #f1f5f9;
}

.news-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-photo-thumb .main-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--accent-color);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.news-photo-thumb .photo-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}

.news-photo-thumb .photo-actions button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.news-photo-thumb .photo-actions button:hover {
  background: rgba(0,0,0,0.85);
}

.news-photo-thumb .photo-actions .btn-main.active {
  background: var(--accent-color);
  color: #000;
}

.news-photo-thumb.is-main {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(244, 180, 0, 0.25);
}

/* ==========================================================================
   NEWS DETAIL GALLERY (Public Frontend)
   ========================================================================== */
.news-gallery-main {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 51, 102, 0.14);
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.news-gallery-main:hover {
  transform: scale(1.01);
}

.news-gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.news-gallery-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.news-gallery-thumb:hover,
.news-gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.news-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc3545;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 16px 0;
  transition: all 0.2s ease;
}

.news-pdf-download:hover {
  background: #c82333;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

