/*
  styles.css
  Styling for ElSteph Insurance Brokers website.
  Designed to be modern, responsive and aligned with the ElSteph brand colours.
*/

/* CSS Reset and root variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0d2246; /* dark blue inspired by the ElSteph logo */
  --secondary-color: #6a707c; /* muted grey tone */
  --accent-color: #c79e5b; /* warm golden accent for buttons */
  --light-color: #f7f8fa; /* very light backdrop */
  --dark-color: #0a1629; /* deep navy for footers */
  --text-color: #1f2937; /* dark grey for body copy */
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-color);
}

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

/* Reusable container */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Navigation styling */
.header {
  background-color: var(--primary-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* increased padding to accommodate larger logo */
  padding: 1.5rem 0;
  min-height: 140px;
}

/* Logo container styling: white background card for contrast */
.logo {
  background-color: #ffffff;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Enlarged logo image (300% of original 42px height) */
.logo img {
  height: 126px;
  width: auto;
}

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

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

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

/* Burger icon for mobile nav */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.burger span {
  display: block;
  height: 3px;
  width: 25px;
  background-color: #ffffff;
  transition: var(--transition);
  border-radius: 3px;
}

/* Hero section */
.hero {
  position: relative;
  /* extra top padding increased to account for taller header */
  padding: 200px 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-color);
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  /* use a darker blue so the tagline remains visible against the hero artwork */
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.primary-btn {
  background-color: var(--accent-color);
  color: #ffffff;
}

.primary-btn:hover {
  background-color: darken(var(--accent-color), 10%);
}

.secondary-btn {
  background-color: var(--primary-color);
  color: #ffffff;
}

.secondary-btn:hover {
  background-color: #112a51;
}

/* Decorative swirl image inside hero */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  /* extend the hero artwork across the entire hero section */
  opacity: 0.35;
  pointer-events: none;
  overflow: hidden;
}

.hero-decoration img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  /* centre the image so the artwork spans evenly across the hero */
  object-position: center;
}

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

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* About section paragraphs */
.about p {
  max-width: 900px;
  margin: 0 auto 1rem auto;
  color: var(--secondary-color);
  font-size: 1rem;
}

/* Partners section */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2rem;
}

.partner-item {
  /* increased size to accommodate larger logos */
  flex: 0 0 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition);
}

.partner-item img {
  /* enlarge logos to double their previous height */
  max-height: 120px;
  width: auto;
  filter: grayscale(0%);
  /* smooth scaling on hover */
  transition: filter var(--transition), transform var(--transition);
}

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

.partner-item:hover img {
  filter: none;
  /* slight growth effect to make the logo feel interactive */
  transform: scale(1.25);
}

/* Why choose section */
.why-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

.why-card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition), box-shadow var(--transition);
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.why-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.why-card p {
  font-size: 0.95rem;
  color: var(--secondary-color);
}

/* Wave background for Why section */
.bg-wave {
  background-image: url('images/waves.png');
  background-size: cover;
  background-position: center;
  position: relative;
  color: var(--light-color);
}

.bg-wave .section-title {
  color: #ffffff;
}

.bg-wave .section-title::after {
  background-color: #ffffff;
}

.bg-wave .why-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bg-wave .why-card h3,
.bg-wave .why-card p {
  color: #ffffff;
}

/* Contact section */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact-info {
  color: var(--text-color);
}

.contact-info h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.contact-info p {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.contact-details li {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  list-style: none;
}

.contact-details a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-form-wrapper {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.quote-form .form-group {
  margin-bottom: 1rem;
}

.quote-form .form-group.full-width {
  grid-column: 1 / -1;
}

.quote-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--primary-color);
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccd5e0;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text-color);
  background-color: #fdfdfd;
  transition: border-color var(--transition);
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.quote-form button {
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--dark-color);
  padding: 1.5rem 0;
  text-align: center;
  color: #ffffff;
}

.footer p {
  font-size: 0.9rem;
}

/* Dark section for contact area */
.dark-section {
  background-color: var(--dark-color);
  color: #ffffff;
}

.dark-section .contact-info .section-title {
  color: #ffffff;
  /* enlarge the heading within the dark contact section for emphasis */
  font-size: 2.4rem;
}

.dark-section .contact-info p,
.dark-section .contact-info .contact-details li,
.dark-section .contact-info .contact-details a {
  color: #d1d5db;
}

.governed-by {
  margin: 1.5rem 0;
}

.governed-by h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ffffff;
}

.govern-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.gov-item {
  /* Present each regulator logo inside a dark card that matches the contact section */
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  background-color: var(--dark-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Restrict size of the regulator logos for consistency */
.gov-item img {
  height: 50px;
  width: auto;
  display: block;
  /* Keep the logos neutral and slightly subdued to blend with the design */
  filter: grayscale(100%);
  opacity: 0.9;
}

/* Checkbox group styling */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 20px;
  height: 20px;
  accent-color: var(--accent-color);
}

.checkbox-group label {
  color: var(--secondary-color);
  font-size: 0.85rem;
  line-height: 1.4;
}

.checkbox-group label a {
  color: var(--accent-color);
  text-decoration: underline;
}

.checkbox-group .required {
  font-style: italic;
  color: #e5e7eb;
  font-size: 0.8rem;
}

/* Responsive behaviour */
@media (max-width: 850px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background-color: var(--primary-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform var(--transition);
    gap: 1.5rem;
  }
  .nav-links a {
    font-size: 1.2rem;
  }
  .nav-links.active {
    transform: translateX(0);
  }
  .burger {
    display: flex;
  }
  body.nav-open {
    overflow: hidden;
  }
}

/* Utility classes for reveals (used by script) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}