/*
  InsureMyHome.Online - Shared Stylesheet
  Company: Maverick Ventures Inc.
*/

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

/* --- Root Variables --- */
:root {
  --primary-color: #005A9C; /* Professional Blue */
  --secondary-color: #F7F9FC; /* Light Gray Background */
  --accent-color: #FFC107; /* Bright Yellow for CTAs */
  --text-color: #333;
  --heading-color: #003D6B; /* Darker Blue for Headings */
  --white-color: #FFFFFF;
  --footer-bg: #2d3748;
  --success-color: #28a745;
}

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  margin-bottom: 0.75rem;
  line-height: 1.2;
  font-weight: 600;
}

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

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

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header & Navigation --- */
.site-header {
  background: var(--white-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

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

.logo-link img {
  height: 50px;
}

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

.main-nav a {
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--heading-color);
  transition: all 0.3s ease;
}

/* --- Shared Components --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background-color: var(--heading-color);
  color: var(--white-color);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--heading-color);
  font-size: 1.2rem;
  padding: 15px 35px;
}

.btn-accent:hover {
  background-color: #ffb300;
  color: var(--heading-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.section {
  padding: 60px 0;
}

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

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
  color: #6c757d;
}

/* --- Hero Section --- */
.hero {
  background: var(--primary-color);
  color: var(--white-color);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  color: var(--white-color);
  font-size: 3.5rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 1rem auto 2rem;
  opacity: 0.9;
}

/* --- Services Grid (Home Page) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.service-card .icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-card .icon img {
    width: 35px;
    height: 35px;
}


.service-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

/* --- About & Content Pages --- */
.content-page {
    padding: 60px 0;
}
.content-page .container {
    max-width: 800px;
}
.content-page h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-align: center;
}
.content-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}
.content-page p, .content-page ul {
    margin-bottom: 1rem;
}
.content-page ul {
    padding-left: 20px;
}

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}
.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.contact-info strong {
    color: var(--heading-color);
}

/* --- Home Page CTA Section --- */
.cta-section {
  text-align: center;
}
.cta-section h2 {
  font-size: 2.2rem;
}
.cta-section p {
  max-width: 600px;
  margin: 1rem auto 2rem;
}

/* --- Affiliate Page --- */
.affiliate-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-color);
}

.affiliate-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Using a photographic placeholder with a dark fallback color. */
  /* This ensures text is readable even if the image fails to load. */
  background: var(--heading-color) url('https://picsum.photos/seed/familyhome/1920/1080') no-repeat center center/cover;
  filter: brightness(0.5);
  z-index: -1;
}

.affiliate-hero-content {
  max-width: 800px;
  padding: 20px;
}

.affiliate-hero-content h1 {
  font-size: 3.5rem;
  color: var(--white-color);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.affiliate-hero-content .subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.disclaimer {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: 1rem;
}

.reviews-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.review-card {
  background-color: var(--white-color);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.review-card p {
  font-style: italic;
  margin-bottom: 1rem;
}

.review-author {
  display: flex;
  align-items: center;
}

.review-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.author-info strong {
  display: block;
  color: var(--heading-color);
}

.star-rating {
  color: var(--accent-color);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--footer-bg);
  color: #a0aec0;
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-grid h4 {
  color: var(--white-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-grid ul {
  list-style: none;
}

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

.footer-grid a {
  color: #a0aec0;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #4a5568;
  text-align: center;
}

.footer-affiliate-disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    font-style: italic;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 81px; /* Height of header */
    left: 0;
    background: var(--white-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 0;
  }

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

  .main-nav a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
  }

  .main-nav a::after {
      display: none;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero h1, .affiliate-hero-content h1 {
    font-size: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .footer-grid {
    text-align: center;
  }

  .footer-grid ul {
      padding-left: 0;
  }

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

  .affiliate-hero-content .subtitle {
    font-size: 1.2rem;
  }
}