:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --light-blue: rgba(101, 192, 248, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Topbar Styles */
#topbar {
  background-color: var(--primary-color);
  font-size: 0.9rem;
}

.top-contact li,
.social-media li {
  list-style: none;
}

.top-contact a,
.social-media a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: inline-block;
  transition: var(--transition);
}

.top-contact a:hover,
.social-media a:hover {
  opacity: 0.8;
}

.social-media a {
  font-size: 1.2rem;
}

/* Header Styles */
.school-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

.school-tagline {
  font-size: 1rem;
  color: var(--secondary-color);
}

/* Navbar Styles */
.navbar {
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-nav {
  width: 100%;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 1.2rem 1.5rem !important;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Active link indicator */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("img/bg.jpg");
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
}

.hero-card {
  background-color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin: 0 auto;
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background-color: var(--light-blue);
}

.card {
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  opacity: 0.8;
}

/* Section Styling */
.section-padding {
  padding: 6rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-divider {
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0 auto 1.5rem;
}

.section-subtitle {
  color: var(--secondary-color);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Profile Section */
.profile-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.profile-content {
  padding: 1rem;
}

.feature-item {
  padding: 1.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-item i {
  font-size: 2rem;
}

/* Teacher Section */
.teacher-card {
  transition: transform 0.3s ease;
}

.teacher-card:hover {
  transform: translateY(-5px);
}

.teacher-image {
  position: relative;
  overflow: hidden;
}

.teacher-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.teacher-social a {
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.teacher-social a:hover {
  color: var(--primary-color) !important;
}

/* Ekstrakurikuler Section */
.ekskul-card {
  transition: transform 0.3s ease;
}

.ekskul-card:hover {
  transform: translateY(-5px);
}

.ekskul-icon i {
  font-size: 2.5rem;
}

/* Activity Section */
.activity-card {
  transition: transform 0.3s ease;
}

.activity-card:hover {
  transform: translateY(-5px);
}

.activity-card img {
  min-height: 250px;
  object-fit: cover;
}

/* Add these styles to your existing CSS */
.modal-xl {
  max-width: 90%;
}

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.section-divider {
  width: 60px;
  height: 3px;
  background-color: #0d6efd;
  margin: 1rem auto;
}

.feature-card {
  transition: transform 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.icon-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e7f1ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.icon-box i {
  font-size: 2rem;
  color: #0d6efd;
}

.stats-box {
  padding: 2rem;
  text-align: center;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #0d6efd;
}

.facility-img {
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
}

.teacher-modal-card {
  transition: transform 0.3s ease;
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.teacher-modal-card:hover {
  transform: translateY(-5px);
}

.teacher-social a {
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.teacher-social a:hover {
  color: var(--bs-primary) !important;
}

#teacherSearch,
#teacherFilter {
  border-radius: 0.375rem;
}

.modal-header.bg-primary {
  border-bottom: none;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Responsive Adjustments */

/* Responsive Styles */
@media (max-width: 992px) {
  .navbar-nav {
    display: flex;
    justify-content: space-between;
    max-width: 1000px; /* Increased max-width */
    margin: 0 auto;
  }

  .school-name {
    font-size: 1.8rem;
  }

  .school-tagline {
    font-size: 0.9rem;
  }

  .hero-section {
    height: 70vh;
  }

  .section-padding {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .profile-content {
    padding: 1rem 0;
  }
}

@media (max-width: 768px) {
  .top-contact {
    flex-direction: column;
    align-items: center;
  }

  .social-media {
    justify-content: center !important;
    margin-top: 0.5rem;
  }

  .hero-section {
    height: 60vh;
  }

  .hero-card {
    margin: 0 1rem;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .activity-card .row {
    flex-direction: column;
  }

  .activity-card img {
    height: 200px;
  }

  .feature-item {
    padding: 1rem;
  }

  .facility-img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .school-name {
    font-size: 1.5rem;
  }

  .hero-section {
    height: 50vh;
  }

  section {
    padding: 3rem 0;
  }

  .section-padding {
    padding: 2rem 0;
  }

  .modal-content {
    margin: 0 auto;
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    max-height: 95vh;
  }

  /* Modal Header */
  .modal-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
  }

  .modal-header .btn-close {
    padding: 12px;
    margin: -12px -12px -12px auto;
  }

  .modal-title {
    font-size: 1.4rem;
    width: 100%;
    text-align: center;
  }

  /* Modal Body */
  .modal-body {
    padding: 20px 15px;
    overflow-y: auto;
  }

  /* Program Section in Modal */
  .modal-body .feature-card {
    margin-bottom: 20px;
  }

  .modal-body .feature-card .card-body {
    padding: 20px;
  }

  .modal-body .icon-box {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .modal-body .feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  /* Statistics Section in Modal */
  .modal-body .stats-box {
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
  }

  .modal-body .stats-number {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  /* Facilities Section in Modal */
  .modal-body .facility-img {
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 8px;
  }

  /* Teachers Section in Modal */
  .modal-body .teacher-modal-card {
    margin-bottom: 20px;
  }

  .modal-body .teacher-modal-card .card-body {
    padding: 20px;
  }

  .modal-body .rounded-circle {
    width: 140px;
    height: 140px;
    margin-bottom: 15px;
  }

  .modal-body .teacher-social {
    margin-top: 15px;
  }

  .modal-body .teacher-social a {
    font-size: 1.2rem;
    margin: 0 8px;
  }

  /* Search and Filter in Modal */
  .modal-body .input-group {
    margin-bottom: 15px;
  }

  .modal-body .form-select {
    margin-bottom: 20px;
    height: 45px;
  }

  .modal-body .form-control {
    height: 45px;
  }

  /* Grid System in Modal */
  .modal-body .row {
    margin: 0 -10px;
  }

  .modal-body [class*="col-"] {
    padding: 0 10px;
    margin-bottom: 20px;
  }

  /* Modal Footer */
  .modal-footer {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 5px 0;
    padding: 12px 24px;
    font-size: 1rem;
  }

  /* Modal Dialog Size */
  .modal-dialog {
    margin: 15px auto;
    max-width: 540px;
  }

  .modal-dialog-scrollable {
    height: calc(100% - 30px);
  }

  /* Text Adjustments */
  .modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  .modal-body h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  /* Button Styles */
  .modal-body .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .facility-img {
    width: 100%;
    height: auto;
  }
}

/* Mobile Responsive Styles */
@media screen and (max-width: 360px) {
  /* Topbar */
  #topbar {
    padding: 8px 0;
  }

  #topbar .top-contact {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  #topbar .top-contact li {
    margin: 5px 0;
    text-align: center;
  }

  #topbar .social-media {
    justify-content: center;
    margin-top: 10px;
  }

  /* Header */
  header .school-name {
    font-size: 1.5rem;
    text-align: center;
    margin: 10px 0;
  }

  header .school-tagline {
    font-size: 0.9rem;
    text-align: center;
  }

  header .search-form {
    width: 100%;
    margin: 10px auto;
    max-width: 300px;
  }

  .nav-item {
    margin: 5px 0;
  }

  /* Hero Section */
  .hero-section {
    padding: 40px 0;
  }

  .hero-card {
    width: 90%;
    margin: 0 auto;
  }

  .hero-card .card-title {
    font-size: 1.25rem;
  }

  /* Profile Section */
  .profile-content {
    text-align: inherit;
    padding: 20px 15px;
  }

  .feature-item {
    margin-bottom: 20px;
  }

  /* Teachers Section */
  .teacher-card {
    margin-bottom: 20px;
  }

  .teacher-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  /* Extracurricular Section */
  .ekskul-card {
    margin-bottom: 20px;
  }

  .ekskul-icon {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  /* Activities Section */
  .activity-card .row {
    flex-direction: column;
  }

  .activity-card .col-md-6 {
    width: 100%;
  }

  .activity-card img {
    height: 200px;
    object-fit: cover;
  }

  /* Footer */
  footer {
    text-align: center;
  }

  footer .social-links {
    justify-content: center;
    margin-top: 15px;
  }

  .modal-content {
    /* margin: 0; */
    /* padding: 10px; */
    border-radius: 8px;
    width: 100%;
    max-height: 90vh;
  }

  /* Modal Header */
  .modal-header {
    padding: 10px;
    flex-direction: column;
    text-align: center;
  }

  .modal-header .btn-close {
    position: absolute;
    right: 10px;
    top: 10px;
  }

  /* Modal Body */
  .modal-body {
    padding: 15px 10px;
    overflow-y: auto;
  }

  /* Program Section in Modal */
  .modal-body .feature-card {
    margin-bottom: 15px;
  }

  .modal-body .feature-card .card-body {
    padding: 15px;
  }

  .modal-body .icon-box {
    font-size: 24px;
    margin-bottom: 10px;
  }

  /* Statistics Section in Modal */
  .modal-body .stats-box {
    margin-bottom: 15px;
    text-align: center;
  }

  .modal-body .stats-number {
    font-size: 1.5rem;
  }

  /* Facilities Section in Modal */
  .modal-body .facility-img {
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
  }

  /* Teachers Section in Modal */
  .modal-body .teacher-modal-card {
    margin-bottom: 15px;
  }

  .modal-body .teacher-modal-card .card-body {
    padding: 15px;
  }

  .modal-body .rounded-circle {
    width: 120px;
    height: 120px;
  }

  /* Search and Filter in Modal */
  .modal-body .input-group {
    margin-bottom: 10px;
  }

  .modal-body .form-select {
    margin-bottom: 15px;
  }

  /* Modal Footer */
  .modal-footer {
    padding: 10px;
    justify-content: center;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 5px 0;
  }

  /* Modal Dialog Size */
  .modal-dialog {
    margin: 10px;
    max-width: 340px;
  }

  .modal-dialog-scrollable {
    height: calc(100% - 20px);
  }

  /* Grid Adjustments inside Modal */
  .modal-body .row {
    margin: 0 -5px;
  }

  .modal-body [class*="col-"] {
    padding: 0 5px;
  }

  /* Modal Adjustments */
  .modal-dialog {
    margin: 10px;
  }

  /* General Spacing */
  .section-padding {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  /* Stats Section */
  .stats-box {
    text-align: center;
    margin-bottom: 20px;
  }

  .stats-number {
    font-size: 1.75rem;
  }

  /* Facilities Section */
  .facility-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
  }

  /* Cards Layout */
  .card {
    margin: 0 auto 20px;
    max-width: 300px;
  }
}
