/* Font Face Declarations */
@font-face {
  font-family: 'Circular TT';
  src: url('../typography/3MCircularTT-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular TT';
  src: url('../typography/3MCircularTT-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular TT';
  src: url('../typography/3MCircularTT-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular TT';
  src: url('../typography/3MCircularTT-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables for Scottsdale AC Pros Brand Colors */
:root {
  /* Primary Colors */
  --scottsdale-red: #e41a15;
  --ac-pros-blue: #0051b6;

  /* Gradient Colors */
  --warm-yellow: #f8c100;
  --cool-cyan: #00aeef;

  /* Neutral Colors */
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --medium-gray: #6c757d;
  --dark-gray: #343a40;
  --black: #000000;

  /* Typography */
  --font-family: 'Circular TT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --h1-size: 40px;
  --h2-size: 28px;
  --h3-size: 22px;
  --body-size: 16px;
  --caption-size: 14px;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --element-spacing: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--body-size);
  line-height: 1.6;
  color: var(--dark-gray);
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Styles */
h1 {
  font-size: var(--h1-size);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-gray);
}

h2 {
  font-size: var(--h2-size);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-gray);
}

h3 {
  font-size: var(--h3-size);
  font-weight: 500;
  line-height: 1.4;
  color: var(--dark-gray);
}

p {
  margin-bottom: 1em;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-weight: 500;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: var(--body-size);
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #c91510;
  border-color: #c91510;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--ac-pros-blue);
  border-color: var(--ac-pros-blue);
}

.btn-secondary:hover {
  background-color: var(--ac-pros-blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* Header Styles */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  transform: translateY(0);
}

.header.header-hidden {
  transform: translateY(-100%);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  flex-wrap: wrap;
}

.logo-img {
  height: 80px;
  width: auto;
  max-width: 250px;
}

.logo h1 {
  color: var(--ac-pros-blue);
  font-size: 24px;
  font-weight: 700;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
}

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

.nav a:hover {
  color: var(--scottsdale-red);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.phone {
  font-weight: 700;
  color: var(--ac-pros-blue);
  text-decoration: none;
  font-size: 18px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--ac-pros-blue) 0%, var(--cool-cyan) 100%);
  color: var(--white);
  padding: var(--section-padding);
}

/* Layout for hero: left-aligned copy with image on the right */
.hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: space-between;
}

.hero-left {
  flex: 1 1 55%;
  text-align: left;
}

.hero-left h1 {
  margin-bottom: 20px;
  color: var(--white);
}

.hero-left p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 600px;
}

.hero-image {
  flex: 0 0 40%;
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 48px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.urgency-element {
  background-color: rgba(255, 255, 255, 0.12);
  padding: 10px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.urgency-element p {
  margin: 0;
  color: var(--white);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  margin-bottom: 15px;
}

.section-header p {
  font-size: 18px;
  color: var(--medium-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Services Section */
.services {
  padding: var(--section-padding);
  background-color: var(--light-gray);
}

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

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

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

.service-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 15px;
  color: var(--ac-pros-blue);
}

/* About Section */
.about {
  padding: var(--section-padding);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-features {
  list-style: none;
  margin-top: 20px;
}

.about-features li {
  margin-bottom: 10px;
  color: var(--scottsdale-red);
  font-weight: 500;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1;
  object-fit: cover;
}

.placeholder-image {
  background-color: var(--light-gray);
  padding: 100px 20px;
  text-align: center;
  border-radius: 10px;
  color: var(--medium-gray);
}

/* Certifications Section */
.certifications {
  padding: 40px 0;
  background-color: var(--light-gray);
}

.certifications-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.cert-logo {
  background-color: var(--white);
  padding: 20px 30px;
  border-radius: 5px;
  font-weight: 500;
  color: var(--ac-pros-blue);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Blog Preview Section */
.blog-preview {
  padding: var(--section-padding);
}

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

.blog-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.blog-image {
  background-color: var(--light-gray);
  padding: 60px 20px;
  text-align: center;
  color: var(--medium-gray);
}

.blog-content {
  padding: 20px;
}

.read-more {
  color: var(--scottsdale-red);
  text-decoration: none;
  font-weight: 500;
}

/* Final CTA Section */
.final-cta {
  background: linear-gradient(135deg, var(--scottsdale-red) 0%, var(--warm-yellow) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.final-cta h2 {
  color: var(--white);
  margin-bottom: 15px;
}

.final-cta p {
  font-size: 18px;
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Contact Section */
.contact {
  padding: var(--section-padding);
  background-color: var(--light-gray);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-details {
  margin-top: 30px;
}

.contact-item {
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--white);
  border-radius: 5px;
}

.contact-form {
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--dark-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 5px;
  font-family: var(--font-family);
  font-size: var(--body-size);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ac-pros-blue);
}

/* Form validation - only show after submission attempt */
.contact-form.submitted .form-group input:invalid,
.contact-form.submitted .form-group select:invalid,
.contact-form.submitted .form-group textarea:invalid {
  border-color: var(--scottsdale-red);
}

/* Field-level error message */
.field-error {
  color: var(--scottsdale-red);
  font-size: 13px;
  margin-top: 4px;
  display: none;
  font-weight: 500;
}

.field-error::before {
  content: '⚠ ';
  font-size: 14px;
}

.contact-form.submitted .form-group.has-error .field-error {
  display: block;
}

.sms-consent {
  font-size: var(--caption-size);
  color: var(--medium-gray);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Footer */
.footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Footer bottom row: license left, credit right */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  gap: 16px;
}

.footer-license p,
.footer-credit p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted, #dcdcdc);
}

.footer-credit a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

/* Ensure footer links on dark background are white by default */
.footer a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-credit {
    align-self: flex-end;
  }
}
.footer-section a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--cool-cyan);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 8px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.social-icons a:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: rgba(255, 255, 255, 0.06);
}

.social-icons svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

/* Force size in case other rules are ignored */
.social-icons svg,
.social-icons svg * {
  width: 20px !important;
  height: 20px !important;
}

.footer-bottom {
  border-top: 1px solid #495057;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.legal-links {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --h1-size: 32px;
    --h2-size: 24px;
    --h3-size: 20px;
    --section-padding: 50px 0;
  }

  .header-content {
    flex-direction: column;
    gap: 20px;
  }

  .nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  /* Stack hero on small screens */
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-left {
    text-align: center;
  }

  .hero-image {
    text-align: center;
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

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

  .services-grid,
  .promotions-grid,
  .testimonials-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .service-card,
  .promotion-card,
  .testimonial-card {
    padding: 20px;
  }
}

/* Smooth scrolling and performance optimizations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 250px;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cookie-banner .btn {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Honeypot Field - Hidden from users */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Form Error Message */
.form-error {
  background-color: rgba(228, 26, 21, 0.1);
  color: var(--scottsdale-red);
  padding: 15px 20px;
  border-radius: 5px;
  margin-top: 15px;
  border-left: 4px solid var(--scottsdale-red);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-error::before {
  content: '⚠️';
  font-size: 18px;
}

/* Success Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--white);
  padding: 40px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--ac-pros-blue) 0%, var(--cool-cyan) 100%);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  margin: 0 auto 20px;
}

.modal-content h2 {
  color: var(--ac-pros-blue);
  margin-bottom: 15px;
}

.modal-content p {
  color: var(--dark-gray);
  margin-bottom: 10px;
  font-size: 18px;
}

.modal-subtext {
  font-size: 14px !important;
  color: var(--medium-gray) !important;
  margin-bottom: 25px !important;
}

.modal-content .btn {
  margin-top: 10px;
  min-width: 150px;
}

/* Print styles */
@media print {
  .announcement-bar,
  .header,
  .final-cta,
  .footer,
  .cookie-banner {
    display: none;
  }

  .hero {
    background: none;
    color: var(--dark-gray);
  }

  .btn {
    border: 1px solid var(--dark-gray);
    background: none;
    color: var(--dark-gray);
  }
}
