/* layout.css — Apex Cyberhub design system (global) */

/* Tokens */
:root {
  --primary: #0066CC;
  --primary-2: #1A7FE6;
  --accent: #FFB400;
  --cyan: #00B8E6;

  --bg: #F5F7FB;
  --card: #FFFFFF;
  --card-alt: #F8FAFF;
  --text: #0B1220;
  --muted: #5B6B7A;
  --border: rgba(11, 18, 32, 0.08);
  --border-strong: rgba(11, 18, 32, 0.14);

  --radius: 18px;
  --container: 1200px;
  --shadow-lg: 0 18px 40px rgba(2, 6, 23, 0.12);
  --shadow-md: 0 8px 20px rgba(2, 6, 23, 0.08);

  --transition: 180ms ease;
}

html[data-theme="dark"] {
  --bg: #071018;
  --card: #0F1720;
  --card-alt: rgba(255, 255, 255, 0.04);
  --text: #E6EEF6;
  --muted: #9AA4B2;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

/* Container */
.container {
  width: min(100% - 24px, var(--container));
  margin: 0 auto;
  padding: 0;
}

/* Theme Toggle Text */
.theme-blue {
  color: #007bff !important;
  font-weight: 800 !important;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(11, 18, 32, 0.08);
}

html[data-theme="dark"] .navbar {
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.85), rgba(15, 23, 32, 0.65));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: auto;
  height: 60px;
  max-width: 180px;
  border-radius: 14px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Mobile nav (improved professional dropdown) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* --- REPLACED MOBILE RULES START --- */
@media (max-width: 900px) {
  /* Dropdown container */
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    right: 16px;
    width: 320px;                    /* comfortable width */
    max-width: calc(100% - 32px);
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--card), var(--card-alt));
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
    transition: transform 220ms ease, opacity 220ms ease;
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
    z-index: 9999;
    border: 1px solid var(--border-strong);
  }

  .nav-links.open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* Menu items: increased tap area and spacing */
  .nav-links a {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.04rem;
    line-height: 1.6;                /* increased line spacing */
    color: var(--text);
    background: transparent;
    border-radius: 10px;
    text-decoration: none;
    display: block;
    transition: background 160ms ease, transform 120ms ease;
  }

  /* Optional subtle separators and breathing room */
  .nav-links a + a {
    margin-top: 6px;
  }

  .nav-links a:hover {
    background: rgba(0, 102, 204, 0.06);
    color: var(--primary);
    transform: translateY(-2px);
  }

  /* Make the sign-in CTA stand out inside the dropdown */
  .nav-links a.btn.small {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 12px 30px rgba(10, 90, 180, 0.12);
    text-align: center;
    font-weight: 800;
    border-radius: 10px;
  }

  /* Slightly reduce logo height on small screens for balance */
  .logo {
    height: 56px;
    max-height: 56px;
  }
}
/* --- REPLACED MOBILE RULES END --- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition),
    color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 24px rgba(10, 90, 180, 0.18);
  border: none;
}

.btn-secondary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 16px rgba(10, 90, 180, 0.12);
  border: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid rgba(0, 102, 204, 0.18);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(11, 18, 32, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
}

.btn.small {
  padding: 10px 14px;
  font-size: 14px;
}

#themeBtn {
  background: #007bff !important;
  color: #fff !important;
  font-weight: 800 !important;
  border: none !important;
}

/* Footer */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  margin-top: 40px;
}

/* Utilities */
.section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(2rem, 2.2vw, 2.6rem);
  margin-bottom: 12px;
  line-height: 1.1;
}

.section-text {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 1rem;
}

.alt {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent);
  border-top: 1px solid rgba(11, 18, 32, 0.02);
}

:focus {
  outline: 3px solid rgba(0, 119, 204, 0.18);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 100px 0 60px;
  background: linear-gradient(180deg, rgba(0, 96, 186, 0.16), rgba(255, 255, 255, 0));
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(0, 184, 230, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 180, 0, 0.12), transparent 24%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 640px;
  padding: 24px 0;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 102, 204, 0.12);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 4.5vw, 4.8rem);
  line-height: 1.03;
  margin: 0 0 24px;
}

.hero-copy p {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 0;
  overflow: hidden;
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.hero-card img {
  width: 120px;
  height: 120px;
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: cover;
  min-width: 0;
}

.card-copy {
  min-width: 0;
}

.card-copy h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* About + Stats */
.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 18px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  background: var(--card);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card strong {
  display: block;
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-card span {
  color: var(--muted);
}

/* Services */
.section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-heading .subheading {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: inline-block;
}

services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

service-card {
  background: var(--card);
  border-radius: 24px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 20px;
}

service-card h3 {
  margin: 0 0 14px;
  font-size: 1.4rem;
}

service-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.75;
}

/* Booking CTA */
.split-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(180deg, rgba(0, 102, 204, 0.08), rgba(255, 255, 255, 0.98));
  padding: 40px;
  border-radius: 32px;
  border: 1px solid rgba(0, 102, 204, 0.12);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  margin: 0 auto;
}

html[data-theme="dark"] .split-panel {
  background: linear-gradient(180deg, rgba(0, 119, 255, 0.06), rgba(15, 23, 32, 0.95));
  border-color: rgba(255, 255, 255, 0.1);
}

.panel-content h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 18px;
}

.panel-content p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
}

.panel-image img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--card);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.testimonial-card p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 20px;
}

.testimonial-card span {
  display: block;
  font-weight: 700;
  color: var(--primary);
}

/* CTA Banner */
.cta-section {
  padding: 80px 0;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  background: linear-gradient(90deg, rgba(0, 119, 255, 0.12), rgba(255, 255, 255, 0.95));
  border-radius: 32px;
  border: 1px solid rgba(0, 119, 255, 0.16);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  margin: 0 auto;
}

html[data-theme="dark"] .cta-card {
  background: linear-gradient(90deg, rgba(0, 119, 255, 0.08), rgba(15, 23, 32, 0.95));
  border-color: rgba(255, 255, 255, 0.12);
}

.cta-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.cta-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.75;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader-logo {
  width: 180px;
  z-index: 10;
  animation: logoPulse 2s infinite ease-in-out;
  filter: drop-shadow(0 20px 40px rgba(0, 102, 204, 0.2));
}

.ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 6px solid rgba(0, 123, 255, 0.55);
  border-radius: 50%;
  animation: rotate 2.2s linear infinite;
  opacity: 0.65;
  box-shadow: 0 0 40px rgba(0, 123, 255, 0.18);
}

.ring2 {
  position: absolute;
  width: 240px;
  height: 240px;
  border: 4px solid rgba(0, 196, 255, 0.7);
  border-radius: 50%;
  animation: rotateReverse 1.6s linear infinite;
  opacity: 0.75;
  box-shadow: 0 0 30px rgba(0, 196, 255, 0.2);
}

.pulse {
  position: absolute;
  width: 110px;
  height: 110px;
  background: rgba(0, 123, 255, 0.18);
  border-radius: 50%;
  animation: pulse 1.8s infinite ease-in-out;
  opacity: 0.55;
  box-shadow: 0 0 60px rgba(0, 123, 255, 0.16);
}

/* Animations */
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.95;
  }
}

@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-inner,
  .split-panel,
  .grid-two,
  .services-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-card img {
    margin: 0 auto 20px;
  }

  .cta-card {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    justify-content: center;
  }

  .split-panel {
    padding: 32px;
    gap: 24px;
  }
}

@media (max-width: 900px) {
  .hero-section,
  .section,
  .cta-section,
  .booking-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-card {
    gap: 16px;
    padding: 20px;
  }

  .hero-card img {
    width: 100px;
    height: 100px;
  }

  .card-copy h3 {
    font-size: 1rem;
  }

  .card-copy p {
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) {
  .hero-section {
    padding: 64px 0 40px;
  }

  .section {
    padding: 56px 0;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .hero-cards {
    gap: 16px;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    right: 16px;
    top: 72px;
    width: calc(100% - 32px);
    max-width: none;
  }

  .nav-links a {
    padding: 12px 16px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-card img {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto 18px;
  }

  .card-copy h3 {
    font-size: 1rem;
  }

  .card-copy p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .split-panel {
    padding: 24px;
    gap: 18px;
  }

  .cta-card {
    padding: 24px;
    gap: 16px;
  }

  .cta-copy h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 520px) {
  .hero-copy h1 {
    font-size: 2.1rem;
  }

  .hero-card {
    padding: 16px;
    gap: 12px;
  }

  .hero-card img {
    max-width: 160px;
    border-radius: 18px;
  }

  .hero-copy p,
  .panel-content p,
  .testimonial-card p {
    font-size: 0.98rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .services-grid {
    gap: 18px;
  }
}