/* ===================================================
   ITaaS - IT as a Service, LLC
   Static site stylesheet - matches Fortuna theme styling
   Fonts: Montserrat (headings) + Lato (body)
   Accent: #fa4616 (orange)
   =================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --primary-dark: #011224;
  --primary-accent: #fa4616;
  --text-dark: #333333;
  --text-light: #f7f7f7;
  --text-muted: #6b6b6b;
  --bg-light: #f9f9f9;
  --border-light: #eeeeee;
  --white: #ffffff;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Lato', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
}

/* Lowercase text-transform throughout, matching Fortuna theme */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 100;
  text-transform: lowercase;
}

/* Bold/strong headings get the accent color */
h1 strong, h2 strong, h3 strong, h4 strong, h5 strong {
  color: var(--primary-accent);
}

p { font-weight: 400; }

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

a:hover { color: #d63a12; }

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

ul { list-style: none; }

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

/* ===================================================
   HEADER - Transparent style matching Fortuna theme
   =================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Solid background when scrolled */
.site-header.scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo - pushed slightly left of the main content area */
.site-logo img {
  height: auto;
  max-height: 155px;
  width: auto;
  padding: 10px 0;
  transition: max-height 0.3s ease;
  margin-left: -40px;
}

.site-header.scrolled .site-logo img {
  max-height: 120px;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 10px;
  align-items: center;
}

.main-nav a {
  color: #0021a5;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 100;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  padding: 8px 15px;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--primary-accent);
}

/* "Get support" button style in nav */
.main-nav .nav-btn a {
  border: 2px solid #0021a5;
  border-radius: 4px;
  padding: 8px 20px;
  color: #0021a5;
  transition: all 0.3s ease;
}

.main-nav .nav-btn a:hover {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: var(--white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-accent);
  margin: 5px 0;
  transition: 0.3s;
}

/* Spacer to push content below fixed header */
.header-spacer {
  height: 147px;
}

/* ===================================================
   SERVICE PILLARS - 3 column cards on homepage
   =================================================== */
.services-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.service-card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 40px 30px;
  text-align: center;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 450px;
}

/* Service card headings should stay capitalized */
.service-card h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--text-light);
  text-transform: none;
}

.service-card .card-divider {
  width: 50px;
  height: 1px;
  background: var(--text-muted);
  margin: 35px auto 20px;
}

/* Show bullet points on service card lists */
.service-card ul {
  text-align: left;
  margin: 0 auto;
  padding: 20px 10px 20px 30px;
  flex-grow: 1;
  list-style: disc;
}

.service-card li {
  padding: 5px 0;
  font-weight: 400;
  font-size: 0.95rem;
  list-style: disc;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 25px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-outline {
  border-color: var(--text-dark);
  color: var(--text-dark);
  background: transparent;
}

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

.btn-outline-light {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: transparent;
}

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

/* Submit button - orange text and border, transparent bg
   On hover: orange bg, white text */
.btn-accent {
  background-color: transparent;
  border: 1px solid var(--primary-accent);
  color: var(--primary-accent);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1em;
  text-transform: lowercase;
  border-radius: 4px;
  padding: 10px 15px;
}

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

/* ===================================================
   CLIENT LOGOS - Auto-scrolling carousel
   Uses CSS animation to continuously scroll logos
   =================================================== */
.client-logos-section {
  padding: 20px 0;
  border-top: 2px solid var(--border-light);
  border-bottom: 2px solid var(--border-light);
  overflow: hidden;
}

/* The track holds two copies of logos side by side for seamless loop */
.client-logos-track {
  display: flex;
  align-items: center;
  gap: 50px;
  animation: scroll-logos 20s linear infinite;
  width: max-content;
}

.client-logos-track img {
  height: 50px;
  max-width: 120px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  object-fit: contain;
  flex-shrink: 0;
}

.client-logos-track img:hover {
  opacity: 1;
}

/* Pause scrolling when user hovers over the carousel */
.client-logos-section:hover .client-logos-track {
  animation-play-state: paused;
}

/* Keyframes: slide the track left by half its width (one full set of logos) */
@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================================================
   CONTACT / SUPPORT PAGE - Hero section
   Matches old WP Fortuna theme: transparent header overlaps hero,
   text in left 1/3 (vc_col-sm-4), rest empty
   =================================================== */

/* Transparent header variant - used on contact/support pages
   Header sits on top of the hero content like the old WP site */
.site-header.transparent-header {
  background: rgba(255, 255, 255, 0.85);
}

.site-header.transparent-header.scrolled {
  background: rgba(255, 255, 255, 1);
}

/* Nav link colors for transparent header - blue like old site */
.transparent-header .main-nav a {
  color: #0021a5;
}

.transparent-header .main-nav a:hover {
  color: var(--primary-accent);
}

.transparent-header .main-nav .nav-btn a {
  border-color: #0021a5;
  color: #0021a5;
}

.transparent-header .main-nav .nav-btn a:hover {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: var(--white);
}

/* Page hero - matches old WP site's vc_row with 75px top/bottom padding
   Text sits in left 1/3 column, rest is empty space.
   Top padding includes space for the fixed transparent header.
   Background image (sdad.jpg) extends from top of page behind the header,
   with a translucent white overlay so text stays readable */
.page-hero {
  padding: 75px 0;
  padding-top: calc(147px + 40px);
  position: relative;
  background: url('../images/sdad.jpg') center center / cover no-repeat;
}

/* Translucent white overlay on top of the background image */
.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(247, 247, 247, 0.40);
  z-index: 0;
  pointer-events: none;
}

/* Keep hero content above the overlay */
.page-hero .container {
  position: relative;
  z-index: 1;
}

/* Hero content constrained to left 1/3 like old WP vc_col-sm-4 */
.page-hero-content {
  max-width: 33.333%;
}

.page-hero-content h2 {
  font-size: 44px;
  color: var(--text-dark);
  margin-bottom: 0;
  text-transform: none;
}

.page-hero-content .hero-divider {
  width: 100px;
  height: 2px;
  background: #f4f4f4;
  margin: 24px 0;
}

.page-hero-content p {
  color: var(--text-muted);
}

/* Legacy .contact-hero kept for any other pages still using it */
.contact-hero {
  padding: 40px 0;
}

/* Service page hero - full background image with translucent overlay,
   transparent header overlaps from top, text in left column.
   Same approach as page-hero but uses workplace.jpg */
.service-hero {
  position: relative;
  padding: 50px 0;
  padding-top: calc(147px + 5px);
  min-height: 350px;
  overflow: hidden;
  background: url('../images/workplace.jpg') center center / cover no-repeat;
}

/* Translucent white overlay so text stays readable */
.service-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(247, 247, 247, 0.40);
  z-index: 0;
  pointer-events: none;
}

/* Keep hero content above the overlay */
.service-hero .container {
  position: relative;
  z-index: 1;
}

/* Left column: text content constrained to 1/3 like old WP vc_col-sm-4 */
.service-hero .hero-text-col {
  max-width: 33.333%;
}

/* Right column no longer needed - hide it */
.service-hero .hero-image-col {
  display: none;
}

.service-hero h2 {
  font-size: 44px;
  color: var(--text-dark);
  margin-bottom: 0;
  text-transform: none;
}

.service-hero .hero-divider {
  width: 100px;
  height: 2px;
  background: #f4f4f4;
  margin: 24px 0;
}

/* "Talk to our experts" button on service pages - orange text and border */
.service-hero .btn-accent {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
}

.service-hero .btn-accent:hover {
  background: var(--primary-accent);
  color: var(--white);
  border-color: var(--primary-accent);
}

.service-hero p {
  color: var(--text-muted);
}

/* Legacy contact-hero heading styles (kept for compatibility) */
.contact-hero h2 {
  font-size: 44px;
  color: var(--text-dark);
  margin-bottom: 0;
  text-transform: none;
}

.contact-hero .hero-divider {
  width: 100px;
  height: 2px;
  background: #f4f4f4;
  margin: 24px 0;
}

.contact-hero p {
  color: var(--text-muted);
  max-width: 500px;
}

/* Full-width background image band between hero and forms
   Matches the old WordPress site's sdad.jpg background section */
.contact-bg-image {
  width: 100%;
  height: 300px;
  background: url('../images/sdad.jpg') center center / cover no-repeat;
  margin-bottom: 0;
}

/* Tabs */
.tabs {
  margin: 60px 0;
}

.tab-buttons {
  display: flex;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 0;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.3s ease;
  border-top: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-dark);
}

.tab-btn.active {
  color: var(--text-dark);
  border-top-color: var(--primary-accent);
  background: var(--bg-light);
}

.tab-content {
  display: none;
  max-width: 700px;
}

.tab-content.active {
  display: block;
}

/* ===================================================
   CONTACT FORMS - Styling for all form types
   Matches the WPForms styling from the original WordPress site
   =================================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Two-column row for side-by-side fields (matches wpforms-one-half) */
.form-row {
  display: flex;
  gap: 20px;
}

.form-row > div {
  flex: 1;
}

/* Labels match WPForms: bold 16px */
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 4px;
}

/* Sub-labels (e.g. "First" / "Last" under name fields) */
.contact-form .field-sublabel {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 4px;
  color: var(--text-muted);
}

/* Required asterisk in red like WPForms */
.contact-form label .required {
  color: #ff0000;
  font-weight: 400;
}

/* Form inputs match WPForms: 1px solid #ccc, 2px radius, 16px font, 38px height */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  max-width: 100%;
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid #ccc;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 16px;
  border-radius: 2px;
  height: 38px;
  line-height: 1.3;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

/* Focus state matches WPForms: darker border, no box-shadow */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border: 1px solid #999;
  box-shadow: none;
}

/* Textarea: auto height, resizable, matches WPForms medium = 120px */
.contact-form textarea {
  height: 120px;
  min-height: 38px;
  resize: vertical;
}

/* Submit button container spacing matches WPForms */
.contact-form .btn {
  align-self: flex-start;
  margin-top: 10px;
}

/* Honeypot field - hidden from real users, catches bots */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Form status messages */
.form-status {
  padding: 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

/* Support page form wrapper - half width matching old site (vc_col-sm-6) */
.support-form-wrap {
  max-width: 50%;
  padding: 60px 0;
}

.form-status.success {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  display: block;
}

.form-status.error {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  display: block;
}

/* ===================================================
   SERVICES DETAIL PAGES
   =================================================== */

/* "Why move to the Cloud?" banner - matches original site overlay color */
.cloud-banner {
  background: rgba(1, 18, 36, 0.85);
  position: relative;
  padding: 80px 20px;
  text-align: center;
  margin: 0 0 40px 0;
}

.cloud-banner .container {
  position: relative;
  z-index: 1;
}

.cloud-banner h2 {
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1.4;
  text-transform: none;
}

/* Make the numbered items (1, 2, 3...) orange to match the accent */
.cloud-banner h2 strong {
  color: var(--primary-accent);
}

/* Service detail content area below the banner */
.service-detail {
  padding: 60px 0;
}

.service-detail h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-dark);
  text-transform: none;
}

/* Two-column layout: content left, key takeaways right */
.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Service description items (left column) */
.service-desc-item {
  margin-bottom: 25px;
}

.service-desc-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
  text-transform: none;
}

.service-desc-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Key Takeaway boxes (right column) */
.key-takeaway {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 40px;
}

.key-takeaway .takeaway-icon {
  color: var(--primary-accent);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.key-takeaway h3 {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 4px;
  text-transform: lowercase;
}

.key-takeaway p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Logo gallery grid for cloud page (MS app icons) */
.app-logo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.app-logo-gallery img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Divider line used in service detail sections */
.section-divider {
  width: 60px;
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

/* Legacy grid-based service list (kept for compatibility) */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.service-item {
  padding: 30px;
  background: var(--bg-light);
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--primary-accent);
}

.service-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===================================================
   FOOTER - Simple centered footer matching live site
   =================================================== */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 20px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

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

/* ===================================================
   404 PAGE
   =================================================== */
.page-404 {
  text-align: center;
  padding: 100px 20px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-404 h1 {
  font-size: 5rem;
  color: var(--primary-accent);
}

.page-404 p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 20px 0 30px;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 992px) {
  .services-pillars {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .contact-hero h2 {
    font-size: 32px;
  }

  /* Page hero text goes full width on smaller screens */
  .page-hero-content {
    max-width: 100%;
  }

  .page-hero-content h2 {
    font-size: 32px;
  }

  /* Stack the two-column service detail layout on smaller screens */
  .service-detail-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Stack hero columns on smaller screens */
  .service-hero .hero-text-col {
    max-width: 100%;
  }

  /* Support form goes full width on smaller screens */
  .support-form-wrap {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Show mobile menu toggle, hide desktop nav */
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 15px;
  }

  .header-spacer {
    height: 80px;
  }

  .site-logo img {
    height: 60px;
  }

  /* Adjust page-hero top padding for shorter mobile header */
  .page-hero {
    padding-top: calc(80px + 30px);
  }

  .tab-buttons {
    flex-direction: column;
  }

  .tab-btn {
    text-align: left;
    border-top: none;
    border-left: 2px solid transparent;
  }

  .tab-btn.active {
    border-top: none;
    border-left-color: var(--primary-accent);
  }

  .client-logos-track img {
    height: 35px;
    max-width: 80px;
  }
}
