/*
Theme Name: CreenSolutions
Theme URI: https://example.com/
Author: Creen Solutions
Author URI: https://example.com/
Description: Custom classic WordPress theme for CreenSolutions.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: creensolutions
*/


:root {
  --ink: #14213d;
  --paper: #fffdf8;
  --brand: #ff6b35;
  --brand-2: #00a896;
  --muted: #5c6370;
  --card: #ffffff;
  --line: #e7e1d8;
  --header: rgba(20, 33, 61, 0.92);
  --text-on-header: #ffffff;
  --mobile-header-height: 72px;
  --site-container-max: 1400px;
  --site-container-width: 95%;
  --site-wide-max: 1600px;
}

/* Base reset and page background treatment. */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 107, 53, 0.18), transparent 35%),
    radial-gradient(circle at 92% 22%, rgba(0, 168, 150, 0.16), transparent 30%),
    linear-gradient(180deg, #ffffff, #ffffff 80%);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.5;
}

.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: var(--header);
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.container {
  width: min(1608px, var(--site-container-width));
  margin: auto;
}

.header .container {
  padding: 25px 0;
  min-height: var(--mobile-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-content {
  width: 100%;
}

.content-container {
  display: block;
  min-height: 0;
  padding: 2rem 0 2.5rem;
}

/* Prevent extra top whitespace between the hero and page body on the front page. */
.front-page-shell .content-container {
  padding-top: 0;
}

.front-page-shell .content-area,
.front-page-shell .content-area article,
.front-page-shell .content-area article .entry-content > :first-child {
  margin-top: 0;
  padding-top: 0;
}

.front-page-shell + .site-footer {
  margin-top: 0;
}

.has-text-align-center {
  text-align: center !important;
}

.entry-content > .wp-block-group {
  padding-block: clamp(1.5rem, 2.8vw, 2.4rem);
  padding-inline: clamp(1rem, 4vw, 6rem);
}

.entry-content .has-text-align-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .wp-block-heading.has-text-align-center {
  margin-bottom: clamp(0.7rem, 1.6vw, 1rem);
}

.entry-content .wp-block-group:has(> .wp-block-heading.has-text-align-center) > p:first-child {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.entry-content p.has-text-align-center {
  max-width: 150ch;
  margin-top: 0.4rem;
  margin-bottom: 0;
  line-height: 1.65;
}

.entry-content .wp-block-buttons {
  margin-top: clamp(0.8rem, 1.7vw, 1.2rem);
  gap: 0.75rem;
}

.entry-content .wp-block-heading.has-text-align-center + p.has-text-align-center {
  margin-top: 0.35rem;
}

.entry-content p.has-text-align-center + .wp-block-buttons {
  margin-top: clamp(0.85rem, 1.8vw, 1.15rem);
}

.entry-content .wp-block-buttons.is-content-justification-center {
  justify-content: center;
}

.entry-content > :where(:not(.alignfull):not(.alignwide)) {
  max-width: min(var(--site-container-max), var(--site-container-width));
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignwide {
  max-width: min(var(--site-wide-max), 96%);
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.content-area article {
  margin-bottom: 0;
}

.logo {
  color: var(--text-on-header);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.logo-image {
  height: 44px;
  width: auto;
  display: block;
}

.logo-text {
  color: var(--text-on-header);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.menu {
  display: flex;
  list-style: none;
  gap: 1.45rem;
}

.menu li {
  position: relative;
}

.menu a {
  color: var(--text-on-header);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
  padding-block: 0.35rem;
}

.menu a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--brand);
  left: 0;
  bottom: -4px;
  transition: width 0.25s ease;
}

.menu a:hover::after {
  width: 100%;
}

/* Desktop mega-menu stays hidden until hover, focus, or scripted open state. */
.mega-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  top: 120%;
  width: min(980px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.15);
}

.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.has-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 1101px) {
  .has-mega.open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.mega-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.7rem;
  gap: 1.2rem;
}

.mega-column h4 {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.mega-column a {
  display: block;
  color: var(--muted);
  padding: 0.3rem 0;
  font-size: 0.92rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mega-column a:hover {
  color: var(--brand-2);
  transform: translateX(4px);
}

.cta {
  margin-left: 0.25rem;
  background: linear-gradient(135deg, var(--brand), #ff8446);
  color: #fff;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255, 107, 53, 0.22);
}

.menu-toggle {
  display: none;
  color: var(--text-on-header);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle__bars {
  display: inline-grid;
  gap: 5px;
}

.menu-toggle__bars span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle:focus-visible,
.menu a:focus-visible,
.cta:focus-visible,
.mega-column a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.hero {
  width: min(var(--site-container-max), var(--site-container-width));
  margin: 3.2rem auto 1rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero p {
  max-width: 56ch;
  color: var(--muted);
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 1.1rem;
  box-shadow: 0 10px 20px rgba(20, 33, 61, 0.08);
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-badges li {
  background: #f6f2ea;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.front-page-entry {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.front-hero {
  margin-top: 0;
  margin-bottom: 2rem;
}

.front-section {
  width: 100%;
  padding: 2.5rem 0;
}

.front-section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(245, 239, 229, 0.65));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.front-section h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin-bottom: 0.85rem;
}

.front-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.front-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(20, 33, 61, 0.06);
}

.front-card h3 {
  margin-bottom: 0.45rem;
}

.front-card p {
  color: var(--muted);
}

.front-cta-band {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 1.2rem;
}

.front-cta-band p {
  color: var(--muted);
}

.front-editor-content {
  padding-top: 1rem;
}

.site-footer {
  margin-top: 2.4rem;
  border-top: 1px solid #2f2f2f;
  font-family: "Poppins", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(180deg, #0b0b0b, #000000);
  backdrop-filter: blur(10px);
}

.site-footer__inner {
  padding: 2.2rem 0 1.2rem;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: clamp(1rem, 2.2vw, 2rem);
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer__title {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  letter-spacing: 0.02em;
  color: #ffffff;
}

.site-footer__logo-wrap {
  margin-bottom: 0.75rem;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-footer__logo-image {
  display: block;
  width: auto;
  max-height: 56px;
}

.site-footer__logo--text {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer__tagline {
  margin-top: 0.35rem;
  color: #ffffff;
  font-weight: 600;
}

.site-footer__about {
  margin-top: 0.75rem;
  color: #c8c8c8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.site-footer__column h3,
.site-footer__cta h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.7rem;
}

.site-footer__column ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.site-footer a {
  color: #f2f2f2;
  text-decoration: none;
}

.site-footer__column a {
  font-size: 0.92rem;
  color: #e8e8e8;
  transition: transform 0.18s ease, color 0.18s ease;
  display: inline-flex;
}

.site-footer__column a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.site-footer__cta {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.36);
}

.site-footer__cta p {
  color: #d2d2d2;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.site-footer__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000 !important;
  padding: 0.58rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-footer__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(255, 255, 255, 0.2);
}

.site-footer__bottom {
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.site-footer__bottom p {
  color: #bfbfbf;
  font-size: 0.89rem;
  line-height: 1.4;
}

.site-footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.site-footer__legal a {
  font-size: 0.86rem;
  color: #dadada;
}

.site-footer__legal a:hover {
  color: #ffffff;
}

/* Mobile layout swaps the horizontal nav for a full-width drawer. */
@media (max-width: 1100px) {
  body.menu-open {
    overflow: hidden;
  }

  .header .container {
    padding: 16px 18px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: var(--mobile-header-height);
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100dvh - var(--mobile-header-height));
    overflow-y: auto;
    background: #14213d;
    flex-direction: column;
    display: none;
    align-items: stretch;
    padding: 0.3rem 0 max(1rem, env(safe-area-inset-bottom));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 998;
  }

  .nav.active {
    display: flex;
  }

  .menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .menu li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu a {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0.85rem 1rem;
  }

  .mega-menu {
    position: static;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    display: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    border: 0;
    background: #1f2d52;
  }

  .has-mega.is-open .mega-menu,
  .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .has-mega.is-open .mega-menu {
    transform: none;
  }

  .sub-menu {
    list-style: none;
    display: none;
    background: #1f2d52;
  }

  .sub-menu a {
    color: #d8deeb;
    padding-left: 1.75rem;
  }

  .mega-content {
    grid-template-columns: 1fr;
    padding: 0.75rem 1rem 1rem;
    gap: 0.5rem;
  }

  .mega-column h4 {
    color: #fff;
  }

  .mega-column a {
    color: #d8deeb;
    padding: 0.15rem 0;
  }

  .cta {
    margin: 0.8rem 1rem 0.6rem;
    display: block;
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
    gap: 1rem;
  }

  .front-grid {
    grid-template-columns: 1fr;
  }

  .front-section {
    padding: 2rem 0;
  }

  .entry-content > .wp-block-group {
    padding-inline: clamp(1rem, 5vw, 2rem);
  }

  .entry-content .wp-block-buttons {
    margin-top: 0.95rem;
    gap: 0.6rem;
  }

  .logo-image {
    height: 38px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

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

  .site-footer__cta {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .container,
  .hero {
    width: 94%;
  }

  .hero {
    margin-bottom: 0.75rem;
  }

  .entry-content > .wp-block-group {
    padding-block: 1.6rem;
    padding-inline: 1rem;
  }

  .hero-card {
    padding: 0.95rem;
  }

  .hero-badges {
    gap: 0.45rem;
  }

  .site-footer {
    margin-top: 1.7rem;
  }

  .site-footer__inner {
    padding: 1.4rem 0 1rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .site-footer__links {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__bottom p,
  .site-footer__legal a {
    font-size: 0.85rem;
  }

  .site-footer__logo-image {
    max-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.logo-wrap,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.custom-logo {
  display: block;
  width: auto;
  max-height: 100px;
}

@media (max-width: 1100px) {
  .custom-logo {
    max-height: 38px;
  }
}