/* Apex Managed Services - Modern MSP Website Styles */

:root {
  --primary: #ea580c;          /* Orange */
  --primary-dark: #c2410c;     /* Darker orange */
  --primary-light: #f97316;    /* Lighter orange */
  --accent: #f97316;           /* Accent orange */
  --accent-dark: #ea580c;
  --text: #1f2937;             /* Dark grey */
  --text-light: #4b5563;       /* Medium-dark grey */
  --text-muted: #6b7280;       /* Medium grey */
  --bg: #ffffff;
  --bg-alt: #f3f4f6;           /* Light grey */
  --bg-dark: #374151;          /* Medium-dark grey */
  --border: #d1d5db;           /* Medium-light grey */
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-white {
  background: white;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--bg-alt);
  color: var(--primary-dark);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.logo-img {
  height: 90px;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.footer .logo {
  display: inline-block;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  line-height: 0;
}

.footer .logo-img {
  height: 68px;
  width: auto;
  max-width: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phone-link {
  font-weight: 600;
  color: var(--text);
  display: none;
}

@media (min-width: 900px) {
  .phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Nav */
@media (max-width: 899px) {
  .logo-img {
    height: 58px;
    max-width: 280px;
  }

  .header-inner {
    min-height: 76px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-cta .btn {
    display: none;
  }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1f2937 0%, #374151 45%, #ea580c 140%);
  color: white;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(234, 88, 12, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(249, 115, 22, 0.25);
  color: #fdba74;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 1.6;
}

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

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat {
  text-align: left;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.12), rgba(249, 115, 22, 0.18));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--primary);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.service-card a {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Why Us / Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.feature {
  display: flex;
  gap: 16px;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.testimonial-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.testimonial-text {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.author-info strong {
  display: block;
  font-weight: 600;
}

.author-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 64px 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 0 24px;
}

.cta-banner h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 28px;
  font-size: 1.1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

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

.about-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.about-list {
  margin-top: 24px;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text);
}

.about-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.about-image {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  padding: 24px;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.team-card {
  text-align: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
}

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

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

.contact-info h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-light);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  background: rgba(234, 88, 12, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.contact-item strong {
  display: block;
  margin-bottom: 2px;
}

.contact-item span,
.contact-item a {
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-form-wrapper {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.contact-form-wrapper h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-form-wrapper > p {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success.show {
  display: block;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 20px;
}

.form-success h3 {
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-light);
}

/* Page Hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, #1f2937 0%, #374151 60%, #ea580c 160%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Footer */
.footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

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

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

.footer-brand .logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.footer a {
  color: #9ca3af;
  font-size: 0.95rem;
}

.footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
  color: #6b7280;
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-0 {
  margin-bottom: 0;
}