/* ============================================
   HASCO ELECTRICAL SERVICES — GLOBAL STYLESHEET
   hascoelectrical.com.au
   ============================================ */

/* ---------- CSS RESET ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: color .25s; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  /* Colours */
  --navy:        #0A1628;
  --navy-mid:    #0F2040;
  --navy-light:  #1A3355;
  --yellow:      #FFD100;
  --yellow-hover:#E6BC00;
  --white:       #FFFFFF;
  --grey-light:  #F5F7FA;
  --grey-text:   #B0BEC5;
  --text-dark:   #1A1A2E;
  --text-body:   #4A4A6A;
  --border:      #E0E0E0;

  /* Fonts */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  /* Spacing */
  --section-pad: 80px 0;
  --container-w: 1200px;
  --gap: 30px;
  --radius: 8px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.18);
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: .6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
h5 { font-size: 1rem; font-weight: 700; }
h6 { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- UTILITY CLASSES ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}
.text-center { text-align: center; }
.text-yellow { color: var(--yellow); }
.section-title {
  text-align: center;
  margin-bottom: .4em;
}
.section-subtitle {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  color: var(--text-body);
  font-size: 1.05rem;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  transition: all .3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--yellow);
  color: var(--navy);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-hover);
  border-color: var(--yellow-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-secondary:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---------- STICKY NAVIGATION ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--yellow);
  padding: 0 20px;
  transition: padding .3s, box-shadow .3s;
}
.site-header.scrolled {
  padding: 0 20px;
  box-shadow: var(--shadow-lg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-w);
  margin: 0 auto;
  height: 72px;
  transition: height .3s;
}
.site-header.scrolled .header-inner { height: 60px; }

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.logo-hasco { color: var(--yellow); }
.logo-sub   { color: var(--white); font-weight: 600; font-size: .85rem; }

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: block;
  padding: 8px 14px;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  position: relative;
}
.main-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transition: transform .25s;
}
.main-nav > li > a:hover::after,
.main-nav > li > a.active::after {
  transform: scaleX(1);
}
.main-nav > li > a:hover { color: var(--yellow); }

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-mid);
  min-width: 260px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s;
  z-index: 100;
}
.main-nav > li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--grey-text);
  font-size: .88rem;
  transition: background .2s, color .2s;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.dropdown-menu a:hover {
  background: var(--navy-light);
  color: var(--yellow);
}

/* Call now button in nav */
.nav-cta {
  margin-left: 12px;
}
.nav-cta .btn {
  padding: 10px 24px;
  font-size: .85rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1001;
}
.hamburger span {
  display: block;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--navy);
  padding: 30px 20px;
  overflow-y: auto;
  z-index: 999;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-nav a:hover { color: var(--yellow); }
.mobile-nav .mobile-dropdown-title {
  color: var(--yellow);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-top: 20px;
  padding-bottom: 8px;
  border-bottom: none;
}
.mobile-nav .mobile-sub a {
  padding-left: 16px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--grey-text);
}
.mobile-nav .mobile-sub a:hover { color: var(--yellow); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 160px 20px 100px;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: .06;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: .5em;
}
.hero h1 span { color: var(--yellow); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--grey-text);
  margin-bottom: 1.5rem;
}
.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--yellow);
  margin-bottom: 2rem;
}
.hero-rating .stars { letter-spacing: 2px; }
.hero-rating .rating-text { color: var(--grey-text); }
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Inner-page hero (shorter) */
.hero-inner {
  min-height: auto;
  padding: 130px 20px 60px;
}
.hero-inner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--grey-text);
  margin-bottom: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--yellow); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--grey-text); }

/* ---------- TRUST BAR ---------- */
.trust-bar {
  background: var(--navy-mid);
  padding: 24px 20px;
}
.trust-bar-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: var(--container-w);
  margin: 0 auto;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
}
.trust-item .icon { font-size: 1.4rem; }

/* ---------- SECTIONS ---------- */
.section { padding: var(--section-pad); }
.section-alt { background: var(--grey-light); }

/* ---------- SERVICE CARDS ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 2rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px;
  border-top: 4px solid var(--yellow);
  transition: transform .3s, box-shadow .3s;
  text-align: center;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.service-card .card-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.service-card p {
  font-size: .92rem;
  color: var(--text-body);
  margin-bottom: 1.2rem;
}
.service-card .card-link {
  color: var(--navy);
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .25s;
}
.service-card .card-link:hover { color: var(--yellow-hover); }
.service-card .card-link::after { content: '→'; }

/* ---------- WHY CHOOSE US ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.why-point {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}
.why-point .why-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  background: var(--yellow);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}
.why-point h3 { font-size: 1.1rem; margin-bottom: .3em; }
.why-point p  { font-size: .92rem; margin-bottom: 0; }

/* CSS-only shield graphic */
.why-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield {
  position: relative;
  width: 260px; height: 300px;
  background: var(--navy);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
.shield::before {
  content: '⚡';
  font-size: 6rem;
  color: var(--yellow);
  text-shadow: 0 0 30px rgba(255,209,0,.4);
}
.shield::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 3px solid var(--yellow);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  opacity: .4;
}

/* ---------- SUBURB PILLS ---------- */
.suburb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 2rem 0;
}
.suburb-pill {
  display: inline-block;
  padding: 10px 24px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  transition: all .25s;
}
.suburb-pill:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---------- CONTACT / QUOTE FORM ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.contact-info-item .ci-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--yellow);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}
.contact-info-item h4 { margin-bottom: 4px; font-size: 1rem; }
.contact-info-item p  { font-size: .92rem; margin-bottom: 0; }
.contact-info-item a  { color: var(--yellow); font-weight: 600; }
.contact-info-item a:hover { text-decoration: underline; }

.quote-form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: border-color .25s;
  background: var(--white);
  color: var(--text-dark);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255,209,0,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit { text-align: right; }
.form-success {
  display: none;
  background: #d4edda;
  color: #155724;
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-weight: 600;
}
.form-success.show { display: block; }

/* ---------- CTA SECTION ---------- */
.cta-section {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
}
.cta-section h2 { color: var(--white); }
.cta-section p  { color: var(--grey-text); max-width: 600px; margin: 0 auto 2rem; }
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--navy);
  color: var(--grey-text);
  padding: 60px 20px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-bottom: 40px;
}
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-heading);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}
.footer-col p { font-size: .9rem; line-height: 1.7; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  color: var(--grey-text);
  font-size: .9rem;
  transition: color .2s;
}
.footer-col ul a:hover { color: var(--yellow); }
.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: .8rem;
}
.footer-logo .logo-hasco { color: var(--yellow); }
.footer-logo .logo-sub   { color: var(--white); font-weight: 600; font-size: .8rem; margin-left: 6px; }
.footer-contact-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: .9rem;
}
.footer-contact-item a { color: var(--yellow); }
.footer-contact-item a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px;
  text-align: center;
  font-size: .82rem;
  max-width: var(--container-w);
  margin: 0 auto;
}
.footer-bottom a { color: var(--yellow); }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------- INNER PAGE CONTENT ---------- */
.page-content {
  padding: var(--section-pad);
}
.page-content h2 {
  margin-top: 2rem;
  margin-bottom: .6em;
}
.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: .4em;
}
.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.page-content ul li {
  margin-bottom: .5rem;
  font-size: .95rem;
}
.page-content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.page-content ol li {
  margin-bottom: .5rem;
  font-size: .95rem;
}

/* Step cards */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
  margin: 2rem 0;
}
.step-card {
  background: var(--grey-light);
  padding: 28px 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--yellow);
}
.step-card .step-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--yellow);
  display: block;
  margin-bottom: 8px;
}
.step-card h3 { margin-top: 0; font-size: 1.1rem; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: .3em;
  margin-top: 0;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item h3::after { content: '+'; color: var(--yellow); font-size: 1.4rem; }
.faq-item.open h3::after { content: '−'; }
.faq-answer { font-size: .95rem; }

/* Area list */
.area-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0 2rem;
}
.area-link-list a {
  padding: 8px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  transition: all .25s;
}
.area-link-list a:hover {
  border-color: var(--yellow);
  background: var(--yellow);
}

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-icon-box {
  width: 280px;
  height: 280px;
  background: var(--navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.about-icon-box::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  opacity: .3;
}

/* ---------- FOCUS & ACCESSIBILITY ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---------- RESPONSIVE — TABLET (768px) ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-graphic { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-graphic { order: -1; }
}

@media (max-width: 768px) {
  :root { --section-pad: 50px 0; }

  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-bar-inner { gap: 20px; }
  .trust-item { font-size: .85rem; }

  /* Nav — hide desktop, show hamburger */
  .main-nav, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .header-inner { height: 64px; }
  .site-header.scrolled .header-inner { height: 56px; }
  .mobile-nav { top: 64px; }

  .hero { padding: 130px 20px 70px; min-height: auto; }
  .hero-inner { padding: 110px 20px 50px; }

  .step-grid { grid-template-columns: 1fr; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  opacity: 0;
  animation: fadeInUp .6s ease forwards;
}
.fade-in-up:nth-child(2) { animation-delay: .1s; }
.fade-in-up:nth-child(3) { animation-delay: .2s; }
.fade-in-up:nth-child(4) { animation-delay: .3s; }
.fade-in-up:nth-child(5) { animation-delay: .4s; }
.fade-in-up:nth-child(6) { animation-delay: .5s; }
