/* ============================================================
   Physiology e-Office — Custom Styles
   ============================================================ */

/* --- Base -------------------------------------------------- */
:root {
  --navy:        #1a3a6b;
  --navy-dark:   #122855;
  --navy-light:  #254d8f;
  --gold:        #c49a22;
  --gold-light:  #f0c040;
  --card-hover:  #e8f0fb;
  --text-muted2: #6c757d;
}

body {
  font-family: 'Sarabun', 'Tahoma', sans-serif;
  font-size: 0.95rem;
  background: #f5f7fa;
  color: #333;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* --- Top AI Bar -------------------------------------------- */
.topbar-ai {
  background: #f0f3f8;
  border-bottom: 1px solid #dde3ee;
  font-size: 0.8rem;
}
.topbar-ai-btn {
  font-size: 0.75rem;
  padding: 1px 8px;
  color: #555;
  border-color: #ccc;
}
.topbar-ai-btn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* --- Navbar ------------------------------------------------- */
.bg-navy { background-color: var(--navy) !important; }
.text-navy { color: var(--navy) !important; }

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,0.88);
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
  transition: color .2s;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--gold-light);
}
.dropdown-menu-custom {
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  border-radius: 0.4rem;
  min-width: 220px;
  padding: 0.4rem 0;
  font-size: 0.875rem;
}
.dropdown-menu-custom .dropdown-item {
  padding: 0.45rem 1rem;
  transition: background .15s;
}
.dropdown-menu-custom .dropdown-item:hover {
  background: #e8f0fb;
  color: var(--navy);
}

/* --- Carousel ---------------------------------------------- */
#mainCarousel {
  max-height: 380px;
  overflow: hidden;
}
.carousel-slide {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6%;
  position: relative;
  overflow: hidden;
}
.carousel-slide-content {
  max-width: 600px;
}
.carousel-slide h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,.4);
}
.carousel-slide h5 {
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 600;
}
.carousel-slide p {
  color: rgba(255,255,255,.9);
  font-size: 0.95rem;
  line-height: 1.7;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: drop-shadow(0 0 3px rgba(0,0,0,.5));
}

/* --- Section Titles ---------------------------------------- */
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding-left: 0.75rem;
  margin-bottom: 1.2rem;
}

/* --- Info/Service Cards ------------------------------------ */
.card-eoffice {
  border: 1px solid #dde3ee;
  border-radius: 0.5rem;
  transition: transform .2s, box-shadow .2s, background .2s;
  background: #fff;
  height: 100%;
}
.card-eoffice:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(26,58,107,.15);
  background: var(--card-hover);
}
.card-eoffice .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-light), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.7rem;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(26,58,107,.25);
}
.card-eoffice .card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.card-eoffice .card-text {
  font-size: 0.78rem;
  color: var(--text-muted2);
  line-height: 1.45;
}
.card-eoffice a {
  color: inherit;
}

/* --- System Cards ------------------------------------------ */
.card-system .card-icon {
  background: linear-gradient(135deg, #0d6e6e, #0a5252);
}

/* --- Link Table -------------------------------------------- */
.section-links {
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid #dde3ee;
  padding: 1.25rem 1.5rem;
}
.link-table {
  font-size: 0.855rem;
}
.link-table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 0.6rem 0.75rem;
}
.link-table tbody tr:hover {
  background: #e8f0fb;
}
.link-table td {
  vertical-align: middle;
  padding: 0.5rem 0.75rem;
  border-color: #e9ecef;
}
.link-table a {
  color: var(--navy);
  font-weight: 500;
}
.link-table a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* --- Link Actions ------------------------------------------ */
.btn-add-link {
  background: var(--navy);
  color: #fff;
  border: none;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
}
.btn-add-link:hover {
  background: var(--navy-dark);
  color: #fff;
}

/* --- Footer ------------------------------------------------- */
.footer-main {
  background: var(--navy-dark);
  color: rgba(255,255,255,.8);
}
.footer-brand {
  color: var(--gold-light);
  font-size: 1.05rem;
  font-weight: 700;
}
.footer-heading {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-text { color: rgba(255,255,255,.7); }
.footer-links { padding: 0; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-links a {
  color: rgba(255,255,255,.75);
  font-size: 0.87rem;
  transition: color .15s;
}
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.5);
  font-size: 0.8rem;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .carousel-slide { height: 260px; }
  .carousel-slide h2 { font-size: 1.3rem; }
  #mainCarousel { max-height: 280px; }
}

/* --- Contact Section --------------------------------------- */
.contact-section {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}
.contact-info-card {
  box-shadow: 0 4px 20px rgba(10,30,80,.15);
}
.contact-form-card input:focus,
.contact-form-card textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 .2rem rgba(10,30,80,.12);
}
