/* ==========================================================================
   css/components.css — Dritrez Solutions Reusable UI Component Library
   ========================================================================== */

/* ──────────────────────────────────────────────────────────────────────────
   SECTION ANATOMY
   ────────────────────────────────────────────────────────────────────────── */
.section-eyebrow {
  display:         inline-flex;
  align-items:     center;
  gap:             var(--space-3);
  font-family:     var(--font-mono);
  font-size:       var(--text-xs);
  font-weight:     500;
  text-transform:  uppercase;
  letter-spacing:  3px;
  color:           var(--primary);
  margin-bottom:   var(--space-5);
}

.section-eyebrow::before,
.section-eyebrow::after {
  content:    '';
  display:    block;
  width:      28px;
  height:     1px;
  background: var(--primary);
  opacity:    0.7;
}

.section-header {
  text-align:    center;
  max-width:     820px;
  margin-left:   auto;
  margin-right:  auto;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-5);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 640px;
  margin:    0 auto;
}

/* ──────────────────────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────────────────────── */
.btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--space-2);
  padding:         0.875rem 2rem;
  border-radius:   var(--radius-sm);
  font-family:     var(--font-heading);
  font-size:       var(--text-xs);
  font-weight:     700;
  letter-spacing:  2.5px;
  text-transform:  uppercase;
  text-decoration: none;
  white-space:     nowrap;
  cursor:          pointer;
  transition:      all var(--transition-base);
  position:        relative;
  overflow:        hidden;
  border:          2px solid transparent;
}

/* Ripple pseudo-element */
.btn::after {
  content:          '';
  position:         absolute;
  inset:            0;
  background:       rgba(255, 255, 255, 0);
  transition:       background var(--transition-fast);
}

.btn:hover::after {
  background: rgba(255, 255, 255, 0.04);
}

/* Solid Gradient */
.btn-solid {
  background:   linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color:        var(--text-inverse);
  border-color: transparent;
}
.btn-solid:hover {
  transform:  translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 243, 255, 0.3), 0 0 0 2px rgba(0, 243, 255, 0.2);
  color:      var(--text-inverse);
}
.btn-solid:active { transform: translateY(0); }

/* Cyber Outline */
.btn-cyber {
  background:   transparent;
  color:        var(--primary);
  border-color: var(--primary);
}
.btn-cyber:hover {
  background:   var(--primary);
  color:        var(--text-inverse);
  box-shadow:   var(--shadow-glow);
  transform:    translateY(-2px);
}
.btn-cyber:active { transform: translateY(0); }

/* Ghost */
.btn-ghost {
  background:   transparent;
  color:        var(--text-main);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color:        var(--primary);
  background:   var(--primary-glow-sm);
}

/* Sizes */
.btn-sm {
  padding:       0.5rem 1.25rem;
  font-size:     0.65rem;
  letter-spacing: 2px;
}

.btn-lg {
  padding:       1.1rem 2.75rem;
  font-size:     0.8rem;
  letter-spacing: 3px;
}

/* Disabled */
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor:  not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   GLASSMORPHISM SERVICE / FEATURE CARDS
   ────────────────────────────────────────────────────────────────────────── */
.service-card {
  background:         var(--glass-bg);
  backdrop-filter:    var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border:             1px solid var(--card-border);
  border-radius:      var(--radius-lg);
  padding:            var(--space-8) var(--space-8) var(--space-10);
  transition:         transform var(--transition-base),
                      border-color var(--transition-base),
                      box-shadow var(--transition-base);
  position:           relative;
  overflow:           hidden;
  height:             100%;
  display:            flex;
  flex-direction:     column;
}

/* Top accent bar */
.service-card::before {
  content:    '';
  position:   absolute;
  top:        0; left: 0; right: 0;
  height:     3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity:    0;
  transition: opacity var(--transition-base);
}

/* Corner glow */
.service-card::after {
  content:    '';
  position:   absolute;
  top:        -60px; right: -60px;
  width:      120px; height: 120px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  opacity:    0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  transform:    translateY(-10px);
  border-color: var(--card-border-hover);
  box-shadow:   0 24px 48px -12px rgba(0, 243, 255, 0.12),
                0 0 0 1px rgba(0, 243, 255, 0.15);
}

.service-card:hover::before { opacity: 1; }
.service-card:hover::after  { opacity: 1; }

/* Icon Box inside cards */
.card-icon {
  width:           56px;
  height:          56px;
  background:      var(--primary-glow-sm);
  border:          1px solid rgba(0, 243, 255, 0.15);
  border-radius:   var(--radius-md);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       1.5rem;
  color:           var(--primary);
  margin-bottom:   var(--space-6);
  flex-shrink:     0;
  transition:      background var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover .card-icon {
  background:  var(--primary-glow);
  box-shadow:  var(--shadow-glow-sm);
}

.service-card h3 {
  font-size:     var(--text-xl);
  margin-bottom: var(--space-3);
  color:         var(--text-white);
}

.service-card p {
  font-size:   var(--text-base);
  color:       var(--text-muted);
  flex-grow:   1;
  margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   STAT BLOCKS
   ────────────────────────────────────────────────────────────────────────── */
.stat-block {
  text-align:  center;
  padding:     var(--space-6) var(--space-4);
}

.stat-number {
  display:      block;
  font-family:  var(--font-heading);
  font-size:    var(--text-5xl);
  font-weight:  900;
  line-height:  1;
  background:   linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
}

.stat-label {
  display:        block;
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color:          var(--text-muted);
}

/* ──────────────────────────────────────────────────────────────────────────
   BADGES
   ────────────────────────────────────────────────────────────────────────── */
.badge {
  display:        inline-flex;
  align-items:    center;
  padding:        0.25rem 0.875rem;
  border-radius:  var(--radius-full);
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  font-weight:    600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space:    nowrap;
}

.badge-primary {
  background:   var(--primary-glow-sm);
  color:        var(--primary);
  border:       1px solid rgba(0, 243, 255, 0.2);
}

.badge-accent {
  background:   var(--accent-glow);
  color:        #c4b5fd;
  border:       1px solid rgba(124, 58, 237, 0.25);
}

.badge-warm {
  background:   rgba(245, 158, 11, 0.1);
  color:        var(--accent-warm);
  border:       1px solid rgba(245, 158, 11, 0.2);
}

/* ──────────────────────────────────────────────────────────────────────────
   ICON BOX (standalone)
   ────────────────────────────────────────────────────────────────────────── */
.icon-box {
  width:           64px;
  height:          64px;
  border-radius:   var(--radius-md);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       1.75rem;
  flex-shrink:     0;
}

.icon-box-primary { background: var(--primary-glow);    color: var(--primary);   border: 1px solid rgba(0, 243, 255, 0.18); }
.icon-box-accent  { background: var(--accent-glow);     color: #a78bfa;          border: 1px solid rgba(124, 58, 237, 0.2); }
.icon-box-blue    { background: var(--secondary-glow);  color: #60a5fa;          border: 1px solid rgba(13, 110, 253, 0.2); }

/* ──────────────────────────────────────────────────────────────────────────
   FORM COMPONENTS
   ────────────────────────────────────────────────────────────────────────── */
.form-group {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-2);
  margin-bottom:  var(--space-5);
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:          var(--text-muted);
  font-weight:    500;
}

.form-control {
  width:         100%;
  padding:       0.9375rem 1rem;
  background:    rgba(255, 255, 255, 0.035);
  border:        1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color:         var(--text-white);
  font-size:     var(--text-base);
  transition:    border-color var(--transition-base),
                 background   var(--transition-base),
                 box-shadow   var(--transition-base);
  appearance:    none;
}

.form-control::placeholder {
  color: var(--text-subtle);
}

.form-control:focus {
  outline:      none;
  border-color: var(--primary);
  background:   rgba(0, 243, 255, 0.03);
  box-shadow:   0 0 0 3px rgba(0, 243, 255, 0.1);
}

.form-control.is-error {
  border-color: var(--error);
  box-shadow:   0 0 0 3px var(--error-glow);
}

/* Select: Force correct option background on all browsers */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7fa3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:   no-repeat;
  background-position: right 1rem center;
  padding-right:       2.5rem;
  cursor:              pointer;
}

select.form-control option {
  background-color: var(--dark-bg);
  color:            var(--text-main);
}

textarea.form-control {
  resize:     vertical;
  min-height: 130px;
}

/* ──────────────────────────────────────────────────────────────────────────
   ALERT / RESPONSE STATES
   ────────────────────────────────────────────────────────────────────────── */
.alert {
  display:       none;
  align-items:   flex-start;
  gap:           var(--space-4);
  padding:       var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  animation:     alertSlideIn 0.35s var(--transition-spring) both;
}

.alert.is-active { display: flex; }

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0);     }
}

.alert-success {
  background:   var(--success-glow);
  border:       1px solid rgba(16, 185, 129, 0.3);
  color:        #6ee7b7;
}

.alert-error {
  background:   var(--error-glow);
  border:       1px solid rgba(239, 68, 68, 0.3);
  color:        #fca5a5;
}

.alert-loading {
  background:   var(--primary-glow-sm);
  border:       1px solid rgba(0, 243, 255, 0.2);
  color:        var(--primary);
}

.alert-icon {
  font-size:   1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top:  2px;
}

.alert-body h4 {
  font-family:   var(--font-body);
  font-size:     var(--text-sm);
  font-weight:   600;
  margin-bottom: var(--space-1);
  color:         inherit;
}

.alert-body p {
  font-size:     var(--text-sm);
  color:         inherit;
  opacity:       0.85;
  margin-bottom: 0;
  line-height:   1.5;
}

/* ──────────────────────────────────────────────────────────────────────────
   LOADING SPINNER
   ────────────────────────────────────────────────────────────────────────── */
.spinner {
  display:         inline-block;
  width:           18px;
  height:          18px;
  border:          2px solid rgba(0, 243, 255, 0.25);
  border-top-color: var(--primary);
  border-radius:   var(--radius-full);
  animation:       spin 0.75s linear infinite;
  flex-shrink:     0;
}

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

/* ──────────────────────────────────────────────────────────────────────────
   PILLAR / VALUE CARDS
   ────────────────────────────────────────────────────────────────────────── */
.pillar-card {
  background:     rgba(255, 255, 255, 0.025);
  border-left:    3px solid var(--primary);
  border-radius:  0 var(--radius-md) var(--radius-md) 0;
  padding:        var(--space-6) var(--space-7);
  transition:     background var(--transition-base), border-color var(--transition-base);
}

.pillar-card:hover {
  background:   rgba(0, 243, 255, 0.04);
  border-color: var(--primary);
}

.pillar-card h4 {
  font-size:     var(--text-lg);
  margin-bottom: var(--space-2);
  color:         var(--text-white);
}

.pillar-card p {
  font-size:     var(--text-sm);
  color:         var(--text-muted);
  margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   BLOG CARDS
   ────────────────────────────────────────────────────────────────────────── */
.blog-card {
  background:     var(--card-bg);
  border:         1px solid var(--card-border);
  border-radius:  var(--radius-lg);
  overflow:       hidden;
  transition:     transform var(--transition-base),
                  border-color var(--transition-base),
                  box-shadow var(--transition-base);
  display:        flex;
  flex-direction: column;
  height:         100%;
}

.blog-card:hover {
  transform:    translateY(-8px);
  border-color: rgba(0, 243, 255, 0.28);
  box-shadow:   0 12px 32px rgba(0, 243, 255, 0.08);
}

.blog-card-img {
  width:       100%;
  height:      210px;
  object-fit:  cover;
  flex-shrink: 0;
  border-bottom: 1px solid var(--card-border);
  transition:  transform 0.5s ease;
}

.blog-card:hover .blog-card-img { transform: scale(1.03); }

.blog-card-img-wrap {
  overflow: hidden;
}

.blog-card-body {
  padding:        var(--space-7);
  display:        flex;
  flex-direction: column;
  flex-grow:      1;
  gap:            var(--space-3);
}

.blog-meta {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--space-3);
}

.blog-meta .category {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:          var(--primary);
}

.blog-meta .date {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  color:          var(--text-subtle);
}

.blog-card-title {
  font-size:   var(--text-xl);
  color:       var(--text-white);
  line-height: 1.35;
  margin:      0;
  transition:  color var(--transition-base);
}

.blog-card:hover .blog-card-title { color: var(--primary); }

.blog-card-desc {
  font-size:   var(--text-sm);
  color:       var(--text-muted);
  line-height: 1.7;
  flex-grow:   1;
  margin:      0;
}

/* ──────────────────────────────────────────────────────────────────────────
   ARTICLE CONTENT
   ────────────────────────────────────────────────────────────────────────── */
.article-body {
  font-size:   var(--text-lg);
  line-height: 1.85;
  color:       var(--text-main);
  max-width:   780px;
  margin:      0 auto;
}

.article-body h2 {
  font-size:     var(--text-3xl);
  margin-top:    var(--space-12);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--glass-border);
}

.article-body p   { margin-bottom: var(--space-6); }
.article-body blockquote {
  margin:         var(--space-8) 0;
  padding:        var(--space-6) var(--space-8);
  background:     rgba(0, 243, 255, 0.03);
  border-left:    4px solid var(--primary);
  border-radius:  0 var(--radius-md) var(--radius-md) 0;
  font-size:      var(--text-xl);
  font-style:     italic;
  color:          var(--text-main);
}

.article-hero-img {
  width:         100%;
  height:        420px;
  object-fit:    cover;
  border-radius: var(--radius-lg);
  border:        1px solid var(--card-border);
  margin-bottom: var(--space-12);
}

/* Dropcap */
.dropcap::first-letter {
  font-family:  var(--font-heading);
  font-size:    4rem;
  font-weight:  900;
  line-height:  0.8;
  float:        left;
  padding-right: var(--space-4);
  margin-top:   var(--space-2);
  color:        var(--primary);
}

/* ──────────────────────────────────────────────────────────────────────────
   CONTACT INFO DETAIL ROW
   ────────────────────────────────────────────────────────────────────────── */
.contact-detail-row {
  display:     flex;
  align-items: flex-start;
  gap:         var(--space-5);
  padding:     var(--space-6) 0;
  border-bottom: 1px solid var(--glass-border);
}

.contact-detail-row:first-child { padding-top: 0; }
.contact-detail-row:last-child  { border-bottom: none; padding-bottom: 0; }

.contact-icon {
  width:           52px;
  height:          52px;
  background:      var(--primary-glow-sm);
  border:          1px solid rgba(0, 243, 255, 0.15);
  border-radius:   var(--radius-full);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       1.3rem;
  flex-shrink:     0;
  color:           var(--primary);
}

.contact-detail-row h4 {
  font-size:     var(--text-sm);
  font-family:   var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color:         var(--text-muted);
  margin-bottom: var(--space-1);
}

.contact-detail-row p,
.contact-detail-row a {
  font-size:   var(--text-lg);
  color:       var(--text-main);
  font-weight: 500;
  margin:      0;
}

/* ──────────────────────────────────────────────────────────────────────────
   LEGAL CONTENT
   ────────────────────────────────────────────────────────────────────────── */
.legal-article {
  max-width:   800px;
  margin:      0 auto;
  font-size:   var(--text-base);
  line-height: 1.8;
  color:       var(--text-muted);
}

.legal-article h2 {
  font-size:     var(--text-2xl);
  color:         var(--text-white);
  margin-top:    var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--glass-border);
}

.legal-article p { margin-bottom: var(--space-5); }

.legal-article ul {
  list-style:    disc;
  padding-left:  var(--space-6);
  margin-bottom: var(--space-6);
}

.legal-article li {
  color:         var(--text-muted);
  margin-bottom: var(--space-2);
}
