/* ============================================
   DFI International Holding Scorporation
   Common Stylesheet - common.css
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #111640;
  --bg-card: #1a1f3a;
  --bg-card-hover: #1e2545;
  --accent: #0066ff;
  --accent-light: #3388ff;
  --accent-glow: rgba(0, 102, 255, 0.4);
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --text-primary: #ffffff;
  --text-secondary: #8892b0;
  --text-muted: #5a6380;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --gradient-blue: linear-gradient(135deg, #0066ff 0%, #6600ff 100%);
  --gradient-dark: linear-gradient(180deg, #0a0e27 0%, #111640 100%);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --transition-fast: 0.25s ease;
  --transition-normal: 0.4s ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Navigation Bar --- */
.navbar {
  background: rgba(10, 14, 39, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: 8px 0;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
  background: rgba(10, 14, 39, 0.98) !important;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px !important;
  position: relative;
  transition: color var(--transition-fast);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: transform var(--transition-fast);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar-toggler {
  border: 1px solid var(--border-light) !important;
  padding: 6px 10px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

.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(255, 255, 255, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 70px 0 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.footer-brand span {
  color: var(--accent);
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 12px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links li a:hover {
  color: var(--accent-light);
  transform: translateX(5px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-contact-item i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  margin-top: 50px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Page Header --- */
.page-header {
  padding: 160px 0 80px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.section-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.section-title span {
  color: var(--accent);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.btn-primary-custom {
  background: var(--gradient-blue);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 102, 255, 0.5);
  color: #fff;
}

.btn-outline-custom {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a1a1a;
  border: none;
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 168, 83, 0.5);
  color: #1a1a1a;
}

/* --- Card Styles --- */
.card-custom {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  height: 100%;
}

.card-custom:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.card-custom .card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-custom .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.card-custom:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-custom .card-img-overlay-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-custom .card-body-custom {
  padding: 20px;
}

.card-custom .card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-custom .card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Filter Buttons --- */
.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 8px 22px;
  border-radius: 25px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* --- Grid Layouts --- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  .item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .item-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Modal Custom --- */
.modal-custom .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.modal-custom .modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}

.modal-custom .modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
}

.modal-custom .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Custom Alert --- */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.custom-alert-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-alert-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  transform: translateY(30px) scale(0.95);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.custom-alert-overlay.show .custom-alert-box {
  transform: translateY(0) scale(1);
}

.custom-alert-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}

.custom-alert-icon.success {
  color: #00c853;
}

.custom-alert-icon.error {
  color: #ff1744;
}

.custom-alert-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.custom-alert-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.custom-alert-btn {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 10px 32px;
  background: var(--gradient-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.custom-alert-btn:hover {
  box-shadow: 0 4px 15px var(--accent-glow);
  transform: translateY(-1px);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
  box-shadow: 0 4px 15px var(--accent-glow);
  font-size: 1.1rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 25px var(--accent-glow);
}

/* --- Loading Spinner --- */
.spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-light);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --- Utility --- */
.text-accent { color: var(--accent) !important; }
.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-secondary) !important; }
.bg-card { background: var(--bg-card) !important; }