/* ============================================
   Artistic Homes - Home Warranty Company
   Professional, responsive styles
   ============================================ */

:root {
  --primary: #1e3a5f;
  --primary-dark: #152a45;
  --primary-light: #2d4a6f;
  --accent: #2e7d32;
  --accent-light: #4caf50;
  --accent-dark: #1b5e20;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #adb5bd;
  --gray-500: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --shadow: 0 4px 20px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 10px 40px rgba(30, 58, 95, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto 1rem;
  color: var(--gray-500);
}

/* ========== Header & Navigation ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(30, 58, 95, 0.06);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-desktop a {
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--gray-800);
  border-radius: var(--radius);
}

.nav-desktop a:hover {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-desktop .btn {
  margin-left: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: var(--white) !important;
  border-radius: var(--radius);
}

.nav-desktop .btn:hover {
  background: var(--accent-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 2rem;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.nav-mobile.active {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 1rem;
  font-weight: 500;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-200);
}

.nav-mobile .btn {
  margin: 1rem;
  text-align: center;
  background: var(--accent);
  color: var(--white) !important;
  border-radius: var(--radius);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80') center/cover no-repeat;
  opacity: 0.25;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-content h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-content p {
  color: rgba(255,255,255,0.95);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-buttons .btn-accent {
  background: var(--accent);
  color: var(--white);
}

.hero-buttons .btn-outline {
  border-color: var(--white);
  color: var(--white);
}

.hero-buttons .btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* ========== Trust badges ========== */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 1.5rem 0;
  background: var(--off-white);
  border-top: 1px solid var(--gray-200);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.trust-badge svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

/* ========== Coverage plans grid ========== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.plan-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--gray-200);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.plan-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.plan-card-body {
  padding: 1.5rem;
}

.plan-card h3 {
  margin-bottom: 0.5rem;
}

.plan-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ========== Why Choose ========== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.why-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.why-card:hover {
  transform: translateY(-4px);
}

.why-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.75rem;
}

.why-card h3 {
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* ========== How it works ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 2rem;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  counter-increment: step;
}

.step-card::before {
  content: counter(step);
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-card h3 {
  margin-bottom: 0.5rem;
}

.step-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========== Testimonials ========== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.testimonial-card .stars {
  color: #f59e0b;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.testimonial-card blockquote {
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--primary);
}

.testimonial-card .location {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ========== CTA Section ========== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-accent {
  background: var(--accent);
}

/* ========== Footer ========== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer a {
  color: var(--gray-400);
  display: block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.footer a:hover {
  color: var(--accent-light);
}

.footer-contact p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--gray-400);
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--white);
}

/* ========== Page headers ========== */
.page-hero {
  padding: calc(var(--header-height) + 4rem) 0 3rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* ========== About page ========== */
.about-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-card {
  padding: 2rem;
  background: var(--off-white);
  border-radius: var(--radius-lg);
}

.about-card h3 {
  margin-bottom: 0.75rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.team-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.team-card-body {
  padding: 1.25rem;
}

.team-card h4 {
  margin-bottom: 0.25rem;
}

.team-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ========== Services page ========== */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.service-block:nth-child(even) {
  direction: rtl;
}

.service-block:nth-child(even) > * {
  direction: ltr;
}

.service-block:last-child {
  border-bottom: none;
}

.service-block img {
  border-radius: var(--radius-lg);
  height: 280px;
  object-fit: cover;
}

.service-content h3 {
  margin-bottom: 0.75rem;
}

.service-content ul {
  margin: 1rem 0;
}

.service-content li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-700);
}

.service-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ========== Contact page ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-form {
  background: var(--off-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--gray-800);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-info-card {
  background: var(--primary);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.contact-info-card h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.contact-info-card p,
.contact-info-card a {
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.5rem;
}

.contact-info-card a:hover {
  color: var(--accent-light);
}

.map-container {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 350px;
  border: 1px solid var(--gray-200);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== Legal pages (Terms, Privacy) ========== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.legal-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  list-style: disc;
}

.legal-content .updated {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
}

/* ========== Scroll reveal ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
  .service-block,
  .service-block:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  .hero .container {
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

/* ========== Subscribe / Unsubscribe pages ========== */
.subscribe-form-wrapper,
.unsubscribe-form-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.subscribe-form .form-group-checkbox,
.unsubscribe-form .form-group-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.subscribe-form .form-group-checkbox input[type="checkbox"],
.unsubscribe-form .form-group-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.subscribe-form .form-group-checkbox label,
.unsubscribe-form .form-group-checkbox label {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-weight: 500;
}

.form-error {
  display: block;
  font-size: 0.875rem;
  color: #dc3545;
  margin-top: 0.35rem;
  min-height: 1.25rem;
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #dc3545;
}

.form-group input.valid:not(:placeholder-shown),
.form-group select.valid {
  border-color: var(--accent);
}

.required { color: #dc3545; }
.optional { font-weight: 400; color: var(--gray-500); font-size: 0.9em; }

.form-privacy-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

.btn-subscribe {
  margin-top: 0.5rem;
}

.subscribe-success,
.unsubscribe-success {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  animation: fadeInUp 0.5s ease;
}

.subscribe-success h2,
.unsubscribe-success h2 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.subscribe-success p,
.unsubscribe-success p {
  margin-bottom: 0;
  color: var(--gray-700);
}

.unsubscribe-success .reassurance {
  margin-top: 1rem;
}

.unsubscribe-success .reassurance a {
  font-weight: 600;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer: 3-column layout (Company, Quick Links, Contact) */
.footer-company p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-400);
  max-width: 280px;
  line-height: 1.5;
}
