/* ============================================================
   nav-enhance.css — CloudV24 Navigation & UI Enhancements
   ADDITIVE ONLY — never overrides core styles.css rules.
   Uses var() tokens from existing :root for full consistency.
   ============================================================ */

/* ─────────────────────────────────────────────────────────
   1. DESKTOP NAV DROPDOWN WRAPPER
   ───────────────────────────────────────────────────────── */
.nav-item--has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* The trigger button looks exactly like existing nav a */
.nav-dd-trigger {
  color: rgba(226,232,240,0.7);
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-dd-trigger:hover,
.nav-item--has-dropdown.nav-dd--open .nav-dd-trigger {
  color: #fff;
  background: rgba(255, 90, 60, 0.12);
}

/* chevron icon */
.nav-dd-chevron {
  display: inline-block;
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
  opacity: 0.6;
}

.nav-item--has-dropdown.nav-dd--open .nav-dd-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────
   2. DROPDOWN PANEL — fade + slide
   ───────────────────────────────────────────────────────── */
.nav-dd-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 220px;
  background: rgba(21, 26, 46, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9999;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* small arrow */
.nav-dd-panel::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(21, 26, 46, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.nav-item--has-dropdown.nav-dd--open .nav-dd-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* links inside dropdown */
.nav-dd-panel a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: rgba(226,232,240,0.75);
  text-decoration: none;
  font-size: 0.845rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
  font-family: "Outfit", sans-serif;
}

.nav-dd-panel a svg,
.nav-dd-panel a .dd-icon {
  width: 15px;
  height: 15px;
  opacity: 0.65;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}

.nav-dd-panel a:hover {
  background: rgba(255, 90, 60, 0.12);
  color: #fff;
  padding-left: 1.1rem;
}

.nav-dd-panel a:hover svg,
.nav-dd-panel a:hover .dd-icon {
  opacity: 1;
}

.nav-dd-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0.35rem 0.5rem;
}

/* ─────────────────────────────────────────────────────────
   3. MOBILE ACCORDION SUBMENUS
   ───────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .mob-acc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
  }

  .mob-acc-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
    opacity: 0.5;
    flex-shrink: 0;
    margin-left: auto;
  }

  .mob-acc-item.mob-acc--open .mob-acc-chevron {
    transform: rotate(180deg);
    opacity: 1;
  }

  .mob-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mob-acc-body a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 2.8rem;
    color: rgba(226,232,240,0.65) !important;
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: "Outfit", sans-serif;
  }

  .mob-acc-body a:hover,
  .mob-acc-body a.active {
    background: rgba(255, 90, 60, 0.1);
    color: #fff !important;
  }

  .mob-acc-body a svg {
    width: 13px;
    height: 13px;
    opacity: 0.6;
    flex-shrink: 0;
  }
}

/* Hide dropdown panel on mobile */
@media (max-width: 1023px) {
  .nav-dd-panel { display: none !important; }
}

/* ─────────────────────────────────────────────────────────
   4. BUTTON HOVER MICRO-ANIMATIONS (non-breaking)
   Only adds transforms / glow; never changes colors.
   ───────────────────────────────────────────────────────── */
.btn-primary {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 20px rgba(255, 90, 60, 0.35) !important;
}
.btn-primary:active {
  transform: translateY(0) scale(0.98) !important;
}

.btn-outline {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.btn-outline:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1) !important;
}

/* ─────────────────────────────────────────────────────────
   5. CARD LIFT HOVER (non-breaking)
   Adds translateY lift to existing cards without removing
   any existing hover rules (specificity stays low).
   ───────────────────────────────────────────────────────── */
.feature-card,
.pricing-card,
.blog-card,
.service-card,
.hosting-card,
.domain-pricing-card,
.managed-card,
.support-card,
.category-card,
.addon-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease !important;
  will-change: transform;
}

.feature-card:hover,
.pricing-card:hover,
.blog-card:hover,
.service-card:hover,
.hosting-card:hover,
.domain-pricing-card:hover,
.managed-card:hover,
.support-card:hover,
.category-card:hover,
.addon-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35) !important;
}

/* ─────────────────────────────────────────────────────────
   6. SCROLL REVEAL ANIMATIONS
   .cv-reveal-init = invisible initial state
   .cv-revealed   = fade + slide in (added by JS observer)
   ───────────────────────────────────────────────────────── */
.cv-reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cv-reveal-init.cv-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Generic .cv-reveal class for custom use */
.cv-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.cv-reveal.cv-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   7. NEW SECURITY / DOMAIN / HOSTING PAGES
   Reuse existing design tokens for consistent look.
   ───────────────────────────────────────────────────────── */

/* Hero section for new pages — mirrors existing .hero style */
.cv-page-hero {
  padding: 7rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.cv-page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
}

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

.cv-grad-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Feature grid for new pages */
.cv-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.cv-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cv-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cv-grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Card for new pages — uses existing glass style tokens */
.cv-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.cv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  border-color: rgba(255, 90, 60, 0.3);
}

.cv-card__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(255,90,60,0.15), rgba(255,122,24,0.15));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.cv-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.cv-card__desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Pricing table for new pages */
.cv-pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-pricing-row:hover {
  background: rgba(255,90,60,0.07);
  border-color: rgba(255,90,60,0.25);
}

.cv-pricing-row__name {
  font-weight: 600;
  color: var(--text);
}

.cv-pricing-row__price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Section title — mirrors existing section headings */
.cv-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.cv-section__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.cv-section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.cv-section__sub {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* WHOIS / form inputs — match existing form style */
.cv-form {
  max-width: 600px;
  margin: 0 auto;
}

.cv-input-group {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  transition: border-color 0.2s ease;
}

.cv-input-group:focus-within {
  border-color: rgba(255,90,60,0.5);
}

.cv-input-group input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  outline: none;
}

.cv-input-group input::placeholder { color: var(--text-dim); }

.cv-input-group button {
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.cv-input-group button:hover { opacity: 0.9; }

/* Result card */
.cv-result-box {
  margin-top: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.8;
  display: none;
  font-family: "Space Mono", monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.cv-result-box.visible { display: block; }

/* Badge */
.cv-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cv-badge--green { background: rgba(34,197,94,0.15); color: #22c55e; }
.cv-badge--red   { background: rgba(239,68,68,0.15);  color: #ef4444; }
.cv-badge--blue  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.cv-badge--orange{ background: rgba(255,122,24,0.15); color: var(--secondary); }

/* Steps */
.cv-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

.cv-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.cv-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.cv-step__body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.cv-step__body p {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────
   8. RESPONSIVE TWEAKS FOR NEW ELEMENTS
   ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .cv-page-hero { padding: 5rem 1.25rem 2.5rem; }
  .cv-grid { padding: 0 1.25rem 3rem; }
  .cv-section { padding: 2rem 1.25rem; }
  .cv-pricing-row { flex-direction: column; align-items: flex-start; }
}
