/* ============================================
   MASIA Institute
   Color Theme: Red & White
   Version: 6.0 - FIXED
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
  --masia-red: #dc3545;
  --masia-red-dark: #b02a37;
  --masia-red-light: #fff5f5;
  --masia-red-soft: #fde8e8;
  --dark-bg: #1a1a2e;
  --gray-light: #f8f9fc;
  --gray-border: #e9ecef;
  --text-dark: #1a1a2e;
  --text-muted: #6c757d;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
  padding-top: 130px;
  width: 100%;
  max-width: 100%;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
}

/* Discount Ribbon */
.discount-ribbon {
  position: absolute;
  top: 30%;
  left: -60px;
  right: -60px;
  background: linear-gradient(45deg, transparent, yellow, transparent);
  color: var(--masia-red);
  font-size: 1.5rem;
  font-weight: bold;
  padding: 12px 70px;
  transform: rotate(-7deg);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Utility Classes */
.bg-red {
  background-color: var(--masia-red) !important;
  color: white;
}

.text-red {
  color: var(--masia-red) !important;
}

.bg-red-soft {
  background-color: var(--masia-red-soft);
}

.bg-light {
  background-color: var(--gray-light) !important;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--masia-red);
  border-radius: 4px;
}

.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--text-muted, #6c757d);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-red {
  background-color: var(--masia-red);
  border: none;
  color: white;
  padding: 12px 32px;
  font-weight: 600;
  border-radius: 40px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.25);
  display: inline-block;
}

.btn-red:hover {
  background-color: var(--masia-red-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(220, 53, 69, 0.35);
  color: white;
}

.btn-outline-red {
  border: 2px solid var(--masia-red);
  background: transparent;
  color: var(--masia-red);
  font-weight: 600;
  border-radius: 40px;
  padding: 10px 28px;
  transition: all 0.3s;
  display: inline-block;
}

.btn-outline-red:hover {
  background: var(--masia-red);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid white;
  background: transparent;
  color: white;
  font-weight: 600;
  border-radius: 40px;
  padding: 12px 32px;
  transition: all 0.3s;
  display: inline-block;
}

.btn-outline-light:hover {
  background: white;
  color: var(--masia-red);
  transform: translateY(-2px);
}

/* ============================================
   NAVBAR - ENHANCED VERSION
   ============================================ */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 18px 0;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  top: 40px;
  border-bottom: 1px solid rgba(220, 53, 69, 0.1);
  width: 100%;
  left: 0;
  right: 0;
}

/* Navbar Brand / Logo */
.navbar-brand {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.navbar-brand img {
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.navbar-brand span {
  color: var(--masia-red);
  position: relative;
}

/* Navbar Links */
.nav-link {
  font-weight: 500;
  color: #333 !important;
  margin: 0 12px;
  transition: 0.3s;
  position: relative;
  padding: 8px 0 !important;
}

/* Underline effect on hover */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--masia-red);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--masia-red) !important;
}

/* Enroll Button */
.btn-enroll {
  background: linear-gradient(135deg, var(--masia-red), var(--masia-red-dark));
  color: white;
  border-radius: 50px;
  padding: 8px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: 0.3s;
  border: none;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  letter-spacing: 0.5px;
}

.btn-enroll:hover {
  background: linear-gradient(135deg, var(--masia-red-dark), #8b1a1a);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
  color: white;
}

/* Social Icons in Navbar */
.nav-social-icons {
  display: flex;
  gap: 8px;
  margin-left: 15px;
  padding-left: 15px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-social-icons a {
  color: #666;
  font-size: 1rem;
  transition: 0.3s;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.03);
}

.nav-social-icons a:hover {
  color: var(--masia-red);
  background: rgba(220, 53, 69, 0.1);
  transform: translateY(-2px);
}

/* Scrolled Navbar Effect */
.navbar.scrolled {
  background: white;
  backdrop-filter: blur(0);
  padding: 10px 0;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  border-bottom: none;
}

.navbar.scrolled .navbar-brand {
  font-size: 1.4rem;
}

.navbar.scrolled .navbar-brand img {
  width: 55px;
}

.navbar.scrolled .btn-enroll {
  padding: 6px 20px;
  font-size: 0.8rem;
}

.navbar.scrolled .nav-link {
  font-size: 0.9rem;
}

.navbar.scrolled .nav-link::after {
  height: 2px;
}

/* Mobile Toggle Button */
.navbar-toggler {
  border: none;
  padding: 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(220, 53, 69, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   HERO SLIDER SECTION
   ============================================ */
.hero-slider-section {
  margin-top: 5px;
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

.swiper-hero {
  width: 100%;
  height: 85vh;
  min-height: 500px;
  overflow: hidden;
}

.swiper-hero .swiper-wrapper {
  display: flex;
  align-items: center;
}

.swiper-hero .swiper-slide {
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 85vh;
  min-height: 500px;
  width: 100%;
}

.swiper-hero .swiper-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-caption {
  position: absolute;
  bottom: 30%;
  left: 10%;
  right: 10%;
  color: white;
  text-align: center;
  z-index: 2;
}

.hero-caption h1,
.hero-caption h2 {
  font-size: 3.5rem;
  font-weight: 800;
}

.hero-caption p {
  font-size: 1.2rem;
}

/* Hero Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  color: var(--masia-red);
  background: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

/* Hero Pagination */
.swiper-pagination {
  bottom: 20px !important;
  z-index: 10;
}

.swiper-pagination-bullet {
  background: white;
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: var(--masia-red) !important;
  opacity: 1;
}

/* ============================================
   COURSE CARDS
   ============================================ */
.course-card {
  background: white;
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(220, 53, 69, 0.12);
  border-color: var(--masia-red);
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 60px 60px 0;
  border-color: transparent var(--masia-red) transparent transparent;
  opacity: 0;
  transition: opacity 0.3s;
}

.course-card:hover::before {
  opacity: 0.1;
}

.course-icon {
  font-size: 2.8rem;
  color: var(--masia-red);
  margin-bottom: 1rem;
}

.course-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

/* Inline Header Option */
.course-card.inline-header .course-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.course-card.inline-header .course-icon {
  font-size: 2rem;
  margin-bottom: 0;
}

.course-card.inline-header .course-title {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.course-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

/* Course Details */
.course-details {
  background: #f8f9fa;
  border-radius: 14px;
  padding: 1rem;
  margin: 0.8rem 0;
  border-left: 3px solid var(--masia-red);
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #444;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item i {
  width: 24px;
  color: var(--masia-red);
  font-size: 0.95rem;
}

.detail-item strong {
  color: var(--text-dark);
  font-weight: 600;
}

.original-fee {
  text-decoration: line-through;
  color: #999;
  font-size: 0.8rem;
  margin-left: 6px;
}

/* Card Footer Buttons */
.card-footer-buttons {
  display: flex;
  gap: 12px;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid #eee;
}

.btn-card-details {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  background: transparent;
  color: var(--masia-red);
  border: 1px solid var(--masia-red);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-card-details:hover {
  background: var(--masia-red);
  color: white;
}

.btn-card-enroll {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  background: var(--masia-red);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-card-enroll:hover {
  background: var(--masia-red-dark);
  transform: translateY(-2px);
}

/* Certificate Cards */
.certificate-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 1px solid var(--gray-border);
  height: 100%;
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(220, 53, 69, 0.15);
  border-color: var(--masia-red);
}

/* ============================================
   STUDENT & BIRTHDAY SLIDERS
   ============================================ */
.student-swiper,
.birthday-swiper {
  padding: 20px 0 50px !important;
  overflow: visible !important;
}

.student-swiper .swiper-slide,
.birthday-swiper .swiper-slide {
  height: auto !important;
  width: 280px !important;
}

.student-slide-card,
.birthday-slide-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 1px solid var(--gray-border);
  height: 100%;
}

.student-slide-card:hover,
.birthday-slide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(220, 53, 69, 0.15);
  border-color: var(--masia-red);
}

.student-img-sm {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--masia-red);
  margin-bottom: 1rem;
}

.crown-icon-sm {
  color: gold;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.birthday-cake-icon {
  color: var(--masia-red);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.year-badge {
  background: var(--masia-red);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: inline-block;
}

/* Slider Pagination */
.student-swiper .swiper-pagination,
.birthday-swiper .swiper-pagination {
  bottom: 0 !important;
  position: relative !important;
  margin-top: 20px;
}

.student-swiper .swiper-pagination-bullet,
.birthday-swiper .swiper-pagination-bullet {
  background: #ccc;
}

.student-swiper .swiper-pagination-bullet-active,
.birthday-swiper .swiper-pagination-bullet-active {
  background: var(--masia-red) !important;
}

/* ============================================
   NEWS / MISSION SECTION
   ============================================ */
.news-card {
  background: linear-gradient(135deg, var(--masia-red-light) 0%, #ffffff 100%);
  border-radius: 20px;
  padding: 2rem;
  border-left: 5px solid var(--masia-red);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.news-date {
  font-size: 0.85rem;
  color: var(--masia-red);
  font-weight: 600;
}

.news-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

/* ============================================
   CERTIFICATE VERIFICATION
   ============================================ */
.verify-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--gray-border);
}

.verify-input {
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  width: 100%;
  transition: all 0.3s;
}

.verify-input:focus {
  outline: none;
  border-color: var(--masia-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.verify-btn {
  background: var(--masia-red);
  border-radius: 10px;
  padding: 12px 28px;
  color: white;
  border: none;
  font-weight: 500;
  transition: 0.3s;
  width: 100%;
}

.verify-btn:hover {
  background: var(--masia-red-dark);
}

/* ============================================
   STATS / COUNTERS
   ============================================ */
.stat-box {
  text-align: center;
  padding: 1.8rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  transition: 0.3s;
  border: 1px solid var(--gray-border);
}

.stat-box:hover {
  transform: translateY(-3px);
  border-color: var(--masia-red);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--masia-red);
  line-height: 1;
}

/* ============================================
   ADMISSION CARDS
   ============================================ */
.card {
  transition: all 0.3s;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--dark-bg);
  color: #aaa;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  margin-right: 12px;
  font-size: 1.1rem;
  transition: 0.3s;
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--masia-red);
  transform: translateY(-3px);
}

.footer-social-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
  color: white;
}

footer a.text-secondary:hover {
  color: var(--masia-red) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.py-4 {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.container {
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   SCROLLBAR CUSTOMIZATION
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--masia-red);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--masia-red-dark);
}

/* ============================================
   RESPONSIVE MEDIA QUERIES (CONSOLIDATED)
   ============================================ */

/* Tablet & Mobile (max-width: 992px) */
@media (max-width: 992px) {
  .nav-social-icons {
    border-left: none;
    margin-left: 0;
    margin-top: 15px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-link {
    text-align: center;
    padding: 10px 0 !important;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Body Padding */
  body {
    padding-top: 90px;
  }
  
  /* Top Bar */
  .top-bar {
    font-size: 0.7rem;
    padding: 6px 0;
  }
  
  /* Navbar */
  .navbar {
    top: 34px;
    padding: 12px 0;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  /* Typography */
  .section-title {
    font-size: 1.8rem;
  }
  
  /* Hero Slider */
  .hero-caption h1,
  .hero-caption h2 {
    font-size: 2rem;
  }
  
  .swiper-hero,
  .swiper-hero .swiper-slide {
    height: 60vh;
    min-height: 400px;
  }
  
  /* Hero Navigation Buttons - Hide on mobile if causing issues */
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
  
  /* Course Cards */
  .course-title {
    font-size: 1.2rem;
  }
  
  .detail-item {
    font-size: 0.75rem;
  }
  
  .btn-card-details,
  .btn-card-enroll {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  /* Inline Header - Stack on mobile */
  .course-card.inline-header .course-header {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  /* Spacing */
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* Certificate Cards on Mobile */
  .certificate-card {
    padding: 1rem;
  }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
  /* Discount Ribbon */
  .discount-ribbon {
    font-size: 0.8rem;
    padding: 5px 20px;
    white-space: nowrap;
  }
  
  /* Student & Birthday Sliders */
  .student-swiper .swiper-slide,
  .birthday-swiper .swiper-slide {
    width: 240px !important;
  }
}