/**
 * @file
 * GB Global Theme - Components Stylesheet
 * Reusable component styles
 */

/* ========================================
   Cards
   ======================================== */
.card-custom {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-custom:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-3px);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary-custom {
  background-color: var(--primary-navy);
  border-color: var(--primary-navy);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--white);
}

.btn-outline-custom {
  border: 2px solid var(--primary-navy);
  color: var(--primary-navy);
  background-color: transparent;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background-color: var(--primary-navy);
  color: var(--white);
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

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

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.section-header::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--accent-green);
  margin: 1.5rem auto 0;
}

/* ========================================
   Content Box
   ======================================== */
.content-box {
  background-color: var(--secondary-beige);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-box-white {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   Image Overlays
   ======================================== */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
  opacity: 1;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb-custom {
  background-color: #f8f9fa;
  padding: 1rem 0;
}

.breadcrumb-custom .breadcrumb {
  background-color: transparent;
  margin-bottom: 0;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: var(--primary-navy);
}

/* ========================================
   Pagination
   ======================================== */
.pagination-custom .page-link {
  color: var(--primary-navy);
  border: none;
  margin: 0 0.25rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-custom .page-item.active .page-link {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

.pagination-custom .page-link:hover {
  background-color: var(--primary-navy);
  color: var(--white);
}

/* ========================================
   Form Elements
   ======================================== */
.form-control-custom {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control-custom:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* ========================================
   Badges
   ======================================== */
.badge-custom {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.badge-primary-custom {
  background-color: var(--primary-navy);
  color: var(--white);
}

.badge-success-custom {
  background-color: var(--accent-green);
  color: var(--white);
}

/* ========================================
   Dividers
   ======================================== */
.divider-custom {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-green), transparent);
  margin: 2rem 0;
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner-custom {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0,0,0,0.1);
  border-left-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Alert Boxes
   ======================================== */
.alert-custom {
  border-radius: 8px;
  border-left: 4px solid;
  padding: 1rem 1.5rem;
}

.alert-custom.alert-success {
  border-left-color: var(--accent-green);
  background-color: #e8f5e9;
  color: #2e7d32;
}

.alert-custom.alert-info {
  border-left-color: #2196f3;
  background-color: #e3f2fd;
  color: #1565c0;
}

.alert-custom.alert-warning {
  border-left-color: #ff9800;
  background-color: #fff3e0;
  color: #e65100;
}

/* ========================================
   Notice Block
   ======================================== */
.notice-block-wrapper,
#block-gb-global-theme-notice {
  width: 100%;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: var(--secondary-beige);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.notice-block-wrapper:hover,
#block-gb-global-theme-notice:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Center align the notice block title */
.notice-block-title,
#block-gb-global-theme-notice .block-title {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-navy, #003f5c);
  font-size: 1.5rem;
  font-weight: 600;
}

/* Left align the notice block content */
.notice-block-content,
#block-gb-global-theme-notice .block-content {
  text-align: left;
  color: var(--text-dark, #333);
  line-height: 1.6;
}

.notice-block-content p,
#block-gb-global-theme-notice .block-content p {
  margin-bottom: 0.75rem;
}

.notice-block-content p:last-child,
#block-gb-global-theme-notice .block-content p:last-child {
  margin-bottom: 0;
}

/* Hide notice block if field_notice_body is empty */
#block-gb-global-theme-notice:not(:has(.field--field-notice-body)) {
  display: none;
}

/* Notice block Read More button - smaller size */
.notice-block-read-more .btn-see-more {
  padding: 0.5rem 1.5rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .notice-block-wrapper,
  #block-gb-global-theme-notice {
    padding: 1rem;
  }

  .notice-block-title,
  #block-gb-global-theme-notice .block-title {
    font-size: 1.25rem;
  }
}
