/*
Theme Name: Cemetrix V1
Theme URI: http://example.com/cemetrix
Author: Cemetrix Team
Description: Custom WordPress theme for Cemetrix built with Secure Custom Fields.
Version: 1.0
Text Domain: cemetrix
*/

/* ---------- COLOR VARIABLES ---------- */
:root {
  --ink: #0E1B2A;
  --steel: #3A4A5C;
  --steel-soft: #5C7085;
  --paper: #EDEAE2;
  --paper-dim: #E1DDD2;
  --copper: #C1652F;
  --cyan: #3FA79A;
  --line: rgba(14, 27, 42, 0.14);
  --line-dark: rgba(237, 234, 226, 0.16);
}

/* ---------- CORE LAYOUT & RELIEF ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: rgb(237, 234, 226);
  color: #0E1B2A;
  font-family: 'IBM Plex Sans', sans-serif;
}

.wrap {
  max-width: 1180px; 
  margin: 0 auto; 
  padding: 0 32px;
  width: 100%;
}

@media(max-width: 700px) {
  .wrap {
    padding: 0 20px;
  }
}

/* ---------- HEADER & NAVIGATION ---------- */
.site-header {
  background: rgba(14, 27, 42, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.site-header nav.wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 34px;
}

.navlinks ul.main-menu {
  display: flex;
  gap: 34px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navlinks ul.main-menu li a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(237, 234, 226, 0.85);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  font-family: 'IBM Plex Sans', sans-serif;
}

.navlinks ul.main-menu li a:hover {
  color: #fff;
}

.navlinks ul.main-menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--copper);
  transition: width .25s ease;
}

.navlinks ul.main-menu li a:hover::after {
  width: 100%;
}

/* Dropdown styling */
.custom-dropdown-styling ul.main-menu li {
  position: relative;
}
.custom-dropdown-styling ul.main-menu li a {
  color: var(--paper);
  text-transform: uppercase;
}
.custom-dropdown-styling ul.main-menu li:hover > a,
.custom-dropdown-styling ul.main-menu li.current-menu-item > a {
  color: #FFB800;
}
.custom-dropdown-styling ul.main-menu li ul.sub-menu {
  display: none;
  position: absolute;
  top: 25px;
  left: 0;
  background-color: #222;
  min-width: 200px;
  border-top: 2px solid #FFB800;
}
.custom-dropdown-styling ul.main-menu li:hover ul.sub-menu {
  display: block;
}
.custom-dropdown-styling ul.main-menu li:hover::after ul.sub-menu {
  display: block;
  transition: width .55s ease;
}
.custom-dropdown-styling ul.main-menu li ul.sub-menu li {
  border-bottom: 1px dotted #FFB800;
}
.custom-dropdown-styling ul.main-menu li ul.sub-menu li a {
  display: block;
  padding: 12px 15px;
  color: #fff;
  text-transform: none;
}

/* Mobile Header Tweak */
@media (max-width: 860px) {
  .custom-dropdown-styling ul.main-menu {
    display: none; 
    flex-direction: column;
    background: var(--ink);
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 20px;
  }
  .custom-dropdown-styling ul.main-menu li ul.sub-menu {
    position: relative;
    width: 100%;
    border-top: none;
    border-left: 2px solid #FFB800;
    padding-left: 15px;
  }
}

/* ---------- HERO SECTION ---------- */
.hero, .hero-landing {
  /* Increased bottom padding so text isn't covered by the overlapping cards */
  padding: 180px 0 240px; 
  color: var(--paper);
}

.hero-grid-single {
  display: block;
  max-width: 600px;
  margin-left: 0;
}

.hero h1 {
  line-height: 1.3; 
  margin-bottom: 24px;
  color: var(--paper);
}

.hero h1 em {
  font-style: normal;
  color: var(--copper);
}

.hero .sub {
  line-height: 1.7; 
  margin-bottom: 40px;
  font-size: 17px;
  color: rgba(237, 234, 226, 0.72);
}

.eyebrow {
  margin-bottom: 24px;
  color: var(--copper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--copper);
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn-primary {
  background: var(--copper);
  color: var(--ink);
  padding: 14px 28px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #d8783f;
}

/* Hero Mobile Overrides */
@media (max-width: 860px) {
  .hero-landing { padding: 120px 20px 180px; }
}
@media (max-width: 560px) {
  .hero h1, .hero-landing h1 { font-size: 32px; }
}

/* ---------- CARDS OVERLAY EFFECT ---------- */
.features-overlap {
  position: relative;
  z-index: 10;
  margin-top: -130px; /* Pulls the section up over the hero */
  padding-bottom: 100px;
}

/* ---------- STANDALONE CAROUSEL COMPONENT ---------- */
.carousel-container {
  width: 100%;
  position: relative;
}

.svc-carousel-track {
  display: flex;
  gap: 30px;
  overflow-x: auto; /* Enables horizontal scrolling */
  scroll-snap-type: x mandatory; /* Snapping effect */
  padding-bottom: 30px; /* Prevents box-shadows from being clipped */
  
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.svc-carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Base Card Width in Carousel (Locks to exactly 4 items across) */
.svc-carousel-track .svc-card {
  /* 25% width minus the exact calculation for 30px gaps */
  width: calc(25% - 22.5px); 
  flex: 0 0 calc(25% - 22.5px); 
  /* Removed height: 450px so they can stretch dynamically */ 
  flex: 0 0 calc(25% - 22.5px); 
  scroll-snap-align: start; 
}

/* Tablet view: 2 items across (Triggers on smaller screens) */
@media (max-width: 900px) {
  .svc-carousel-track .svc-card {
    width: calc(50% - 15px);
    flex: 0 0 calc(50% - 15px);
  }
}

/* Mobile view: 1 item across */
@media (max-width: 560px) {
  .svc-carousel-track .svc-card {
    width: 100%;
    flex: 0 0 100%;
  }
}

/* ---------- CARD STYLING ---------- */
/* Ensure the card itself doesn't stretch internally */
/* ---------- CARD STYLING ---------- */
.svc-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
  text-align: left;
  /* Removed max-height and overflow-y: hidden */
}

.svc-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}

/* Top Image Area */
.svc-card-image {
  width: 100%;
  height: 220px;
  min-height: 220px; /* Forces the image to stay exactly 220px tall */
  flex: 0 0 220px; /* Forbids flexbox from shrinking the image */
  background-size: cover;
  background-position: center;
  border-radius: 4px 4px 0 0;
  background-color: #f4f4f4; 
}

/* Bottom Content Area */
.svc-card-content {
  padding: 50px 30px 30px; 
  position: relative;
  flex-grow: 1;
}

/* Floating Icon Box */
.svc-card-icon {
  position: absolute;
  top: -35px; 
  left: 30px;
  width: 70px;
  height: 70px;
  background: #F4A236; 
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.svc-card-icon i {
  font-size: 32px;
  color: #ffffff;
}

/* Card Typography */
.svc-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #222;
  font-weight: 400; 
}

.svc-card p {
  font-size: 14.5px;
  color: #777;
  line-height: 1.6;
  margin: 0;
}

/* ---------- FOOTER SECTION ---------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  padding: 60px 0 30px;
  color: rgba(237, 234, 226, 0.7);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
}

/* Footer Column 1: Brand */
.foot-brand .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--paper);
  margin-bottom: 16px;
}

.foot-brand p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 250px;
  color: rgba(237, 234, 226, 0.55);
}

/* Footer Link Columns */
.foot-nav h5 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  margin-bottom: 18px;
}

.foot-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.foot-nav li {
  margin-bottom: 12px;
  font-size: 13.5px;
}

.foot-nav a {
  color: rgba(237, 234, 226, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-nav a:hover {
  color: var(--paper);
}

/* Bottom Copyright Bar */
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(237, 234, 226, 0.7);
}

.foot-bottom .mono {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.05em;
}

/* Footer Responsive Design */
@media (max-width: 960px) {
  .foot-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}