/*
Theme Name: Takom Energy Divi Child
Template: Divi
Version: 1.0.9
Description: Launch-ready Takom Energy styling and functionality for Divi 5.
*/

:root {
  --takom-blue: #123c69;
  --takom-blue-dark: #0d2744;
  --takom-red: #c9282d;
  --takom-red-dark: #9f1f24;
  --takom-ink: #1f2933;
  --takom-muted: #64717f;
  --takom-surface: #f4f6f8;
  --takom-line: #d9e0e7;
  --takom-white: #fff;
  --takom-radius: 14px;
  --takom-shadow: 0 18px 50px rgb(31 41 51 / 10%);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--takom-ink);
}

.et-l--footer,
#main-footer {
  display: none !important;
}

.single-post #main-content .container,
.page #main-content .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.single-post #main-content .container::before,
.page #main-content .container::before {
  display: none;
}

.single-post #left-area,
.page #left-area {
  width: 100%;
  padding: 0;
}

.single-post #sidebar,
.page #sidebar,
.single-post .et_post_meta_wrapper {
  display: none;
}

.single-post .et_pb_post,
.page .et_pb_post {
  margin-bottom: 0;
}

.et_pb_button::after,
.et_pb_button:after,
.takom-home .et_pb_button::after,
.takom-home .et_pb_button:after,
.home .et_pb_button::after,
.home .et_pb_button:after,
body #page-container .et_pb_button::after,
body #page-container .et_pb_button:after {
  display: none !important;
  width: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  content: "" !important;
}

.home .et_pb_section:first-of-type a,
.home .et_pb_section_0 a,
.home .et_pb_section_0 a:visited,
.takom-home .et_pb_section_0 a,
.takom-home .et_pb_section_0 a:visited {
  color: #fff !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--takom-red);
  outline-offset: 3px;
}

.takom-page {
  background: var(--takom-white);
}

.takom-wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.takom-hero {
  padding: clamp(72px, 9vw, 128px) 0;
  color: var(--takom-white);
  background:
    linear-gradient(100deg, rgb(13 39 68 / 92%), rgb(31 41 51 / 68%)),
    var(--takom-hero-image, linear-gradient(135deg, var(--takom-blue-dark), #3f4752));
  background-position: center;
  background-size: cover;
}

.takom-eyebrow {
  margin: 0 0 12px;
  color: var(--takom-red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.takom-hero h1 {
  max-width: 900px;
  margin: 0;
  color: inherit;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.02;
}

.takom-hero p:not(.takom-eyebrow) {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgb(255 255 255 / 86%);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.takom-section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.takom-section--soft {
  background: var(--takom-surface);
}

.takom-section h2 {
  margin: 0 0 20px;
  color: var(--takom-ink);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.takom-lead {
  max-width: 780px;
  color: var(--takom-muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.takom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 38px;
}

.takom-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.takom-card {
  overflow: hidden;
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: 0 8px 28px rgb(31 41 51 / 6%);
}

.takom-card__image {
  width: 100%;
  border-radius: var(--takom-radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.takom-card__body {
  padding: 26px;
}

.takom-card h2,
.takom-card h3 {
  margin: 0 0 12px;
  color: var(--takom-ink);
  font-size: 1.28rem;
  line-height: 1.25;
}

.takom-card p {
  margin: 0;
  color: var(--takom-muted);
  line-height: 1.7;
}

.takom-news-grid {
  align-items: stretch;
}

.takom-news-card {
  position: relative;
  border: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(244 246 248 / 86%)),
    var(--takom-white);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.takom-news-card::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--takom-blue), var(--takom-red));
  content: "";
  opacity: 0.9;
}

.takom-news-card:hover,
.takom-news-card:focus-within {
  box-shadow: 0 22px 54px rgb(31 41 51 / 13%);
  transform: translateY(-4px);
}

.takom-news-card__link {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  color: inherit;
  background: inherit;
  text-decoration: none;
  flex-direction: column;
}

.takom-news-card:hover .takom-news-card__link,
.takom-news-card:focus-within .takom-news-card__link {
  border-color: rgb(201 40 45 / 70%);
}

.takom-news-card__link:focus-visible {
  outline: 3px solid var(--takom-red);
  outline-offset: 5px;
  border-radius: var(--takom-radius);
}

.takom-news-card .takom-card__image {
  transition: transform 220ms ease, filter 220ms ease;
}

.takom-news-card:hover .takom-card__image,
.takom-news-card:focus-within .takom-card__image {
  filter: saturate(1.04) contrast(1.03);
  transform: scale(1.035);
}

.takom-news-card .takom-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.takom-news-card h2 {
  color: var(--takom-ink);
  transition: color 180ms ease;
}

.takom-news-card:hover h2,
.takom-news-card:focus-within h2 {
  color: var(--takom-blue);
}

.takom-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  padding-top: 20px;
  color: var(--takom-red);
  font-weight: 900;
}

.takom-read-more::after {
  content: "→";
  transition: transform 180ms ease;
}

.takom-news-card:hover .takom-read-more::after,
.takom-news-card:focus-within .takom-read-more::after {
  transform: translateX(4px);
}

.takom-project-grid {
  align-items: stretch;
}

.takom-project-card {
  position: relative;
  border: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(244 246 248 / 86%)),
    var(--takom-white);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.takom-project-card:hover,
.takom-project-card:focus-within {
  box-shadow: 0 22px 54px rgb(31 41 51 / 13%);
  transform: translateY(-4px);
}

.takom-project-card__link {
  display: flex;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  color: inherit;
  background: inherit;
  text-decoration: none;
  flex-direction: column;
}

.takom-project-card:hover .takom-project-card__link,
.takom-project-card:focus-within .takom-project-card__link {
  border-color: rgb(201 40 45 / 70%);
}

.takom-project-card__link:focus-visible {
  outline: 3px solid var(--takom-red);
  outline-offset: 5px;
}

.takom-project-card .takom-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.takom-project-card h2 {
  color: var(--takom-ink);
  transition: color 180ms ease;
}

.takom-project-card:hover h2,
.takom-project-card:focus-within h2 {
  color: var(--takom-blue);
}

.takom-project-card .takom-card__image {
  transition: transform 220ms ease, filter 220ms ease;
}

.takom-project-card:hover .takom-card__image,
.takom-project-card:focus-within .takom-card__image {
  filter: saturate(1.04) contrast(1.03);
  transform: scale(1.035);
}

.takom-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: center;
}

.takom-split img {
  width: 100%;
  border-radius: var(--takom-radius);
  box-shadow: var(--takom-shadow);
}

.takom-copy p,
.takom-copy li {
  color: var(--takom-muted);
  line-height: 1.8;
}

.takom-copy h3 {
  margin-top: 28px;
  color: var(--takom-ink);
}

.takom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.takom-button,
.et_pb_button,
body #page-container .et_pb_button,
button.takom-button,
.home #main-content .et_pb_text.et_clickable .et_pb_text_inner p > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--takom-red) !important;
  border-radius: var(--takom-radius) !important;
  color: var(--takom-white) !important;
  background: var(--takom-red) !important;
  font-weight: 800;
  text-decoration: none;
  transition: 180ms ease;
}

.takom-button:hover,
.takom-button:focus-visible,
.et_pb_button:hover,
.et_pb_button:focus-visible,
body #page-container .et_pb_button:hover,
body #page-container .et_pb_button:focus-visible,
button.takom-button:hover,
button.takom-button:focus-visible,
.home #main-content .et_pb_text.et_clickable .et_pb_text_inner p > a:hover,
.home #main-content .et_pb_text.et_clickable .et_pb_text_inner p > a:focus-visible {
  color: var(--takom-white) !important;
  background: var(--takom-blue) !important;
  border-color: var(--takom-blue) !important;
}

.takom-button--solid {
  color: var(--takom-white) !important;
  background: var(--takom-red) !important;
}

.takom-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.takom-stat {
  padding: 28px 20px;
  border-radius: var(--takom-radius);
  text-align: center;
  background: var(--takom-ink);
}

.takom-stat strong {
  display: block;
  color: var(--takom-red);
  font-size: 2rem;
}

.takom-stat span {
  color: var(--takom-white);
  font-size: 0.9rem;
}

.takom-contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px;
  align-items: start;
}

.takom-contact-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.takom-contact-list a {
  color: var(--takom-ink);
  font-weight: 700;
}

.takom-form {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: var(--takom-shadow);
}

.takom-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.takom-field--full {
  grid-column: 1 / -1;
}

.takom-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--takom-ink);
  font-weight: 800;
}

.takom-field input,
.takom-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #c8d1dc;
  border-radius: var(--takom-radius);
  color: var(--takom-ink);
  background: var(--takom-white);
}

.takom-field input[type="checkbox"],
.takom-consent input[type="checkbox"] {
  width: auto !important;
  min-width: 0;
  margin: 0.35em 8px 0 0;
}

.takom-consent label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.takom-consent input[type="checkbox"] {
  flex: 0 0 auto;
}

.takom-field textarea {
  min-height: 150px;
  resize: vertical;
}

.takom-form-status {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--takom-radius);
  color: var(--takom-blue-dark);
  background: #eef3f8;
}

.takom-form-status--error {
  color: var(--takom-red-dark);
  background: #f8e9ea;
}

.home video,
.home .et_pb_video_box video,
.home .wp-video video {
  display: block;
  width: min(100%, 980px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: var(--takom-radius);
  background: var(--takom-blue-dark) url("/wp-content/uploads/2025/01/Takom-Energy-Solar-Systems.webp") center / cover no-repeat;
  box-shadow: 0 24px 70px rgb(0 0 0 / 30%);
  object-fit: cover;
}

.home .et_pb_video,
.home .et_pb_code,
.home .wp-video {
  overflow: visible !important;
}

.takom-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.takom-news-meta {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgb(201 40 45 / 30%);
  border-radius: var(--takom-radius);
  color: var(--takom-blue);
  background: rgb(201 40 45 / 8%);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.takom-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.takom-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--takom-radius);
  object-fit: cover;
}

.single-post .takom-page,
.takom-about,
.takom-project-detail {
  background: linear-gradient(180deg, var(--takom-surface), var(--takom-white) 48%);
}

.single-post .takom-hero,
.takom-project-detail .takom-hero {
  padding-top: clamp(86px, 10vw, 142px);
  padding-bottom: clamp(92px, 10vw, 150px);
  border-bottom: 6px solid var(--takom-red);
  background-blend-mode: normal;
}

.single-post .takom-hero .takom-eyebrow,
.takom-project-detail .takom-hero .takom-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: var(--takom-radius);
  color: var(--takom-white);
  background: rgb(13 39 68 / 46%);
  backdrop-filter: blur(6px);
}

.single-post .takom-hero h1,
.takom-project-detail .takom-hero h1 {
  max-width: 980px;
}

.single-post .takom-section,
.takom-project-detail .takom-section {
  padding-top: clamp(34px, 6vw, 72px);
}

.takom-article {
  max-width: 850px;
  margin-inline: auto;
}

.single-post .takom-article,
.takom-project-detail .takom-article {
  max-width: 930px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: var(--takom-shadow);
}

.takom-article p {
  color: var(--takom-muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.single-post .takom-article p:first-of-type,
.takom-project-detail .takom-article p:first-of-type {
  color: var(--takom-ink);
  font-size: clamp(1.12rem, 2vw, 1.28rem);
  line-height: 1.82;
}

.takom-article a {
  color: var(--takom-blue);
  font-weight: 800;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

.takom-article h2,
.takom-article h3 {
  color: var(--takom-ink);
}

.single-post .takom-article > img,
.single-post .takom-article p > img,
.single-post .takom-article .wp-post-image,
.takom-project-detail .takom-article > img,
.takom-project-detail .takom-article p > img,
.takom-project-detail .takom-project-media img {
  width: 100%;
  margin: 30px 0;
  border-radius: var(--takom-radius);
  box-shadow: 0 18px 42px rgb(31 41 51 / 12%);
}

.single-post .takom-gallery {
  gap: 18px;
}

.single-post .takom-gallery img {
  box-shadow: 0 12px 30px rgb(31 41 51 / 10%);
  transition: transform 180ms ease;
}

.single-post .takom-gallery img:hover {
  transform: translateY(-3px);
}

.takom-project-media {
  margin: 30px 0;
}

.takom-project-media img {
  display: block;
  cursor: zoom-in;
}

.takom-lightbox-image {
  cursor: zoom-in;
}

.takom-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 48px);
  background: rgb(13 39 68 / 88%);
  backdrop-filter: blur(8px);
}

.takom-lightbox.is-open {
  display: flex;
}

.takom-lightbox-open {
  overflow: hidden;
}

.takom-lightbox__image {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: 0 28px 80px rgb(0 0 0 / 36%);
  object-fit: contain;
}

.takom-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--takom-radius);
  color: var(--takom-white);
  background: var(--takom-red);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.takom-lightbox__close:hover,
.takom-lightbox__close:focus-visible {
  background: var(--takom-blue);
}

.takom-article-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  width: min(930px, calc(100% - 40px));
  margin: -34px auto clamp(64px, 8vw, 104px);
  padding: 22px;
  border: 1px solid rgb(18 60 105 / 20%);
  border-radius: var(--takom-radius);
  background: linear-gradient(135deg, #f4f6f8, #fff);
  box-shadow: 0 14px 38px rgb(31 41 51 / 8%);
}

.takom-article-actions__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.takom-article-actions__links:empty {
  display: none;
}

.takom-article-actions__links a {
  display: block;
  min-height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  color: var(--takom-ink);
  background: var(--takom-white);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.takom-article-actions__links a:hover,
.takom-article-actions__links a:focus-visible {
  border-color: var(--takom-red);
  box-shadow: 0 10px 28px rgb(31 41 51 / 9%);
  transform: translateY(-2px);
}

.takom-article-actions__links span {
  display: block;
  margin-bottom: 5px;
  color: var(--takom-red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.takom-article-actions__links strong {
  display: block;
  color: inherit;
  font-size: 0.96rem;
  line-height: 1.35;
}

.takom-about .takom-section {
  position: relative;
}

.takom-about .takom-split {
  gap: clamp(44px, 7vw, 96px);
}

.takom-about-card {
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: var(--takom-shadow);
}

.takom-about-media {
  position: relative;
}

.takom-about-media::before {
  position: absolute;
  inset: 22px -22px -22px 22px;
  z-index: 0;
  border-radius: var(--takom-radius);
  background: linear-gradient(135deg, rgb(18 60 105 / 14%), rgb(201 40 45 / 14%));
  content: "";
}

.takom-about-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--takom-radius);
  box-shadow: var(--takom-shadow);
  object-fit: cover;
}

.takom-about-founder {
  align-items: center;
}

.takom-about-founder .takom-about-media img {
  aspect-ratio: 4 / 5;
  object-position: center top;
}

.takom-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.takom-value-card {
  padding: 26px;
  border: 1px solid var(--takom-line);
  border-radius: var(--takom-radius);
  background: var(--takom-white);
  box-shadow: 0 12px 34px rgb(31 41 51 / 7%);
}

.takom-value-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--takom-red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.takom-about-cta {
  color: var(--takom-white);
  background: linear-gradient(135deg, var(--takom-blue), var(--takom-blue-dark));
}

.takom-about-cta h2,
.takom-about-cta p {
  color: inherit;
}

.takom-footer {
  padding: 64px 0 24px;
  color: rgb(255 255 255 / 78%);
  background: var(--takom-blue);
}

.takom-footer__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1fr;
  gap: 44px;
}

.takom-footer h2,
.takom-footer h3 {
  color: var(--takom-white);
}

.takom-footer__logo {
  width: 118px;
  height: auto;
  margin-bottom: 18px;
}

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

.takom-footer li {
  margin: 8px 0;
}

.takom-footer a {
  color: rgb(255 255 255 / 84%);
}

.takom-footer a:hover {
  color: var(--takom-red);
}

.takom-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.takom-footer__bottom {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .takom-grid,
  .takom-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .takom-split,
  .takom-contact-grid,
  .takom-footer__grid,
  .takom-article-actions,
  .takom-values-grid {
    grid-template-columns: 1fr;
  }

  .takom-article-actions__links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .takom-wrap {
    width: min(100% - 28px, 1180px);
  }

  .takom-grid,
  .takom-grid--2,
  .takom-stats,
  .takom-form__grid,
  .takom-gallery,
  .takom-values-grid {
    grid-template-columns: 1fr;
  }

  .takom-about-card {
    padding: 24px 20px;
  }

  .takom-about-media::before {
    inset: 14px -10px -14px 10px;
  }

  .takom-field--full {
    grid-column: auto;
  }

  .single-post .takom-article,
  .takom-project-detail .takom-article {
    padding: 24px 20px;
    border-radius: var(--takom-radius);
  }

  .takom-article-actions {
    width: min(100% - 28px, 930px);
    margin-top: -42px;
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
