/* 
  Ubon Ratchathani Area 1 - Primary Educational Service Area Office
  Custom Stylesheet for Redesign
*/
:root {
  --primary-color: #d81b60; /* Deep Pink (Used for accents/badges) */
  --header-color: #1a237e; /* Deep Indigo for headers - Distinct from pink theme */
  --secondary-color: #fce4ec; /* Soft Pink */
  --accent-color: #ffffff; /* White */
  --text-dark: #333333; /* Dark Gray text */
  --text-light: #555555; /* Medium Gray text */
  --bg-light: #fff5f8;
  --bg-white: #ffffff;
  --transition-speed: 0.3s;
  --lotus-pink: #ff80ab;
}

body {
  font-family: 'Anuphan', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  background-image: url("https://www.transparenttextures.com/patterns/cubes.png"); /* Subtle pattern */
  overflow-x: hidden;
}
...
/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--header-color);
}

/* Lotus Decoration */
.lotus-bg {
  position: absolute;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.lotus-right {
  right: -50px;
  bottom: 0;
  width: 300px;
}

.lotus-left {
  left: -50px;
  top: 100px;
  width: 250px;
  transform: rotate(180deg);
}

/* Header & Top Bar */
.top-header {
  background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
  padding: 20px 0;
  border-bottom: 2px solid rgba(216, 27, 96, 0.1);
}

.gov-logo {
  max-height: 80px;
  width: auto;
  animation: logoFloat 4s ease-in-out infinite;
  transition: all 0.5s ease;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.gov-logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 10px 20px rgba(216, 27, 96, 0.2)) brightness(1.1);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.site-title-container {
  padding-left: 15px;
}

.site-title-th {
  font-size: 1.5rem;
  color: var(--header-color);
  margin-bottom: 0;
}

.site-title-en {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 400;
}

/* Contact Pills in Header */
.contact-pills-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.contact-pill {
  display: flex;
  align-items: center;
  background: rgba(216, 27, 96, 0.05);
  padding: 6px 15px;
  border-radius: 50px;
  border: 1px solid rgba(216, 27, 96, 0.1);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-pill:hover {
  background: var(--primary-color);
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(216, 27, 96, 0.2);
}

.contact-pill .icon-circle {
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.contact-pill:hover .icon-circle {
  background: white;
  color: var(--primary-color);
}

.contact-pill .pill-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.contact-pill:hover .pill-text {
  color: white;
}

/* Navigation */
.navbar {
  background-color: var(--primary-color) !important;
  padding: 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
  color: var(--accent-color) !important;
  font-weight: 500;
  padding: 15px 20px !important;
  transition: all var(--transition-speed);
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--secondary-color) !important;
  border-bottom: 3px solid var(--accent-color);
}

.dropdown-menu {
  border: none;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-top: 3px solid var(--primary-color);
}

/* Sticky Navbar */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Hero Section */
#heroCarousel .carousel-item {
  height: 500px;
}

#heroCarousel img {
  object-fit: cover;
  height: 100%;
}

.carousel-caption {
  background: rgba(0, 51, 102, 0.75);
  padding: 30px;
  border-radius: 10px;
  bottom: 100px;
  text-align: left;
  border-left: 5px solid var(--secondary-color);
}

/* Quick Access */
.quick-access {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.quick-card {
  background: var(--bg-white);
  border: none;
  border-radius: 15px;
  padding: 25px 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  text-decoration: none;
  display: block;
  height: 100%;
}

.quick-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.quick-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.quick-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--header-color);
}

/* Diverse Quick Cards */
.quick-card.card-1 { background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%); }
.quick-card.card-2 { background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); }
.quick-card.card-3 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.quick-card.card-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.quick-card.card-5 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.quick-card.card-6 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.quick-card.card-1 .quick-icon, .quick-card.card-1 .quick-title,
.quick-card.card-2 .quick-icon, .quick-card.card-2 .quick-title,
.quick-card.card-3 .quick-icon, .quick-card.card-3 .quick-title,
.quick-card.card-5 .quick-icon, .quick-card.card-5 .quick-title,
.quick-card.card-6 .quick-icon, .quick-card.card-6 .quick-title {
  color: #ffffff !important;
}

/* Card 4 uses dark text for better contrast with yellow/orange gradient */
.quick-card.card-4 .quick-icon, .quick-card.card-4 .quick-title {
  color: #333333 !important;
}

/* Section Common */
.section-padding {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 50px;
  text-align: center;
}

.section-title-line {
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 15px auto;
}

/* News Cards */
.news-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all var(--transition-speed);
  margin-bottom: 30px;
  height: 100%;
}

.news-card:hover {
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.news-img-wrapper {
  height: 200px;
  overflow: hidden;
}

.news-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-card:hover .news-img-wrapper img {
  transform: scale(1.1);
}

.news-body {
  padding: 20px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Announcements List */
.announcement-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px dashed #ddd;
  transition: background 0.2s;
}

.announcement-item:hover {
  background: rgba(0, 51, 102, 0.02);
}

.announcement-date {
  min-width: 100px;
  text-align: center;
}

.date-day {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--header-color);
  line-height: 1;
}

.date-month {
  font-size: 0.8rem;
  color: var(--text-light);
}

.announcement-content {
  padding-left: 20px;
}

.announcement-title {
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
}

.announcement-title:hover {
  color: var(--primary-color);
}

/* Director Section */
.director-section {
  background-color: var(--bg-light);
}

.director-img {
  border: 8px solid var(--accent-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 10px;
}

.quote-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  opacity: 0.5;
}

/* ITA Section */
.ita-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ad1457 100%);
  color: white;
  padding: 60px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.ita-logo-bg {
  position: absolute;
  right: -50px;
  top: -50px;
  font-size: 15rem;
  opacity: 0.1;
  transform: rotate(-15deg);
}

/* Modern List Items */
.modern-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.modern-list-item {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-list-item:hover {
  border-color: var(--primary-color);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.modern-list-item a {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
}

.modern-list-item .icon-box {
  min-width: 45px;
  height: 45px;
  background: var(--bg-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.modern-list-item:hover .icon-box {
  background: var(--primary-color);
  color: #ffffff;
}

.modern-list-item .title-text {
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
}

.modern-list-item .new-badge {
  background: #ff4081;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Department Group News */
.department-group-news {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
}

.department-group-news li {
  border-bottom: 1px solid #eee;
}

.department-group-news li:last-child {
  border-bottom: none;
}

.department-group-news li a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.department-group-news li a i {
  margin-right: 10px;
  color: var(--primary-color);
  font-size: 0.8rem;
}

.department-group-news li a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
  padding-left: 25px;
}

/* Footer Colors Adjustment (optional but ensures harmony) */
footer {
  background-color: #0d1b2a; /* Updated to match new header color for better consistency */
  color: #fce4ec;
  padding: 80px 0 20px;
}

.footer-title {
  color: var(--accent-color);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--lotus-pink);
}

.footer-link {
  color: #fce4ec;
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.footer-link:hover {
  color: var(--lotus-pink);
  padding-left: 5px;
}

.social-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  margin-right: 10px;
  transition: all 0.3s;
}

.social-btn:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

.transition-hover {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.transition-hover:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Custom Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.pulse-hover:hover i {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.section-header .section-title-line {
  transition: width 0.8s ease-in-out;
}

.animate__animated.animate__fadeInUp .section-title-line {
  width: 120px;
}

/* 8 Column Grid for Desktop */
@media (min-width: 1200px) {
  .row-cols-lg-8 > * {
    flex: 0 0 auto;
    width: 12.5%;
  }
}

/* E-Service Premium Styling */
.eservice-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(216, 27, 96, 0.1);
  border-radius: 20px;
  padding: 20px 10px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

.eservice-item:hover {
  transform: translateY(-10px) scale(1.05);
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 15px 30px rgba(216, 27, 96, 0.15);
}

.eservice-icon-wrapper {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.eservice-item:hover .eservice-icon-wrapper {
  transform: rotate(5deg);
}

.eservice-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--header-color);
  margin-top: 10px;
  line-height: 1.3;
}

/* Scroll to top */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

#scrollTop:hover {
  background: var(--primary-color);
  color: white;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .top-header { text-align: center; }
  .site-title-container { padding-left: 0; margin-top: 15px; }
  .carousel-caption { bottom: 50px; padding: 15px; }
  #heroCarousel .carousel-item { height: 400px; }
}

@media (max-width: 767px) {
  .quick-access { margin-top: 20px; }
  .section-padding { padding: 50px 0; }
  .ita-banner { padding: 30px; }
}
