/* Cookie Overlay */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-popup {
  max-width: 600px;
  background-color: #fff;
  border-radius: 8px;
}

body.cookie-blur {
  overflow: hidden;
}

/* Main Offset & Layout */
:root {
  --topbar-height: 40px;
  --header-height: 84px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
}
@media (max-width: 991.98px) {
  :root {
    --topbar-height: 32px;
    --header-height: 72px;
  }
}
.main-offset {
  padding-top: calc(var(--topbar-height) + var(--header-height));
}
.section-title { margin-top: 8px; margin-bottom: var(--space-6); }

/* Consistent section rhythm across public views */
.main-offset section { padding-block: var(--space-8); }
@media (max-width: 991.98px) { .main-offset section { padding-block: var(--space-6); } }

/* Common blocks spacing (site-wide) */
.main-offset .search-bar-wrapper { margin: 0 auto var(--space-6) !important; }
.main-offset .pagination-wrap { margin-top: var(--space-6) !important; }

/* In-page anchors (e.g., #faq) should not hide under fixed header */
.main-offset section[id] { scroll-margin-top: calc(var(--topbar-height) + var(--header-height) + 24px); }

/* News pager template (moved from inline <style> in pager view for CSP) */
.news-pagination .pagination { --bs-pagination-border-radius: .2rem; }
.news-pagination .page-link { padding: .25rem .55rem; }
.news-pagination .page-item.active .page-link { background:#2f5aa4; border-color:#2f5aa4; }

/* Remove custom inline margins/paddings to standardize spacing site-wide */
.main-offset [style*="margin-top"] { margin-top: 0 !important; }
.main-offset [style*="margin-bottom"] { margin-bottom: 0 !important; }
.main-offset [style*="padding-top"] { padding-top: 0 !important; }
.main-offset [style*="padding-bottom"] { padding-bottom: 0 !important; }

/* Cookie Banner */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 24px rgba(0,0,0,.08); }
.cookie-banner .content { max-width: 1140px; margin: 0 auto; padding: 16px; display: flex; gap: 16px; align-items: start; }
.cookie-banner .text { flex: 1; font-size: 14px; color: #2c3e50; }
.cookie-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1090; display: none; }
.cookie-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, 92vw); background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.2); z-index: 1100; display: none; }
.cookie-modal header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.cookie-modal .body { padding: 16px 20px; }
.cookie-modal .footer { padding: 12px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 8px; }
.cookie-switch { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.cookie-switch small { color: #6b7280; display: block; }

/* Apply Button */
.apply-btn {
  width: 20%;
  padding: 12px 20px;
  background-color: white;
  color: #00668e;
  border: 2px solid #00668e;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 102, 142, 0.2);
  transition: all 0.3s ease;
}

.apply-btn:hover {
  background-color: #00668e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 102, 142, 0.3);
}

/* Responsive: Full width on mobile */
@media (max-width: 768px) {
  .apply-btn {
    width: 100%;
  }
}

/* Button Base Style */
.action-button {
  display: inline-block;
  margin: 10px 8px 0;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Zoom Button - Brand Color */
.zoom-button {
  background-color: #00668e;
}
.zoom-button:hover {
  background-color: #004f6c;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: #fff;
}

/* Registration Button - Lighter tone */
.register-button {
  background-color: #2294b6;
}
.register-button:hover {
  background-color: #197c97;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.modal-body {
  padding: 0;
}

/* Anatomage / Product Viewer */
/* home/assets/anatomage/style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
#product_viewer { max-width: 50%; margin: 200px auto; }
#product_viewer img { display: block; width: 100%; }

/* All News Page */
.page-font-large {
  font-size: large;
}

.news-grid-full {
  grid-column: 1 / -1;
}

.search-bar-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  flex-wrap: wrap;
}

/* QA Page */
.qa-copy {
  font-size: 17px;
  line-height: 1.8;
}

.page-copy {
  font-size: 17px;
  line-height: 1.8;
}

/* Shared avatar sizing */
.avatar-150-cover {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

/* International department pages */
.intdep-team-member {
  text-align: center;
  margin-bottom: 20px;
}

/* Student clubs */
.club-img-frame {
  height: 200px;
}

/* RCU page */
.rcu-card-img {
  height: 190px;
}

/* About page */
.about-logo-badge {
  background-color: #00668e !important;
  font-family: algeti;
}

/* Freshman page */
.freshman-exchange-list {
  max-height: 400px;
  overflow-y: auto;
}

/* FDEV page */
.fdev-links-row {
  min-height: 300px;
}

.qa-pdca-icon {
  width: 104px;
  height: 104px;
  background: #f2f7fb;
}

.qa-icon-cover {
  object-fit: cover;
}

.qa-badge-60 {
  width: 60px;
  height: 60px;
}

.qa-badge-48 {
  width: 48px;
  height: 48px;
}

/* Alumni page */
.alumni-top-spacer {
  margin-top: 100px;
}

.alumni-heading {
  color: var(--brand-ink);
  font-weight: 800;
}

.alumni-contact-name {
  font-weight: 800;
  color: #15364a;
}

/* MEDIC 2025 */
.medic2025-gallery-img {
  object-fit: cover;
  min-height: 250px;
  transition: transform 0.3s ease;
}

.medic2025-gallery-img:hover {
  transform: scale(1.05);
}

/* MEDIC legacy links */
.medic-link-em {
  font-family: exocular;
}

/* Mobility pages */
.mobility-services-spacer {
  margin-bottom: 200px;
}

.mobility-img-center {
  text-align: center;
}

.mobility-history-card {
  border: 1px solid gray;
  border-radius: 10px;
}

/* Legacy news view (newsviewlang / slviewlang) */
.newsview-side {
  background-color: #00668e;
}

.newsview-side-title {
  padding-left: 20px;
  color: #fff;
}

.newsview-side-date {
  padding-left: 20px;
  color: #fff;
  font-family: calibrii;
}

.newsview-side-img {
  width: 100%;
  height: auto;
}

.newsview-body {
  font-family: calibrii;
  font-size: large;
}

/* News view (newsview_test) */
.newsview-hero {
  height: 400px;
}

.newsview-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
}

.newsview-text {
  text-align: justify;
}

/* Shared brand back link */
.brand-back-link {
  color: #00668e;
  font-family: exocular;
  cursor: pointer;
}

.search-input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid #ccc;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: #00668e;
  box-shadow: 0 0 0 3px rgba(0, 102, 142, 0.15);
}

.search-btn {
  background-color: #00668e;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 142, 0.25);
}

.search-btn:hover {
  background-color: #004f6b;
  transform: translateY(-1px);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.news-card {
  background: #00668e;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.news-card .image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #00668e;
  overflow: hidden;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card .title-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  font-family: exocular, sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-date {
  display: inline-block;
  background-color: #f1f7fa;
  color: #00668e;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: nino, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 102, 142, 0.1);
  align-self: flex-start;
  margin-top: auto;
}

.news-card-body {
  padding: 16px;
  background-color: white;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: exocular, sans-serif;
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-link {
  padding: 8px 14px;
  background-color: #f2f2f2;
  color: #00668e;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.page-link:hover {
  background-color: #ddd;
}

.page-link.active {
  background-color: #00668e;
  color: white;
}


/* Medic 2025 Page */
.medic-content {
  font-size: 1.25rem; /* Equivalent to 'large' */
  line-height: 1.6;
}

@media (max-width: 768px) {
  .medic-content {
    font-size: 1rem; /* Normal size for mobile */
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .medic-content h2 {
    font-size: 1.5rem;
  }
  
  .medic-content p {
    margin-bottom: 1rem;
  }
  
  .medic-content ul {
    padding-left: 20px;
  }
}

/* =========================================
   Modern Design Updates (Mobile & PC)
   ========================================= */

/* 1. Modern Icon Boxes (Cards) */
.icon-box {
  background: #fff;
  padding: 30px 20px;
  border-radius: 16px; /* Modern rounded corners */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(0, 0, 0, 0.03);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.icon-box:hover {
  transform: translateY(-5px); /* Lift effect */
  box-shadow: 0 15px 30px rgba(0, 102, 142, 0.1); /* Colored shadow on hover */
  border-color: rgba(0, 102, 142, 0.1);
}

.icon-box .icon {
  margin-bottom: 15px;
  display: inline-block;
  background: rgba(0, 102, 142, 0.05);
  padding: 15px;
  border-radius: 50%; /* Circular icon background */
  color: #00668e;
  transition: all 0.3s ease;
}

.icon-box:hover .icon {
  background: #00668e;
  color: #fff;
}

.icon-box h4, .icon-box h3.title {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 1.25rem;
  color: #2c3e50;
}

.icon-box p {
  color: #555;
  line-height: 1.6; /* Better readability */
  margin-bottom: 20px;
}

/* 2. Modern Buttons & Links */
.custom-readmore {
  display: inline-block;
  padding: 10px 25px;
  background-color: transparent;
  color: #00668e;
  border: 2px solid #00668e;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.custom-readmore:hover {
  background-color: #00668e;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 102, 142, 0.3);
  transform: translateY(-2px);
}

/* 3. Section Spacing & Typography */
section {
  padding: 60px 0; /* More breathing room */
}

h1, h2, h3 {
  color: #2c3e50;
}

p {
  color: #444;
}

/* 4. Mobile Optimizations */
@media (max-width: 768px) {
  section {
    padding: 40px 0;
  }

  .icon-box {
    margin-bottom: 20px;
    padding: 25px 15px;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }
  
  /* Ensure full width on mobile for better touch targets */
  .custom-readmore {
    width: 100%; 
    text-align: center;
    padding: 12px 20px;
  }
}

/* Navbar Apply Button */
.navbar .apply-btn {
  background-color: #2c4964;
  color: white;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.navbar .apply-btn:hover {
  background-color: #1a2a3d;
  color: white;
}

/* Modern Academic Modal */
.academic-modal-content {
 border: none;
 border-radius: 16px;
 box-shadow: 0 10px 40px rgba(0,0,0,0.1);
 overflow: hidden;
}

.academic-modal-content .modal-header {
 border-bottom: none;
 padding: 20px 24px 0;
}

.academic-modal-content .modal-body {
 padding: 24px;
}

.academic-img-wrapper {
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 8px 20px rgba(0,0,0,0.08);
 margin-bottom: 20px;
}

.academic-img-wrapper img {
 width: 100%;
 height: auto;
 display: block;
 transition: transform 0.3s ease;
}

.academic-img-wrapper:hover img {
 transform: scale(1.03);
}

/* Navbar Level 3 Fix - Always Open Right on Desktop */
@media (min-width: 992px) {
  .navbar .dropdown .dropdown > ul {
    top: 0;
    left: 100% !important; /* Force right opening */
    right: auto !important;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    display: block;
    transition: all 0.2s ease-in-out;
  }

  .navbar .dropdown .dropdown:hover > ul {
    opacity: 1;
    top: 0;
    left: 100% !important; /* Force right opening */
    right: auto !important;
    visibility: visible;
  }
  
  .navbar .dropdown .dropdown ul li {
    min-width: 200px;
  }
}

.academic-name {
 color: #00668e;
 font-size: 1.5rem;
 line-height: 1.3;
}

.academic-role {
 color: #6c757d;
 font-size: 0.95rem;
 font-weight: 500;
}

.academic-bio {
 color: #444;
 line-height: 1.7;
 font-size: 0.95rem;
 max-height: 60vh;
 overflow-y: auto;
 padding-right: 10px;
}

/* Custom Scrollbar for bio */
.academic-bio::-webkit-scrollbar {
 width: 6px;
}
.academic-bio::-webkit-scrollbar-track {
 background: #f1f1f1;
}
.academic-bio::-webkit-scrollbar-thumb {
 background: #ccc;
 border-radius: 3px;
}
.academic-bio::-webkit-scrollbar-thumb:hover {
 background: #aaa;
}

/* Layout: active language button (replaces inline styles) */
.language .btn.lang-active {
  background-color: #2c4964;
  color: white;
}

/* Layout helpers (replaces inline styles) */
.honeypot-hidden {
  display: none;
}

.cookie-manage-btn {
  margin-left: 8px;
  color: inherit;
  font-size: inherit;
  vertical-align: baseline;
}

/* Cookie consent UI (moved from layouts/default2.php inline styles) */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 24px rgba(0,0,0,.08); }
.cookie-banner .content { max-width: 1140px; margin: 0 auto; padding: 16px; display: flex; gap: 16px; align-items: start; }
.cookie-banner .text { flex: 1; font-size: 14px; color: #2c3e50; }
.cookie-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1090; }
.cookie-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, 92vw); background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.2); z-index: 1100; }
.cookie-modal header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.cookie-modal .body { padding: 16px 20px; }
.cookie-modal .footer { padding: 12px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 8px; }
.cookie-switch { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.cookie-switch small { color: #6b7280; display: block; }

/* Legacy cookie overlay (moved from layouts/default2.php inline styles) */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-popup {
  max-width: 600px;
  background-color: #fff;
  border-radius: 8px;
}

body.cookie-blur {
  overflow: hidden;
}

/* Apply button (moved from layouts/default2.php inline styles) */
.apply-btn {
  background-color: #2c4964;
  color: white;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  text-decoration: none;
}

.apply-btn:hover {
  background-color: #1a2a3d;
  color: white;
}

/* All news table view (replaces inline font-size) */
.allnews-test-container {
  font-size: large;
}

/* Mobile Topbar Visibility Fix */
@media (max-width: 991px) {
  #topbar {
    display: flex !important;
    height: 40px !important;
    background: #fff !important;
    z-index: 9999 !important; /* Ensure it's on top */
  }
  
  #topbar .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  #topbar .social-links {
    display: flex !important;
    align-items: center !important;
  }

  #topbar .social-links a {
    display: inline-block !important;
    padding-left: 8px !important; /* Reduced padding for mobile */
    font-size: 16px !important;
    color: #437099 !important;
    line-height: 1 !important;
  }
  
  /* Ensure language switcher is also visible */
  #topbar .language {
    display: flex !important;
    align-items: center !important;
  }
}

/* Modern Academic Modal */
.academic-modal-content {
 border: none;
 border-radius: 16px;
 box-shadow: 0 10px 40px rgba(0,0,0,0.1);
 overflow: hidden;
}

.academic-modal-content .modal-header {
 border-bottom: none;
 padding: 20px 24px 0;
}

.academic-modal-content .modal-body {
 padding: 24px;
}

.academic-img-wrapper {
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 8px 20px rgba(0,0,0,0.08);
 margin-bottom: 20px;
}

.academic-img-wrapper img {
 width: 100%;
 height: auto;
 display: block;
 transition: transform 0.3s ease;
}

.academic-img-wrapper:hover img {
 transform: scale(1.03);
}

.academic-name {
 color: #00668e;
 font-size: 1.5rem;
 line-height: 1.3;
}

.academic-role {
 color: #6c757d;
 font-size: 0.95rem;
 font-weight: 500;
}

.academic-bio {
 color: #444;
 line-height: 1.7;
 font-size: 0.95rem;
 max-height: 60vh;
 overflow-y: auto;
 padding-right: 10px;
}

/* Custom Scrollbar for bio */
.academic-bio::-webkit-scrollbar {
 width: 6px;
}
.academic-bio::-webkit-scrollbar-track {
 background: #f1f1f1;
}
.academic-bio::-webkit-scrollbar-thumb {
 background: #ccc;
 border-radius: 3px;
}
.academic-bio::-webkit-scrollbar-thumb:hover {
 background: #aaa;
}

/* Modern Academic Modal */
.academic-modal-content {
 border: none;
 border-radius: 16px;
 box-shadow: 0 10px 40px rgba(0,0,0,0.1);
 overflow: hidden;
}

.academic-modal-content .modal-header {
 border-bottom: none;
 padding: 20px 24px 0;
}

.academic-modal-content .modal-body {
 padding: 24px;
}

.academic-img-wrapper {
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 8px 20px rgba(0,0,0,0.08);
 margin-bottom: 20px;
}

.academic-img-wrapper img {
 width: 100%;
 height: auto;
 display: block;
 transition: transform 0.3s ease;
}

.academic-img-wrapper:hover img {
 transform: scale(1.03);
}

.academic-name {
 color: #00668e;
 font-size: 1.5rem;
 line-height: 1.3;
}

.academic-role {
 color: #6c757d;
 font-size: 0.95rem;
 font-weight: 500;
}

.academic-bio {
 color: #444;
 line-height: 1.7;
 font-size: 0.95rem;
 max-height: 60vh;
 overflow-y: auto;
 padding-right: 10px;
}

/* Custom Scrollbar for bio */
.academic-bio::-webkit-scrollbar {
 width: 6px;
}
.academic-bio::-webkit-scrollbar-track {
 background: #f1f1f1;
}
.academic-bio::-webkit-scrollbar-thumb {
 background: #ccc;
 border-radius: 3px;
}
.academic-bio::-webkit-scrollbar-thumb:hover {
 background: #aaa;
}

/* Alumni Page Styles */
:root {
  --brand: #00668e;
  --brand-ink: #0b2a3a;
  --muted: #6b7f8a;
  --surface: #f6fbfd;
  --card: #ffffff;
  --ring: rgba(0, 102, 142, .15);
}
#alumni .page { background: linear-gradient(180deg, #fff 0%, #f9fcfe 100%); border-radius: 20px; padding: 24px; box-shadow: 0 8px 30px rgba(0, 0, 0, .06); }
#alumni .section-title h1 { font-weight: 800; color: var(--brand-ink); letter-spacing: -.02em; margin: 0; }
#alumni .lead { color: #274555; font-size: 1.05rem; }
#alumni .divider { height: 1px; background: linear-gradient(90deg, transparent, var(--ring), transparent); margin: 18px 0 8px; }
#alumni .btn-brand { background: var(--brand); border: none; color: #fff; font-weight: 700; border-radius: 12px; padding: 8px 14px; }
#alumni .btn-brand:hover { filter: brightness(1.05); }
#alumni .btn-ghost { border: 1px solid var(--ring); color: var(--brand-ink); background: #fff; border-radius: 12px; padding: 8px 12px; }
#alumni .card { border: 1px solid var(--ring); border-radius: 16px; overflow: hidden; background: var(--card); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
#alumni .card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); border-color: rgba(0, 102, 142, .25); }
#alumni .card .card-body { padding: 14px; }
#alumni .card-title { font-size: 1.05rem; font-weight: 700; color: #133a4f; }
#alumni .meta { color: var(--muted); font-size: .9rem; }
#alumni .event-img { max-height: 180px; object-fit: cover; width: 100%; }
#alumni .event-card { min-height: 410px; position: relative; }
#alumni .event-card .readmore { position: absolute; left: 14px; bottom: 14px; }
#alumni .row.gy-3 > [class*='col-'] { margin-top: .75rem; }
#alumni .role { font-size: .95rem; color: var(--brand-ink); opacity: .9; line-height: 1.35; }
#alumni .contact-mail a { color: var(--brand); font-weight: 600; word-break: break-word; }
#alumni .avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-top: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
#alumni .badge-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #e8f5fa; border: 1px solid var(--ring); color: #11435a; font-weight: 700; text-decoration: none; }
#alumni .hr-slim { margin: 6px 0 2px; height: 1px; background: var(--ring); border: 0; }

/* Alumni Slider (Swiper) Implementation */
.alumni-slider {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 30px 50px; /* Increased side padding for arrows */
  position: relative;
  overflow: hidden;
  height: 100%;
}

.alumni-slider .swiper-slide {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto; /* Let content dictate height inside slide */
}

.alumni-slider img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
  margin: 0 auto 15px auto; /* Margin bottom to separate from text */
  border-radius: 8px;
  display: block;
}

.alumni-slider-caption {
  text-align: center;
  padding-top: 15px;
}
.alumni-slider-caption h5 {
  color: #00668e;
  font-weight: 700;
  margin-bottom: 5px;
}
.alumni-slider-caption i {
  color: #666;
  font-size: 0.9rem;
}
.alumni-slider-caption hr {
  margin: 10px auto;
  width: 50px;
  border-top: 2px solid #00668e;
  opacity: 1;
}
.alumni-slider-caption p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0;
}

.alumni-slider .swiper-button-prev,
.alumni-slider .swiper-button-next {
  width: 35px;
  height: 35px;
  background-color: rgba(0, 102, 142, 0.1);
  border-radius: 50%;
  color: #00668e;
}

.alumni-slider .swiper-button-prev:after,
.alumni-slider .swiper-button-next:after {
  font-size: 1rem;
  font-weight: bold;
}

.alumni-slider .swiper-button-prev:hover,
.alumni-slider .swiper-button-next:hover {
  background-color: #00668e;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,102,142,0.3);
}

@media (min-width: 576px) { .alumni-slider img { max-height: 280px; } }
@media (min-width: 768px) { .alumni-slider img { max-height: 350px; } }
@media (min-width: 992px) { .alumni-slider img { max-height: 350px; } }
@media (min-width: 1200px) { .alumni-slider img { max-height: 380px; } }

/* Country Doctor Gallery Styles - Deprecated block removed */

/* Swiper Navigation Consistency */
.swiper-button-prev,
.swiper-button-next {
  color: #00668e;
}

/* Specific styles for Country Doctor Gallery - Cinema Mode */
.country-gallery-swiper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  background: #f0f2f5;
  margin: 0 auto;
  aspect-ratio: 16/10; /* Fixed Aspect Ratio */
  max-width: 1000px;
}

.country-gallery-swiper .swiper-wrapper {
  height: 100%;
}

.country-gallery-swiper .swiper-slide {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000; /* Dark background for framing */
}

.country-gallery-slide-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.country-gallery-img { 
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensure full image is visible */
  transition: transform 0.6s ease;
}

/* Premium Navigation Arrows */
.country-gallery-swiper .swiper-button-prev,
.country-gallery-swiper .swiper-button-next {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  color: #00668e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.country-gallery-swiper .swiper-button-prev::after,
.country-gallery-swiper .swiper-button-next::after {
  font-size: 18px;
  font-weight: bold;
}

.country-gallery-swiper .swiper-button-prev:hover,
.country-gallery-swiper .swiper-button-next:hover {
  background: #fff;
  transform: scale(1.1);
  color: #004d6b;
}

.country-gallery-swiper .swiper-button-prev { left: 20px; }
.country-gallery-swiper .swiper-button-next { right: 20px; }

/* Refined Pagination */
.country-gallery-swiper .swiper-pagination-bullet {
  background: rgba(255,255,255,0.5);
  width: 8px;
  height: 8px;
  opacity: 1;
}
.country-gallery-swiper .swiper-pagination-bullet-active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .country-gallery-swiper {
    aspect-ratio: 4/3; /* Taller for mobile */
    border-radius: 12px;
  }
}
.country-gallery-swiper .swiper-slide:hover .country-gallery-img {
  transform: none; /* Disable zoom on container mode */
}

.country-gallery-swiper .swiper-button-prev,
.country-gallery-swiper .swiper-button-next {
  width: 35px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #00668e;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.country-gallery-swiper .swiper-button-prev:after,
.country-gallery-swiper .swiper-button-next:after {
  font-size: 1.2rem;
  font-weight: bold;
}
.country-gallery-swiper .swiper-button-prev:hover,
.country-gallery-swiper .swiper-button-next:hover {
  background-color: #00668e;
  color: #fff;
}

/* Alumni Section Styles */
#alumni .page {
  background: linear-gradient(180deg,#fff 0%,#f9fcfe 100%);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}
#alumni .section-title h1 {
  font-weight: 800;
  color: var(--brand-ink);
  letter-spacing: -.02em;
  margin: 0;
}
#alumni .lead {
  color: #274555;
  font-size: 1.05rem;
}
#alumni .divider {
  height: 1px;
  background: linear-gradient(90deg,transparent, var(--ring), transparent);
  margin: 18px 0 8px;
}
#alumni .btn-brand {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 8px 14px;
}
#alumni .btn-brand:hover {
  filter: brightness(1.05);
}
#alumni .btn-ghost {
  border: 1px solid var(--ring);
  color: var(--brand-ink);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
}
#alumni .card {
  border: 1px solid var(--ring);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#alumni .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
  border-color: rgba(0,102,142,.25);
}
#alumni .card .card-body {
  padding: 14px;
}
#alumni .card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #133a4f;
}
#alumni .meta {
  color: var(--muted);
  font-size: .9rem;
}
#alumni .event-img {
  max-height: 180px;
  object-fit: cover;
  width: 100%;
}
#alumni .event-card {
  min-height: 410px;
  position: relative;
}
#alumni .event-card .readmore {
  position: absolute;
  left: 14px;
  bottom: 14px;
}
#alumni .role {
  font-size: .95rem;
  color: var(--brand-ink);
  opacity: .9;
  line-height: 1.35;
}
#alumni .contact-mail a {
  color: var(--brand);
  font-weight: 600;
  word-break: break-word;
}
#alumni .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
#alumni .badge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8f5fa;
  border: 1px solid var(--ring);
  color: #11435a;
  font-weight: 700;
  text-decoration: none;
}
#alumni .hr-slim {
  margin: 6px 0 2px;
  height: 1px;
  background: var(--ring);
  border: 0;
}


.dashed-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed #ccc;
  border-radius: 12px;
  height: 100%;
  min-height: 380px;
}

/* Dean's Message Styles */
#deansmessage {
  --tma-primary: #00668e;
  --tma-accent: #e9f4f8;
  --tma-text: #1d2939;
  --tma-muted: #667085;
  margin-top: 100px;
}
#deansmessage .card-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid #eef2f6;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  overflow: hidden;
}
#deansmessage .profile {
  background: var(--tma-accent);
  padding: 28px;
}
#deansmessage .profile .avatar {
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border: 4px solid #fff;
}
#deansmessage .name {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 14px 0 6px;
  color: var(--tma-text);
}
#deansmessage .title-line {
  color: var(--tma-muted);
  margin: 2px 0;
  font-size: .95rem;
}
#deansmessage .badge-role {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe6ee;
  color: #0f3d4c;
  font-weight: 600;
  font-size: .85rem;
}
#deansmessage .content {
  padding: 28px;
}
#deansmessage h2.heading, #deansmessage h1.heading {
  font-size: clamp(1.4rem, 2vw + 1rem, 2rem);
  font-weight: 800;
  color: var(--tma-primary);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
#deansmessage .underline {
  width: 80px;
  height: 4px;
  background: var(--tma-primary);
  border-radius: 999px;
  opacity: .2;
  margin-bottom: 18px;
}
#deansmessage .lead {
  color: var(--tma-muted);
  font-size: .95rem;
  margin-bottom: 18px;
}
#deansmessage .message p {
  color: var(--tma-text);
  line-height: 1.75;
  margin: 0 0 14px;
  font-size: 1rem;
}

#deansmessage .message {
  text-align: justify;
}
#deansmessage .quote-mark {
  font-size: 2.25rem;
  color: var(--tma-primary);
  opacity: .25;
  line-height: 1;
  transform: translateY(4px);
  display: inline-block;
  margin-right: 6px;
}
@media (max-width: 575.98px) {
  #deansmessage .profile, #deansmessage .content { padding: 18px; }
  #deansmessage .name { font-size: 1.05rem; }
  #deansmessage .message p { font-size: .98rem; }
}


/* --- Institutional Culture / dsh.php --- */
.ic .person-card {
  border: 1px solid #e9ecef;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}
.ic .person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,.08), 0 10px 10px rgba(0,0,0,.06);
  border-color: #dfe6eb;
}
.ic .person-photo-wrap { padding-top: 1.25rem; }
.ic .person-photo {
  width: 128px; height: 128px; object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.ic .role {
  color: #555;
  font-weight: 600;
  line-height: 1.4;
}
.ic .card-body { display:flex; flex-direction:column; }
.ic .card-footer {
  background: transparent; border-top: 0;
  margin-top: auto; padding: .5rem 1rem 1rem;
  text-align: right;
}
.ic .email-chip {
  display:inline-flex; align-items:center; gap:.25rem;
  text-decoration:none;
  font-size: .85rem;
  color:#00668e;
}
.ic .email-chip:hover { text-decoration: underline; }
.ic .email-chip i { font-size:.9rem; }
@media (max-width: 575.98px) {
  .ic .person-photo { width:112px; height:112px; }
}

/* --- E-Newspaper --- */
/* Grid with larger spacing between cards */
.e-grid {
    --gap: 1.25rem; /* extra space between cards */
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(12, 1fr);
}
/* Responsive columns: 2-up mobile, 3-up from 576px and keep 3-up on lg+ */
.e-col { grid-column: span 6; }                         /* 2-up on mobile */
@media (min-width: 576px) { .e-col { grid-column: span 4; } }  /* 3-up */
@media (min-width: 992px) { .e-col { grid-column: span 4; } }  /* 3-up on lg+ */

.e-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 8px 16px rgba(0,0,0,.22);
    transform: translateZ(0);
    transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
    outline: none;
}
.e-card::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--cover) center/cover no-repeat;
    transform: scale(1);
    transition: transform .4s ease;
    will-change: transform;
}
.e-card:hover,
.e-card:focus-visible {
    transform: translateY(-3px);
    box-shadow:
        0 14px 28px rgba(0,0,0,.26),
        0 0 28px rgba(0,102,142,.28);
    filter: saturate(1.05);
}
.e-card:hover::before,
.e-card:focus-visible::before {
    transform: scale(1.05);
}

/* Title header: translucent black background ONLY behind the title */
.e-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: .6rem .8rem;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    backdrop-filter: blur(2px);
}

/* Accessible focus ring */
.e-card:focus-visible {
    box-shadow:
        0 14px 28px rgba(0,0,0,.26),
        0 0 0 3px rgba(255,255,255,.85),
        0 0 0 6px rgba(0,102,142,.35);
}
/* Basic copy deterrent (bypassable): disable selection and right-click in this section */
#lab.about {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Modern Academic Modal */
.academic-modal-content {
 border: none;
 border-radius: 16px;
 box-shadow: 0 10px 40px rgba(0,0,0,0.1);
 overflow: hidden;
}

.academic-modal-content .modal-header {
 border-bottom: none;
 padding: 20px 24px 0;
}

.academic-modal-content .modal-body {
 padding: 24px;
}

.academic-img-wrapper {
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 8px 20px rgba(0,0,0,0.08);
 margin-bottom: 20px;
}

.academic-img-wrapper img {
 width: 100%;
 height: auto;
 display: block;
 transition: transform 0.3s ease;
}

.academic-img-wrapper:hover img {
 transform: scale(1.03);
}

.academic-name {
 color: #00668e;
 font-size: 1.5rem;
 line-height: 1.3;
}

.academic-role {
 color: #6c757d;
 font-size: 0.95rem;
 font-weight: 500;
}

.academic-bio {
 color: #444;
 line-height: 1.7;
 font-size: 0.95rem;
 max-height: 60vh;
 overflow-y: auto;
 padding-right: 10px;
}

/* Custom Scrollbar for bio */
.academic-bio::-webkit-scrollbar {
 width: 6px;
}
.academic-bio::-webkit-scrollbar-track {
 background: #f1f1f1;
}
.academic-bio::-webkit-scrollbar-thumb {
 background: #ccc;
 border-radius: 3px;
}
.academic-bio::-webkit-scrollbar-thumb:hover {
 background: #aaa;
}


/* PHS Module Styles */
.heart {
    animation: beat 1s infinite alternate;
    transform-origin: center;
}

.phs-dean-card {
  max-width: 540px;
}

.phs-partner-logo {
  max-height: 80px;
}
@keyframes beat{
    to { transform: scale(1.025); }
}

.btn-phs {
    width: 100%;
    height: 300px;
    border: none;
    background-size: cover;
    background-position: center;
    color: white;
    font-size: 60px;
    cursor: pointer;
    font-family: inherit; /* Fallback from exocular */
    border-radius: 10px;
    transition: font-size 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-phs:hover {
    font-size: 80px;
}


/* Additional Utilities for PHS Module */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.video-card-hover img {
    transition: opacity 0.3s ease;
}
.video-card-hover:hover img {
    opacity: 0.9;
}
.video-card-hover .btn-primary {
    transition: transform 0.3s ease;
}
.video-card-hover:hover .btn-primary {
    transform: translate(-50%, -50%) scale(1.1);
}

.partner-card img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.partner-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}


/* Branding: Override default blue-tinted backgrounds #f1f7fd to neutral light grey */
.section-bg, 
.breadcrumbs, 
.counts, 
#footer {
  background-color: #fafafa !important;
}

/* Modern Academic Modal */
.academic-modal-content {
 border: none;
 border-radius: 16px;
 box-shadow: 0 10px 40px rgba(0,0,0,0.1);
 overflow: hidden;
}

.academic-modal-content .modal-header {
 border-bottom: none;
 padding: 20px 24px 0;
}

.academic-modal-content .modal-body {
 padding: 24px;
}

.academic-img-wrapper {
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 8px 20px rgba(0,0,0,0.08);
 margin-bottom: 20px;
}

.academic-img-wrapper img {
 width: 100%;
 height: auto;
 display: block;
 transition: transform 0.3s ease;
}

.academic-img-wrapper:hover img {
 transform: scale(1.03);
}

.academic-name {
 color: #00668e;
 font-size: 1.5rem;
 line-height: 1.3;
}

.academic-role {
 color: #6c757d;
 font-size: 0.95rem;
 font-weight: 500;
}

.academic-bio {
 color: #444;
 line-height: 1.7;
 font-size: 0.95rem;
 max-height: 60vh;
 overflow-y: auto;
 padding-right: 10px;
}

/* Custom Scrollbar for bio */
.academic-bio::-webkit-scrollbar {
 width: 6px;
}
.academic-bio::-webkit-scrollbar-track {
 background: #f1f1f1;
}
.academic-bio::-webkit-scrollbar-thumb {
 background: #ccc;
 border-radius: 3px;
}
.academic-bio::-webkit-scrollbar-thumb:hover {
 background: #aaa;
}


/* Hero Slider */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-slider .swiper-slide {
  width: 100%;
  height: 100%;
}
.hero-slider .swiper-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}
#hero {
  background: none !important;
}

/* Mobile Slider Fix */
@media (max-width: 991.98px) {
  #hero {
    padding: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 50vh; /* Ensure reasonable height on mobile */
  }
  
  .hero-slider {
    height: 50vh;
    min-height: 300px;
  }
  
  .hero-slider .swiper-slide {
    height: 100%;
  }

  .hero-slider img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover; /* Fills height, cropping sides if needed */
    object-position: center;
  }
}

#hero .container-fluid {
  position: relative;
  z-index: 2;
}

/* Infrastructure Box */
.infra-box {
  padding: 30px;
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 29px 0 rgba(68, 88, 144, 0.12);
  transition: all 0.3s ease-in-out;
  border-radius: 8px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  color: #00668e !important;
}
.infra-box:hover {
  color: white !important;
  cursor: pointer;
}
.infra-box::before {
  content: '';
  position: absolute;
  background: #e1f0fa;
  right: -60px;
  top: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50px;
  transition: all 0.3s;
  z-index: -1;
}
.infra-box:hover::before {
  background: #00668e;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 0px;
}
.infra-box .icon {
  margin: 0 0 20px 0;
  padding-top: 13px;
  display: inline-block;
  text-align: center;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: #00668e;
  transition: all 0.3s ease-in-out;
}
.infra-box .icon i {
  font-size: 36px;
  line-height: 1;
  color: #fff !important;
}
.infra-box:hover .icon {
  background: #fff;
}
.infra-box:hover .icon i {
  color: #00668e !important;
}


/* Mobile News Items Fix */
@media (max-width: 768px) {
  .news-list {
    display: flex;
    flex-direction: column;
  }
  
  .news-item {
    height: 85px !important; /* STRICT fixed height for uniformity */
    min-height: 0 !important;
    display: flex;
    align-items: center; /* Vertically center content */
    padding: 0 15px; /* Horizontal padding only */
    box-sizing: border-box;
  }

  .news-item-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .news-title-short {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Strict 2 line limit */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    max-height: 2.7em; /* Fallback for clamp */
    margin: 0;
  }
  
  /* Badge styling adjustment for mobile */
  .news-date-badge {
    transform: scale(0.9);
    margin-right: 10px;
  }
}


/* Standardize Modal Image for Mobile */
@media (max-width: 768px) {
  #modal-news-img {
      width: 100%;
      height: auto;
      min-height: 200px;
      max-height: 300px;
      object-fit: contain; /* Ensures the whole image is seen without cropping */
      background-color: #f7f9fa; /* Light grey backdrop to fill extra space */
      display: block !important; /* Force display if previously hidden */
  }
}


/* Hide the desktop news preview on mobile to avoid duplications */
@media (max-width: 768px) {
  .news-display {
    display: none !important;
  }
}



/* Mission Section White Text Override */
.mission .content, .mission .content h3, .mission .content p {
    color: #ffffff !important;
}

/* Mobile resilience (prevent horizontal overflow) */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Embedded media can overflow if width is hard-coded in markup */
.main-offset iframe,
.home-main iframe {
  max-width: 100%;
  width: 100%;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Long URLs/emails should wrap on small screens */
.main-offset a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-contact-map {
  display: block;
  width: 100%;
  height: 290px;
  border: 0;
}

/* Tables in rich text often come without a wrapper */
@media (max-width: 768px) {
  .main-offset table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-offset pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  input[type="text"],
  input[type="text"]:focus {
    max-width: 100%;
    width: 100%;
  }

  #product_viewer {
    max-width: 92vw;
    margin: 24px auto;
  }
}

@media (max-width: 576px) {
  .home-contact-map {
    height: 240px;
  }

  .st_social-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .st_social-links a {
    width: 56px;
    height: 56px;
    margin: 0;
  }

  .st_social-links a .fab {
    font-size: 22px;
    line-height: 56px;
  }

  .cookie-banner .content {
    flex-direction: column;
    align-items: stretch;
  }
}

/* iOS safe-area for fixed cookie banner */
.cookie-banner {
  padding-bottom: env(safe-area-inset-bottom);
}

