/* =====================================================================
   ALABAMA ELECTRICAL INCORPORATION - Public site styles
   Palette matches the AE logo: deep navy + white, amber accent for CTAs
   ===================================================================== */

:root {
  --navy-900: #081a33;
  --navy-800: #0d2c54;
  --navy-700: #12386c;
  --navy-100: #e8edf5;
  --amber-500: #f0a72f;
  --amber-600: #c77d12;
  --gray-50:  #f7f8fa;
  --gray-100: #eef0f3;
  --gray-300: #d3d8e0;
  --gray-600: #5c6672;
  --gray-800: #2b323b;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(8, 26, 51, 0.08);
  --shadow-lg: 0 14px 36px rgba(8, 26, 51, 0.16);
  --max-width: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--amber-600); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: inherit; color: var(--navy-900); line-height: 1.25; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--amber-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--amber-600); color: var(--navy-900); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); }
.btn-outline-navy { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-navy:hover { background: var(--navy-100); color: var(--navy-800); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--navy-900); color: var(--gray-300); font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; flex-wrap: wrap; gap: 6px; }
.topbar-contact a, .topbar-social a { color: var(--gray-300); margin-right: 18px; }
.topbar-social a:last-child, .topbar-contact a:last-child { margin-right: 0; }
.topbar-contact a:hover, .topbar-social a:hover { color: var(--amber-500); }

/* ---------- Header / nav ---------- */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; gap: 24px; }
.brand { display:flex; align-items:center; min-height:58px; }
.brand img { height: 56px; width: auto; max-width: 270px; object-fit: contain; }
.main-nav ul { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 10px 14px; font-weight: 600; color: var(--navy-800); border-radius: 6px; }
.main-nav a:hover, .main-nav a.active { background: var(--navy-100); color: var(--navy-900); }
.main-nav a.nav-cta { background: var(--amber-500); color: var(--navy-900); }
.main-nav a.nav-cta:hover { background: var(--amber-600); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; background: var(--navy-800); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-with-image { background-position:center; background-size:cover; background-repeat:no-repeat; }
.hero-with-image::before { content:""; position:absolute; inset:0; background:rgba(8,26,51,.82); }
.hero-with-image > .container { position:relative; }
.hero-inner { padding: 90px 20px 100px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-eyebrow { color: var(--amber-500); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 14px; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.hero p.lead { color: var(--gray-300); font-size: 1.1rem; max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge-row { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.hero-badge { color: var(--gray-300); font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.hero-visual { background: var(--navy-800); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius); padding: 30px; }
.hero-visual-icon { font-size: 3rem; margin-bottom: 10px; }
.hero-visual-icon img { display:block; width:150px; max-height:105px; object-fit:contain; margin-bottom:16px; }
.hero-visual h3 { color: var(--white); margin-bottom: 6px; }
.hero-visual p { color: var(--gray-300); margin: 0; }

/* ---------- Section scaffolding ---------- */
section { padding: 70px 0; }
.section-alt { background: var(--gray-50); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-eyebrow { color: var(--amber-600); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 0.78rem; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--gray-600); }
.section-foot { text-align: center; margin-top: 40px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-media {
  height: 170px;
  background: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 2.6rem;
}
.card-media { overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card-media img { transform: scale(1.08); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--amber-600); }
.card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.card-title-sm { font-size: 1.02rem; }
.card-body p { color: var(--gray-600); font-size: 0.93rem; margin-bottom: 0; flex: 1; }
.card-price { font-weight: 700; color: var(--navy-800); margin-top: 6px; }
.card-foot { padding: 0 22px 22px; }

.icon-tile {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--navy-100); color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 4px;
}
.icon-tile { display:none; }

/* Feature list */
.feature-list li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--gray-800); }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--amber-600); font-weight: 700; }

/* Rich-text content coming from the admin (Pages, About, Blog posts) */
.prose h2, .prose h3, .prose h4 { margin-top: 1.5em; margin-bottom: 0.6em; }
.prose h2:first-child, .prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose p { margin-bottom: 1.1em; line-height: 1.75; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.5em; line-height: 1.7; }
.prose a { color: var(--navy-700); text-decoration: underline; }
.prose a:hover { color: var(--amber-600); }
.prose strong { color: var(--navy-900); }
.prose img { border-radius: var(--radius); margin: 1.2em 0; max-width: 100%; }
.prose blockquote { border-left: 3px solid var(--amber-500); margin: 1.2em 0; padding: 0.4em 0 0.4em 1.2em; color: var(--gray-600); font-style: italic; }

/* ---------- About / split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split-media { background: var(--navy-800); border-radius: var(--radius); min-height: 320px; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 4rem; overflow:hidden; }
.split-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.stat-row { display: flex; gap: 34px; margin-top: 28px; flex-wrap: wrap; }
.stat-row .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--navy-800); }
.stat-row .stat-label { font-size: 0.85rem; color: var(--gray-600); }

/* ---------- Testimonials ---------- */
.testimonial-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.testimonial-quote { font-style: italic; color: var(--gray-800); margin-bottom: 16px; }
.testimonial-name { font-weight: 700; color: var(--navy-800); }
.testimonial-role { font-size: 0.85rem; color: var(--gray-600); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-900); color: var(--white); border-radius: var(--radius); padding: 50px; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--gray-300); max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--navy-100); display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.12); }
.empty-state { text-align: center; background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: var(--radius); padding: 60px 30px; color: var(--gray-600); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 46px; }
.contact-info-card { background: var(--navy-900); color: var(--white); border-radius: var(--radius); padding: 34px; }
.contact-info-card h3 { color: var(--white); }
.contact-info-card ul li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.contact-info-card ul li:last-child { border-bottom: none; }
.contact-info-card a { color: var(--gray-300); }
.contact-info-card a:hover { color: var(--amber-500); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; color: var(--navy-800); }
.form-control {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gray-300); border-radius: 6px;
  font-size: 0.96rem; font-family: inherit; background: var(--white); color: var(--gray-800);
}
.form-control:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(13,44,84,0.12); }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 22px; font-size: 0.94rem; }
.alert-success { background: #e5f6ec; color: #196a3c; border: 1px solid #b6e6c9; }
.alert-error { background: #fdeceb; color: #a3271b; border: 1px solid #f6c4bf; }

/* ---------- Breadcrumb / page banner ---------- */
.page-banner { background: var(--navy-900); color: var(--white); padding: 54px 0; text-align: center; }
.page-banner h1 { color: var(--white); margin-bottom: 8px; }
.page-banner p { color: var(--gray-300); margin: 0; }
.breadcrumb { font-size: 0.85rem; color: var(--gray-300); margin-top: 10px; }
.breadcrumb a { color: var(--gray-300); }
.breadcrumb a:hover { color: var(--amber-500); }

/* ---------- Product detail ---------- */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.product-price-box { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 24px; margin-top: 22px; }
.product-price-box .amount { font-size: 1.6rem; font-weight: 800; color: var(--navy-800); }

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  background: #25D366; color: var(--white); font-weight: 700;
  padding: 14px 20px; border-radius: 30px; box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  display: flex; align-items: center; gap: 8px;
}
.whatsapp-float:hover { background: #1ebe57; color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--gray-300); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding: 56px 20px 30px; }
.footer-logo-badge { display: inline-flex; align-items:center; background: var(--white); padding: 13px 20px; border-radius: 8px; margin-bottom: 20px; min-height: 62px; }
.footer-logo { height: 50px; width:auto; max-width:290px; display: block; object-fit: contain; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--gray-300); font-size: 0.92rem; }
.footer-col a:hover { color: var(--amber-500); }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer-contact-organised li { display:grid; grid-template-columns:105px 1fr; gap:8px 14px; padding:11px 0; border-bottom:1px solid rgba(255,255,255,.12); }
.footer-contact-organised li:last-child { border-bottom:0; }
.footer-contact-label { color:var(--white); font-weight:700; }
.about-story-layout { align-items:start; gap:64px; }
.about-story-layout > div:first-child { padding-top:4px; }
.about-story-media { min-height:360px; }
@media (max-width:700px){.footer-contact-organised li{grid-template-columns:92px 1fr}}
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom-inner { display: flex; justify-content: space-between; padding: 18px 20px; font-size: 0.82rem; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: var(--gray-300); }

.footer-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.footer-social a:hover { background: var(--amber-500); color: var(--navy-900); transform: translateY(-2px); }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 998;
  max-width: 760px; margin: 0 auto;
  background: var(--navy-900); color: var(--gray-300);
  border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0,0,0,0.3);
  padding: 20px 22px;
}
.cookie-banner-inner { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cookie-banner p { margin: 0; font-size: 0.92rem; flex: 1 1 320px; }
.cookie-banner a { color: var(--amber-500); }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Deliberately static layout: content is immediately available and accessible. */
.reveal, .reveal.in-view { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-media img, .gallery-item img { transition: none; }
  .card:hover .card-media img, .gallery-item:hover img { transform: none; }
  .hero-visual { transform: none !important; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag-pill { display: inline-block; background: var(--navy-100); color: var(--navy-800); font-size: 0.75rem; font-weight: 700; padding: 5px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* Commercial image-led banners. The image is selected from Site Settings. */
.page-banner { position:relative; }
.page-banner.has-banner-image { background-color: var(--navy-900); background-position:center; background-size:cover; background-repeat:no-repeat; }
.page-banner.has-banner-image::before { content:""; position:absolute; inset:0; background:rgba(8,26,51,.70); }
.page-banner.has-banner-image > .container { position:relative; }
.image-placeholder { width:100%; height:100%; min-height:320px; background:var(--navy-800); display:flex; align-items:center; justify-content:center; color:var(--gray-300); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 20px; }
  .hero-visual { order: -1; }
  .split { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); box-shadow: var(--shadow-lg); padding: 10px 20px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: 12px 10px; }
  .header-inner { position: relative; }
  .topbar-inner { justify-content: center; text-align: center; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding-bottom: 10px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .cta-band { padding: 34px 22px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
  .header-inner { padding-top:12px; padding-bottom:12px; }
  .brand { min-height:44px; }
  .brand img { height: 44px; max-width:220px; }
  .footer-logo-badge { padding:10px 16px; min-height:54px; }
  .footer-logo { height:42px; max-width:250px; }
}
