/* ================================================
   Custom CSS for Site V2
   Additional styling for enhanced user experience
   ================================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Button enhancements */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Button Info (Teal color from ub-front) - Moved to UB-Front section */

/* Loading spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
  border-color: #236FA1;
  box-shadow: 0 0 0 0.25rem rgba(35, 111, 161, 0.15);
}

/* Invalid feedback styling */
.invalid-feedback {
  display: block;
  margin-top: 0.25rem;
}

/* Alert improvements */
.alert {
  border-left: 4px solid;
  border-radius: 0.375rem;
}

.alert-success {
  border-left-color: #198754;
}

.alert-danger {
  border-left-color: #dc3545;
}

.alert-info {
  border-left-color: #0dcaf0;
}

.alert-warning {
  border-left-color: #ffc107;
}

/* Sticky navbar shadow on scroll */
.navbar.sticky-top.scrolled {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Program card styling (matching ub-front) */
.course-card {
  border: 1px solid var(--app-colors-gray-light, #e2e2e2);
  border-radius: 20px;
  transition: all 0.2s linear;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-10px);
}

.course-card > img {
  border-radius: 20px 20px 0 0;
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.course-card-title {
  text-decoration: none;
  cursor: pointer;
  color: var(--app-colors-gray-dark, #3f3f3f);
  padding: 22px 50px;
  font-size: 24px;
  background-color: rgba(40, 184, 187, 0.2);
}

.course-card-title:hover {
  color: var(--app-colors-primary, #1d447a);
}

.course-card-info {
  list-style: none;
}

.course-card-info li {
  list-style: none;
}

.course-card-info .title {
  color: var(--app-colors-teal, #16b3be);
}

/* Currency badge (ub-front style) */
.currency-badge {
  display: inline-flex;
  align-items-center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--app-colors-primary, #1d447a);
  color: white;
  border-radius: 0.5rem;
}

.currency-badge-icon {
  width: 20px;
  height: 20px;
  filter: invert(1) brightness(2);
}

/* Favorite button (ub-front style) */
.fav-btn {
  width: 32px;
  height: 32px;
  color: var(--app-colors-gray-dark, #3f3f3f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.fav-btn:hover {
  background-color: #f8f9fa !important;
}

.fav-btn:hover .bi {
  color: var(--app-colors-red, #f46562);
}

.fav-btn:hover .bi::before {
  content: "\F415";
}

/* Page header improvements */
.page-header {
  background: linear-gradient(135deg, #236FA1 0%, #1a5680 100%);
  padding: 3rem 0;
  color: white;
}

/* Breadcrumb styling (UB-Front Style) */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.breadcrumb-item:last-of-type a,
.breadcrumb-item.active {
  color: var(--app-colors-orange-light, #ecae5b);
}

.breadcrumb-item + .breadcrumb-item::before {
  filter: invert(1);
  margin-top: 4px;
  transform: scale(0.8);
}

/* Profile image preview */
.profile-image-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Navigation active state */
.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: #236FA1;
  border-radius: 2px 2px 0 0;
}

/* Dropdown menu improvements */
.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  overflow: hidden;
}

.dropdown-item {
  padding: 0.75rem 1.25rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  padding-right: 1.5rem;
}

/* Badge styling */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 500;
}

/* Input group improvements */
.input-group-text {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

/* Accordion improvements */
.accordion-button:not(.collapsed) {
  background-color: #e7f3ff;
  color: #236FA1;
}

.accordion-button:focus {
  border-color: #236FA1;
  box-shadow: 0 0 0 0.25rem rgba(35, 111, 161, 0.15);
}

/* List group improvements */
.list-group-item {
  transition: all 0.2s ease;
}

.list-group-item-action:hover {
  background-color: #f8f9fa;
  padding-right: 1.25rem;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1rem;
  }

  .navbar-brand img {
    max-height: 50px;
  }

  .course-card-title {
    font-size: 1rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .no-print {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid #236FA1;
  outline-offset: 2px;
}

/* Loading states */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #236FA1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* RTL Support enhancements */
[dir="rtl"] .dropdown-item:hover {
  padding-right: 1.25rem;
  padding-left: 1.5rem;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here when needed */
}

/* ================================================
   UB-Front Design Styles (Diploma Pages)
   ================================================ */

/* CSS Variables (matching ub-front) */
:root {
  --app-colors-orange: #ff8d28;
  --app-colors-orange-light: #ecae5b;
  --app-colors-teal: #16b3be;
  --app-colors-teal-light: #28b8bb;
  --app-colors-teal-light-rgb: 40, 184, 187;
  --app-colors-teal-dark: #149da7;
  --app-colors-primary: #1d447a;
  --app-colors-gray: #a5a5a5;
  --app-colors-gray-light: #e2e2e2;
  --app-colors-gray-dark: #3f3f3f;
  --app-colors-red: #f46562;
  --bs-breadcrumb-divider: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-double-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"/><path fill-rule="evenodd" d="M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"/></svg>');
}

/* Header gradient background */
header {
  position: relative;
  overflow: hidden;
}

header::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #144789 35.51%, #5ca4b3 87%);
}

/* Navbar (ub-front style) */
.navbar {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding-top: 32px;
  padding-bottom: 20px;
}

.navbar-brand .logo {
  height: 50px;
  width: 190px;
  object-fit: contain;
}

.navbar-nav .nav-link {
  opacity: 0.8;
  font-size: 18px;
}

@media (min-width: 992px) {
  .navbar-nav .nav-link {
    color: white;
  }
}

.navbar-nav .nav-link.active {
  color: var(--app-colors-orange-light, #ecae5b);
}

.navbar-nav .nav-link:hover {
  opacity: 1;
  color: var(--app-colors-orange-light, #ecae5b);
}

.navbar-nav.end-nav .nav-link {
  color: var(--app-colors-teal-light, #28b8bb);
}

.navbar-toggler {
  border: none;
  padding: 5px;
}

.navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

/* Button styles (ub-front) */
.btn {
  --bs-btn-font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  --bs-btn-bg: var(--app-colors-primary, #1d447a);
  --bs-btn-border-color: var(--app-colors-primary, #1d447a);
  --bs-btn-hover-bg: var(--app-colors-primary, #1d447a);
  --bs-btn-hover-border-color: var(--app-colors-primary, #1d447a);
  --bs-btn-active-bg: var(--app-colors-primary, #1d447a);
  --bs-btn-active-border-color: var(--app-colors-primary, #1d447a);
  --bs-btn-disabled-bg: var(--app-colors-primary, #1d447a);
  --bs-btn-disabled-border-color: var(--app-colors-primary, #1d447a);
}

/* Side bottom radius */
.side-bottom-radius {
  border-bottom-left-radius: 100px;
}

@media (min-width: 576px) {
  .side-bottom-radius {
    border-bottom-left-radius: 190px;
  }
}

/* Page header image */
.page-header-img {
  opacity: 0.15;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 992px) {
  .page-header-img {
    height: auto;
    object-fit: contain;
  }
}

.page-header-img.diploma-header-img {
  opacity: 0.45;
}

/* Diploma Title */
.diploma-title {
  color: #ecae5b;
  font-size: 2.5rem;
  font-weight: bold;
}

/* Diploma Info Layout - Negative margin to overlap header */
.diploma-info-layout {
  margin: -48px auto 48px auto;
}

/* Info List */
.diploma-info-list {
  list-style: none;
}

.diploma-info-list .bi {
  flex-shrink: 0;
  margin-top: 8px;
  color: var(--app-colors-teal, #16b3be);
}

.diploma-info-list .title {
  font-size: 14px;
  color: var(--app-colors-gray, #a5a5a5);
}

.diploma-info-list .currency-badge-icon {
  width: 16px;
  height: 16px;
  filter: invert(0) brightness(0);
}

/* Content Container */
.content-container {
  background-color: #fff;
  border-radius: 28px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  padding: 28px;
}

/* Diploma Info Details */
.diploma-info-details {
  margin-bottom: 32px;
}

.diploma-info-details:last-of-type {
  margin-bottom: 0;
}

.diploma-info-details .details-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #1d447a;
}

.diploma-info-details .details-icon .bi {
  font-size: 32px;
  color: #5dfcff;
}

.diploma-info-details .details-title {
  font-size: 24px;
  color: #ff8d28;
}

.diploma-info-details .details-content {
  line-height: 1.8;
  color: #3f3f3f;
}

.diploma-info-details .details-content h1,
.diploma-info-details .details-content h2,
.diploma-info-details .details-content h3 {
  color: #1d447a;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.diploma-info-details .details-content ul,
.diploma-info-details .details-content ol {
  padding-right: 1.5rem;
}

.diploma-info-details .details-content table {
  width: 100%;
  margin: 1rem 0;
}

.diploma-info-details .details-list {
  list-style: none;
  padding-right: 1.5rem;
  color: #3f3f3f;
}

.diploma-info-details .details-list li {
  position: relative;
  padding-right: 1.5rem;
  margin: 0.5rem 0;
}

.diploma-info-details .details-list li:before {
  content: "•";
  position: absolute;
  right: 0;
  color: #16b3be;
  font-weight: bold;
  font-size: 1.2em;
}

/* Section Title with decorative lines */
.section-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: #1d447a;
  font-size: 2rem;
  font-weight: 600;
}

.section-title::after,
.section-title::before {
  content: "";
  position: relative;
  z-index: -1;
  margin-top: 16px;
  top: 0;
  width: 70px;
  height: 1px;
  background-color: #e0aa62;
}

/* Content Layout (FAQ, Terms, etc.) */
.content-layout {
  position: relative;
  margin-top: -120px;
  z-index: 10;
}

@media (min-width: 768px) {
  .content-layout {
    margin-top: -150px;
  }
}

.content-title {
  color: var(--app-colors-primary, #1d447a);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .content-title {
    font-size: 32px;
  }
}

/* FAQ Accordion */
.faq-accordion .accordion-item {
  border: 1px solid var(--app-colors-gray-light, #e2e2e2);
  border-radius: 12px;
  margin-bottom: 18px;
  background-color: transparent;
  overflow: visible;
}

.faq-accordion .accordion-item:last-child {
  margin-bottom: 0;
}

.faq-accordion .accordion-button {
  background-color: transparent;
  color: var(--app-colors-gray-dark, #3f3f3f);
  font-size: 18px;
  font-weight: 500;
  border-radius: 12px;
}

.faq-accordion .accordion-button:not(.collapsed) {
  background-color: transparent;
  color: var(--app-colors-primary, #1d447a);
  box-shadow: none;
}

.faq-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: var(--app-colors-gray-light, #e2e2e2);
}

.faq-accordion .accordion-body {
  color: var(--app-colors-gray-dark, #3f3f3f);
  line-height: 1.7;
}

/* Auth Layout */
.auth-layout {
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.auth-layout .auth-title {
  font-size: 32px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 24px;
  color: var(--app-colors-primary, #1d447a);
}

.auth-layout .auth-subtitle {
  font-size: 18px;
  text-align: center;
  color: var(--app-colors-gray, #a5a5a5);
}

.auth-layout form,
.auth-layout .row {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Form Controls */
.form-control-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
}

.form-control-icon {
  position: absolute !important;
  top: 50%;
  inset-inline-end: 0;
  transform: translateY(-50%);
  color: var(--app-colors-gray, #a5a5a5);
  padding: 0.5rem 1rem;
  z-index: 10;
  background: transparent;
  border: none;
}

.form-control-icon:hover {
  color: var(--app-colors-primary, #1d447a);
  background: transparent;
  transform: translateY(-50%);
}

.form-label {
  font-size: 18px;
  margin-bottom: 0;
  color: var(--app-colors-primary, #1d447a);
}

.form-control,
.form-select {
  width: 100%;
  min-height: 48px;
  outline-color: var(--app-colors-teal-light, #28b8bb);
  border: 1px solid var(--app-colors-gray-light, #e2e2e2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 16px;
}

.form-control:focus,
.form-select:focus {
  outline-color: var(--app-colors-teal-light, #28b8bb);
  border-color: var(--app-colors-teal-light, #28b8bb);
  box-shadow: 0 0 0 0.25rem rgba(40, 184, 187, 0.2);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .diploma-title {
    font-size: 1.75rem;
  }

  .diploma-info-layout {
    margin: -24px auto 24px auto;
  }
}

@media (min-width: 992px) {
  .content-container {
    border-radius: 40px;
    padding: 40px;
  }
}
