/*
 * Alpha Roofing: component CSS. Only what Divi cannot do. Each rule says why.
 * Colours mirror the Divi variables (CSS cannot read Divi variable names):
 *   brand #662580, brand-dk #4a1b5f, signal #99c11c, ink #1e2231, mist #f3f1f6
 * Classes below are set on modules/presets in the build (see the Section Standard doc).
 *
 * Contents
 *   1. Cards and tiles (shared)
 *   2. Headings and text helpers
 *   3. Home: hero, intro/service cards, projects, contact band, areas, logos
 *   4. Header and footer
 *   5. Project, company and service pages
 *   6. Contact page (form and map)
 *   7. Reduced motion
 */

/* ===== 1. Cards and tiles (shared) ===== */

/* Stretched link: whole card clickable with one real link. Why not Divi: no card-level link target. */
.alpha-card,
.alpha-tile { position: relative; }
.alpha-card a.alpha-card__link::after,
.alpha-tile a.alpha-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Card focus ring when the stretched link has focus. Why not Divi: no :focus-within control.
   Brand on light, signal on dark (lime fails contrast on white). */
.alpha-card:focus-within { outline: 3px solid #662580; outline-offset: 2px; }
.alpha-tile:focus-within,
.alpha-dark .alpha-card:focus-within { outline-color: #99c11c; }

/* Project tile: name appears on hover/focus over a gradient. Why not Divi: no hover-reveal caption. */
.alpha-tile .alpha-tile__name {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease;
}
.alpha-tile:hover .alpha-tile__name,
.alpha-tile:focus-within .alpha-tile__name { opacity: 1; transform: none; }
@media (hover: none) { .alpha-tile .alpha-tile__name { opacity: 1; transform: none; } }

/* Intro quote inside a card. Why not Divi: blockquote styling lives inside Text HTML. */
.alpha-card__quote blockquote { margin: 0 0 8px; padding: 0; border: 0; font-style: italic; }
.alpha-card__quote p { margin: 0; font-size: 13px; }

/* Intro + service cards: photo on top, then a row with a signal icon tile left of the title.
   Why not Divi: image cropping inside a card and the icon tile size are not module settings. */
.alpha-card--intro, .alpha-card--svc { background: transparent; border: 0; }
.alpha-card__media { overflow: hidden; border-radius: 4px; aspect-ratio: 3 / 2; }
.alpha-card__media--tall { aspect-ratio: auto; min-height: 248px; }
.alpha-card__media .et_pb_image, .alpha-card__media .et_pb_image_wrap, .alpha-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.alpha-card__media--tall .et_pb_image, .alpha-card__media--tall .et_pb_image_wrap, .alpha-card__media--tall img { min-height: 248px; }
.alpha-card__quote-tile { display: flex; flex-direction: column; justify-content: center; border-radius: 4px; }
.alpha-card__icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 4px; }
.alpha-card__icon .et_pb_icon_wrap, .alpha-card__icon .et-pb-icon { font-size: 24px; line-height: 1; }
.alpha-card .et_pb_module_header { margin: 0; padding: 0; }
.alpha-card .et_pb_text_inner p { margin: 0; }
.alpha-card a.alpha-card__link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.alpha-card a.alpha-card__link svg { flex: none; }

/* ===== 2. Headings and text helpers ===== */

/* Accent word and the signal rule under section titles. Why not Divi: no pseudo-element underline on headings. */
.alpha-accent { color: var(--gcid-alpha-brand, #662580); }
.alpha-rule .et_pb_module_header::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 16px; background: var(--gcid-alpha-signal, #99c11c); }
.alpha-rule--center .et_pb_module_header::after { margin-left: auto; margin-right: auto; }
.alpha-upper .et_pb_module_header { text-transform: uppercase; }
/* Why not Divi: a centred max-width for text blocks inside a full-width row. */
.alpha-narrow { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ===== 3. Home ===== */

/* Hero photo fades into the purple. Why not Divi: no masked-image fade on a section background. */
.alpha-hero-fade { position: relative; overflow: hidden; }
.alpha-hero-fade::before {
	content: "";
	position: absolute;
	inset: 0 0 0 auto;
	width: 60%;
	background: var(--alpha-hero-image) center / cover no-repeat;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
	mask-image: linear-gradient(to right, transparent, #000 45%);
	pointer-events: none;
}
@media (max-width: 980px) { .alpha-hero-fade::before { width: 100%; opacity: .35; } }

/* Hero: uppercase title, content aligned to the 1440 container. Buttons sit in a Divi Group (flex row), no CSS needed. */
.alpha-hero .et_pb_slide_description { max-width: 1440px; margin: 0 auto; padding: 96px 32px 120px; text-align: left; }
@media (max-width: 767px) { .alpha-hero .et_pb_slide_description { padding-left: 16px; padding-right: 16px; } }
.alpha-hero .et_pb_slide_title { text-transform: uppercase; max-width: 14em; }
.alpha-hero .et_pb_slide_content { font-weight: 700; max-width: 28em; margin-bottom: 24px; }
.alpha-hero .et_pb_button { text-transform: uppercase; letter-spacing: .08em; }

/* Projects: dark section, pill filters, edge-to-edge photo tiles with a signal category bar.
   Why not Divi: the filterable portfolio module's internals are not reachable from its settings. */
.alpha-projects .et_pb_filterable_portfolio { max-width: none; }
.alpha-projects .et_pb_portfolio_filters { margin: 0 auto 32px; text-align: center; }
.alpha-projects .et_pb_portfolio_filters ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0 16px; list-style: none; }
.alpha-projects .et_pb_portfolio_filters li { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
.alpha-projects .et_pb_portfolio_filter a { display: inline-block; padding: 12px 20px; border: 0; border-radius: 4px; background: var(--gcid-alpha-slate, #2b3045) !important; color: var(--gcid-alpha-white, #fff) !important; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; box-shadow: none; }
.alpha-projects .et_pb_portfolio_filter a:hover { background: var(--gcid-alpha-brand, #662580) !important; }
.alpha-projects .et_pb_portfolio_filter a.active { background: var(--gcid-alpha-slate, #2b3045) !important; color: var(--gcid-alpha-signal, #99c11c) !important; box-shadow: inset 0 -3px 0 var(--gcid-alpha-signal, #99c11c); }
@media (max-width: 767px) { .alpha-projects .et_pb_portfolio_filter a { padding: 10px 14px; font-size: 12px; } }
.alpha-projects .et_pb_portfolio_items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0; }
.alpha-projects .et_pb_portfolio_item { float: none; width: auto; margin: 0; position: relative; overflow: hidden; aspect-ratio: 4 / 3; clear: none; }
.alpha-projects .et_pb_portfolio_item.et_pb_grid_item { display: block; }
.alpha-projects .et_pb_portfolio_image, .alpha-projects .et_pb_portfolio_image a, .alpha-projects .et_pb_portfolio_image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.alpha-projects .et_pb_portfolio_item .et_pb_module_header, .alpha-projects .et_pb_portfolio_item .post-meta { position: absolute; left: 0; right: 0; margin: 0; z-index: 10; }
.alpha-projects .et_pb_portfolio_item .post-meta { bottom: 0; margin: 0 28px; padding: 12px; background: var(--gcid-alpha-signal, #99c11c); color: var(--gcid-alpha-ink, #1e2231); text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.alpha-projects .et_pb_portfolio_item .post-meta a { color: inherit; }
/* Project title sits above Divi's hover overlay but lets clicks through to it. Why not Divi: overlay stacking is Divi's own. */
.alpha-projects .et_pb_portfolio_item .et_pb_module_header { top: calc(50% + 40px); text-align: center; padding: 0 16px; color: var(--gcid-alpha-white, #fff); font-size: 16px; text-transform: uppercase; letter-spacing: .06em; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.alpha-projects .et_pb_portfolio_item .et_pb_module_header a { color: inherit; }
.alpha-projects .et_pb_portfolio_item .et_overlay { background: color-mix(in srgb, var(--gcid-alpha-brand, #662580) 90%, transparent) !important; border: 0 !important; }
.alpha-projects .et_pb_portfolio_item .et_overlay::before { color: var(--gcid-alpha-white, #fff) !important; }
.alpha-projects .et_pb_portfolio_item:hover .et_pb_module_header, .alpha-projects .et_pb_portfolio_item:focus-within .et_pb_module_header { opacity: 1; }
.alpha-projects .et_pb_button_module_wrapper { margin-top: 32px; }
.alpha-projects .et_pb_section, .alpha-projects { padding-bottom: 96px; }
@media (max-width: 980px) { .alpha-projects .et_pb_portfolio_items { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .alpha-projects .et_pb_portfolio_items { grid-template-columns: 1fr; } }

/* Contact band: full-width photo under a brand overlay, small rule under the eyebrow. Why not Divi: pseudo-element rule. */
.alpha-cta { background-position: center; background-size: cover; }
.alpha-eyebrow-rule p::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 12px; background: var(--gcid-alpha-white, #fff); }
.alpha-cta .alpha-cta__text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* Areas: text column aligned to container, map fills the whole right half.
   Why not Divi: container-aligned padding needs calc() on viewport width. */
.alpha-areas__text { padding-left: max(32px, calc((100vw - 1440px) / 2)); }
.alpha-map { position: relative; overflow: hidden; min-height: 520px; display: flex; align-items: center; justify-content: center; background: var(--gcid-alpha-line, #ddd6e4); }
@media (max-width: 980px) { .alpha-areas__text { padding-left: 32px; } }
@media (max-width: 767px) { .alpha-areas__text { padding-left: 16px; padding-right: 16px; } }

/* Region list: two columns, signal square marker. Why not Divi: marker styling inside a Text module. */
.alpha-regions, .alpha-regions li { list-style: none !important; }
.alpha-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0 !important; padding: 0 !important; }
.alpha-regions li::marker { content: none; }
.alpha-regions li { position: relative; padding: 12px 0 12px 20px !important; margin: 0 !important; border-bottom: 1px solid var(--gcid-alpha-line, #ddd6e4); font-weight: 700; cursor: default; }
.alpha-regions li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--gcid-alpha-signal, #99c11c); }
.alpha-regions li.is-on { color: var(--gcid-alpha-brand, #662580); }

/* Accreditation logos: same height, never stretched. Why not Divi: equal-height contained images. */
.alpha-logos { align-items: center; justify-items: center; }
.alpha-logos .et_pb_module, .alpha-logos .et_pb_image { display: flex; align-items: center; justify-content: center; width: 100%; height: 72px; margin: 0 !important; }
.alpha-logos .et_pb_image_wrap, .alpha-logos .et_pb_image_wrap span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.alpha-logos img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; }

/* ===== 4. Header and footer =====
   Why not Divi: menu typography, active underline, inline link lists, hours table and the overlapping tab are not module settings.
   Selectors are deliberately broad (the header holds one logo and one nav). */

/* Header: 128px tall, logo hangs over the hero, contact line above the menu. Why not Divi: the overhang and absolute contact line are not module settings. */
.alpha-header { position: relative; z-index: 60; overflow: visible !important; min-height: 128px; box-sizing: border-box; padding-top: 14px !important; padding-bottom: 0 !important; }
.et-l--header, .et-l--header .et_builder_inner_content { overflow: visible !important; position: relative; z-index: 60; }
.alpha-header .alpha-header__bar { position: relative; top: 26px; height: 0; overflow: visible; text-align: right; margin: 0; padding: 0 20px 0 0; z-index: 2; }
.alpha-header .alpha-header__bar p { margin: 0; padding: 0; font-weight: 700; }
.alpha-header .et_pb_text_inner a, .alpha-header .alpha-header__bar a { color: inherit !important; text-decoration: none; }
.alpha-header .alpha-header__sep { display: inline-block; width: 1px; height: 14px; margin: 0 12px; vertical-align: middle; background: var(--gcid-alpha-muted, #5b5f72); }
.alpha-header img { width: 175px !important; max-width: none !important; height: auto !important; display: block; margin-bottom: -19px; position: relative; z-index: 70; }
.alpha-header nav a, .alpha-header .et-menu a { text-transform: uppercase; letter-spacing: .08em; font-weight: 600 !important; font-size: 14px; color: var(--gcid-alpha-ink, #1e2231); padding: 8px 20px !important; }
.alpha-header nav > ul, .alpha-header .et-menu-nav > ul { margin-top: 52px; }
.alpha-header nav li.current-menu-item > a, .alpha-header nav li.current-menu-ancestor > a, .alpha-header nav li > a:hover { color: var(--gcid-alpha-brand, #662580) !important; }
.alpha-header nav > ul > li.current-menu-item > a, .alpha-header .et-menu > li.current-menu-item > a { box-shadow: none; text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--gcid-alpha-signal, #99c11c); text-underline-offset: 10px; }
@media (max-width: 980px) { .alpha-header { min-height: 0; padding-top: 8px !important; padding-bottom: 8px !important; } .alpha-header .alpha-header__bar { top: 0; height: auto; text-align: left; padding: 0; } .alpha-header nav > ul { margin-top: 0; } .alpha-header img { width: 120px !important; margin-bottom: 0; } }

.alpha-footer a { color: inherit; text-decoration: none; }
.alpha-footer a:hover, .alpha-footer a:focus-visible { color: var(--gcid-alpha-signal, #99c11c); text-decoration: underline; }
.alpha-footer .et_pb_text_inner p { margin: 0; }
.alpha-footer__label p { font-size: 16px !important; letter-spacing: .04em !important; }
.alpha-footer__follow { width: fit-content; transform: translateY(-124px); margin-bottom: -76px; }
.alpha-footer__follow .et_pb_text_inner p { display: flex; gap: 8px; align-items: center; }
.alpha-social { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1.5px solid var(--gcid-alpha-ink, #1e2231); border-radius: 50%; color: var(--gcid-alpha-ink, #1e2231) !important; }
.alpha-social:hover { background: var(--gcid-alpha-ink, #1e2231); color: var(--gcid-alpha-signal, #99c11c) !important; text-decoration: none !important; }
.alpha-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 8px 0 0; padding: 0; list-style: none; }
.alpha-footer__links li { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--gcid-alpha-slate, #2b3045); }
.alpha-footer__links a { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.alpha-footer__links svg { flex: none; }
.alpha-hours { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 8px; }
.alpha-hours th, .alpha-hours td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--gcid-alpha-slate, #2b3045); text-align: left; font-weight: 400; }
.alpha-hours td { text-align: right; font-weight: 700; color: var(--gcid-alpha-white, #fff); }
.alpha-footer .et_pb_icon .et-pb-icon, .alpha-footer .et_pb_icon_wrap { font-size: 18px; }
.alpha-footer__legal { background: color-mix(in srgb, var(--gcid-alpha-ink, #1e2231) 65%, #000) !important; }
@media (max-width: 767px) { .alpha-footer__links { grid-template-columns: 1fr; } .alpha-footer__follow { transform: none; margin-bottom: 24px; } }

/* ===== 5. Project, company and service pages ===== */

/* Sidebar link list. Why not Divi: the list is one Text module of links; Divi has no divider/chevron styling for it. */
.alpha-sidelist { list-style: none; margin: 0; padding: 0; }
.alpha-sidelist li { border-bottom: 1px solid var(--gcid-alpha-line, #e3e5ea); }
.alpha-sidelist a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 600; color: var(--gcid-alpha-ink, #1e2231); text-decoration: none; }
.alpha-sidelist a:hover { color: var(--gcid-alpha-brand, #662580); }
/* Current page in the sidebar. Why not Divi: no per-item "current page" state for a list in a Text module. */
.alpha-sidelist li.is-current > a,
.alpha-sidelist a[aria-current="page"] { color: var(--gcid-alpha-brand, #662580); font-weight: 700; }

/* Why not Divi: square-cropped gallery tiles. */
.alpha-gallery .et_pb_gallery_image img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; display: block; }
.alpha-project__nav a { color: inherit; text-decoration: none; }
.alpha-project__nav a:hover { text-decoration: underline; }

/* Why not Divi: grid column widths are fractions only; the sidebar must be a fixed 320px.
   Tablet/mobile: no order control in Divi, so the sidebar goes below the main content here. */
.alpha-project__cols { grid-template-columns: 320px minmax(0, 1fr) !important; }
@media (max-width: 980px) { .alpha-project__cols { grid-template-columns: 1fr !important; } .alpha-project__side { order: 2; } }

/* Dark-banner breadcrumbs. Why not Divi: the Breadcrumbs module has no setting for link/separator colour that I could confirm. */
.alpha-crumbs-dark,
.alpha-crumbs-dark a { color: var(--gcid-alpha-on-dark-soft); }
.alpha-crumbs-dark a:hover { color: var(--gcid-alpha-signal); }

/* Tick list. Why not Divi: no tick-marker option, and no way to remove default list markers, in a Text module. */
.alpha-ticks, .alpha-ticks li { list-style: none !important; }
.alpha-ticks { margin: 0 !important; padding: 0 !important; }
.alpha-ticks li::marker { content: ""; }
.alpha-ticks li { position: relative; padding: 11px 0 11px 34px; border-bottom: 1px solid var(--gcid-alpha-line); font-weight: 600; }
.alpha-ticks li:last-child { border-bottom: 0; }
.alpha-ticks li::before { content: ""; position: absolute; left: 7px; top: 14px; width: 7px; height: 13px; border: solid var(--gcid-alpha-signal-dk); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* Contained logos in a fixed-height box. Why not Divi: needs object-fit + height on the img. */
.alpha-logo { padding: var(--gvid-space-24, 24px); background: #fff; }
.alpha-logo img { width: 100%; height: 120px; object-fit: contain; }

/* Testimonial quote. Why not Divi: blockquote reset and decorative quote mark have no module setting. */
.alpha-quote blockquote { margin: 0; padding: 0; border: 0; font-style: normal; }
.alpha-quote blockquote::before { content: "\201C"; display: block; font-size: 56px; line-height: .8; color: var(--gcid-alpha-signal-dk, #587510); }

/* ===== 6. Contact page ===== */

/* Why not Divi: Contact Form 7 outputs plugin markup that Divi modules cannot style. */
.alpha-form .wpcf7-form p { margin: 0 0 var(--gvid-space-16, 16px); }
.alpha-form label { display: block; font-size: 15px; }
.alpha-form input[type="text"], .alpha-form input[type="email"], .alpha-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--gcid-alpha-line, #d9dde2);
	border-radius: 4px; font: inherit; background: #fff; }
.alpha-form textarea { height: 140px; min-height: 120px; resize: vertical; }
.alpha-form input:focus, .alpha-form textarea:focus { outline: 2px solid var(--gcid-alpha-brand, #662580); outline-offset: 1px; }
.alpha-form input[type="submit"] { background: var(--gcid-alpha-signal, #99c11c); color: var(--gcid-alpha-ink, #1e2231);
	border: 0; border-radius: 4px; padding: 14px 28px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.alpha-form input[type="submit"]:hover { background: var(--gcid-alpha-signal-dk, #587510); color: #fff; }

/* Why not Divi: the form template has stray <br> spacers between fields and an empty <p> at the end. */
.alpha-form .wpcf7-form p > br { display: none; }
.alpha-form .wpcf7-form p:has(> br:only-child) { display: none; }
.alpha-form .wpcf7-form-control-wrap[data-name="consent"] { display: block; margin-top: var(--gvid-space-16, 16px); }
.alpha-form .wpcf7-list-item { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.alpha-form .wpcf7-list-item input { margin-top: 5px; }

/* Embedded map. Named alpha-embed because .alpha-map belongs to the homepage Areas section. */
.alpha-embed iframe { display: block; width: 100%; border-radius: 4px; }

/* ===== 7. Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
	.alpha-tile .alpha-tile__name,
	.alpha-projects .et_pb_portfolio_item .et_pb_module_header { transition: none; }
}


/* Why not Divi: an Image module sizes to its content; the map must fill the panel. */
.alpha-map .et_pb_image, .alpha-map .et_pb_image_wrap { display: block; width: 100%; height: 100%; margin: 0; }
.alpha-map img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Tablet and mobile: show the whole map, no cropping. */
@media (max-width: 980px) {
  .alpha-map { min-height: 0; aspect-ratio: 640 / 520; }
  .alpha-map img { object-fit: contain; }
}