/* ============================================
   SOPHOS FIRE SYSTEMS - MAIN STYLESHEET
   ============================================ */

/* CSS Variables */
:root {
  --sophos-red: #B10F18;
  --sophos-red-dark: #8B0C13;
  --sophos-red-light: #D41219;
  --charcoal: #2D2D2D;
  --light-gray: #F5F5F5;
  --medium-gray: #E0E0E0;
  --text-dark: #333333;
  --white: #FFFFFF;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, #A00D15, var(--sophos-red));
  box-shadow: var(--shadow);
}

.header-top {
  background-color: var(--white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--medium-gray);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container img {
  height: 140px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .brand {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.5px;
}

.logo-text .tagline {
  font-size: 0.85rem;
  color: var(--text-dark);
  letter-spacing: 2px;
  font-weight: 400;
}

.nav-bar {
  padding: 0.75rem 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links li a {
  color: var(--white);
  padding: 0.75rem 1.5rem;
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links li a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--white);
}

.cta-button {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 0.65rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.cta-button:hover {
  background-color: var(--white);
  color: var(--sophos-red);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  padding: 0.5rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--charcoal);
}

.hero-background {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-bg-panel {
  background-size: cover;
  background-position: center;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45, 45, 45, 0.85), rgba(177, 15, 24, 0.4));
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 120px;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--white);
  max-width: 1000px;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-button {
  background-color: var(--sophos-red);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: var(--shadow-lg);
}

.hero-button:hover {
  background-color: var(--sophos-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(177, 15, 24, 0.4);
}

/* ============================================
   SERVICES GRID
   ============================================ */

.services-section {
  padding: 5rem 0;
  background-color: var(--light-gray);
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--charcoal);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.service-tile {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.service-image {
  position: relative;
  height: 240px;
  background-size: cover;
  background-position: center;
  background-color: var(--medium-gray);
}

.service-content {
  background-color: var(--sophos-red);
  color: var(--white);
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-button {
  background-color: var(--sophos-red-dark);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

.service-button:hover {
  background-color: #6B0A0F;
}

/* ============================================
   SERVICE DETAIL PAGE
   ============================================ */

.service-hero {
  background: linear-gradient(135deg, var(--sophos-red), var(--sophos-red-dark));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.service-hero h1 {
  font-size: 3rem;
  font-weight: 700;
}

.service-detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.detail-section {
  margin-bottom: 4rem;
}

.detail-section h2 {
  font-size: 2rem;
  color: var(--sophos-red);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--sophos-red);
}

.detail-section h3 {
  font-size: 1.5rem;
  color: var(--charcoal);
  margin: 1.5rem 0 1rem;
}

.detail-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.detail-section ul {
  list-style-position: inside;
  margin-left: 1rem;
}

.detail-section li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.cta-block {
  background: linear-gradient(135deg, var(--sophos-red), var(--sophos-red-dark));
  color: var(--white);
  padding: 3rem;
  border-radius: 8px;
  text-align: center;
  margin: 4rem 0;
}

.cta-block h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--white);
  border: none;
}

.cta-block p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
  padding: 1rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.1rem;
}

.cta-primary {
  background-color: var(--white);
  color: var(--sophos-red);
}

.cta-primary:hover {
  background-color: var(--light-gray);
}

.cta-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.cta-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   FORMS (Contact & Quote)
   ============================================ */

.form-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.form-section h1 {
  font-size: 2.5rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
  text-align: center;
}

.form-section .intro {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

.contact-form {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--sophos-red);
  box-shadow: 0 0 0 3px rgba(177, 15, 24, 0.1);
}

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

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
}

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

.submit-button {
  background-color: var(--sophos-red);
  color: var(--white);
  padding: 1rem 3rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
  margin-top: 1rem;
}

.submit-button:hover {
  background-color: var(--sophos-red-dark);
}

.success-message {
  display: none;
  background-color: #4CAF50;
  color: var(--white);
  padding: 1.5rem;
  border-radius: 4px;
  text-align: center;
  margin-top: 1rem;
  font-weight: 600;
}

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

/* ============================================
   CONTENT PAGES (About, Careers, Resources)
   ============================================ */

.page-header {
  background: linear-gradient(135deg, var(--sophos-red), var(--sophos-red-dark));
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 2rem;
  color: var(--sophos-red);
  margin-bottom: 1.5rem;
}

.content-section h3 {
  font-size: 1.5rem;
  color: var(--charcoal);
  margin: 1.5rem 0 1rem;
}

.content-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section ul,
.content-section ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.info-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.info-card h3 {
  color: var(--sophos-red);
  margin-bottom: 1rem;
}

.job-listing {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--sophos-red);
}

.job-listing h3 {
  color: var(--sophos-red);
  margin-bottom: 0.5rem;
}

.job-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.apply-button {
  background-color: var(--sophos-red);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin-top: 1rem;
}

.apply-button:hover {
  background-color: var(--sophos-red-dark);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.resource-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.resource-card h3 {
  color: var(--sophos-red);
  margin-bottom: 1rem;
}

.download-link {
  color: var(--sophos-red);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}

.download-link:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand img {
  height: 50px;
  width: auto;
}

.footer-brand-text .brand {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand-text .tagline {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.contact-info {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--sophos-red);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--sophos-red);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.active {
    max-height: 500px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .cta-button {
    margin: 1rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .form-row,
  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .cta-primary,
  .cta-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .logo-text .brand {
    font-size: 1.8rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }
}
