/* Global Styles for SecurityPlus Website */

/* Reset defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Colour palette using CSS variables */
:root {
  --primary-color: #0a192f;       /* dark navy used for headers and cards */
  --secondary-color: #1f2937;     /* background of pages */
  --accent-color: #10b981;        /* teal green used for CTAs and highlights */
  --light-color: #f9fafb;         /* very light background */
  --text-color: #f3f4f6;          /* near‑white body text */
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation bar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .logo img {
  height: 50px;
}

nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav .nav-links li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav .nav-links li a:hover {
  color: var(--accent-color);
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  width: 30px;
  height: 30px;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background-color: var(--text-color);
  height: 3px;
  border-radius: 3px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  width: 100%;
}

/* Responsive behaviour */
@media (max-width: 768px) {
  nav .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in;
  }
  nav .nav-links li {
    margin: 1rem 0;
  }
  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    max-height: 500px;
  }
  .nav-toggle-label {
    display: flex;
  }
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 6rem 1rem;
  color: var(--light-color);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

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

.cta-buttons a {
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.cta-buttons .primary {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.cta-buttons .primary:hover {
  background-color: #0e9b6c;
}

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

.cta-buttons .secondary:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* Generic section styling */
.section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--light-color);
  font-size: 2rem;
}

/* Cards for lists of items */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--primary-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s;
}

.card img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--light-color);
  font-size: 1.25rem;
}

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

.card:hover {
  transform: translateY(-5px);
}

/* Feature rows used on service and infrastructure pages */
.feature {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature img {
  width: 250px;
  border-radius: 8px;
}

.feature:nth-child(even) {
  flex-direction: row-reverse;
}

@media (max-width: 768px) {
  .feature {
    flex-direction: column;
    text-align: center;
  }
  .feature img {
    width: 100%;
  }
}

/* Plans layout */
.plans {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.plan-card {
  background-color: var(--primary-color);
  padding: 2rem;
  border-radius: 8px;
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  text-align: center;
}

.plan-card h3 {
  margin-bottom: 0.5rem;
  color: var(--light-color);
  font-size: 1.5rem;
}

.plan-card .price {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  font-weight: bold;
}

.plan-card ul {
  list-style: none;
  margin-bottom: 1rem;
  text-align: left;
  padding-left: 0;
}

.plan-card li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.plan-card li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.plan-card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  background-color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.plan-card a:hover {
  background-color: #0e9b6c;
}

/* Form styling */
form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--primary-color);
  padding: 2rem;
  border-radius: 8px;
}

form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: bold;
  color: var(--light-color);
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 4px;
}

form button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  transition: background-color 0.3s;
}

form button:hover {
  background-color: #0e9b6c;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-color);
}

footer p {
  margin-bottom: 0.5rem;
}

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

footer a:hover {
  text-decoration: underline;
}