/*
Theme Name: AI4CM Elementor
Theme URI: https://ai4cm.com/
Author: EMARI Network
Description: A complete AI4CM construction-management theme designed for WordPress and the free version of Elementor. Includes dynamic content types, taxonomies, native custom fields, starter content, shortcodes, and Elementor-compatible templates.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: ai4cm
Tags: elementor, construction, technology, custom-logo, featured-images, full-width-template
*/

:root {
  --ai4cm-brown: #5C4033;
  --ai4cm-cream: #F5EFE6;
  --ai4cm-orange: #E07A2F;
  --ai4cm-dark: #3B2C22;
  --ai4cm-card: #FBF7F0;
  --ai4cm-white: #FFFFFF;
  --ai4cm-radius: 14px;
  --ai4cm-shadow: 0 12px 35px rgba(59, 44, 34, .10);
  --ai4cm-max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ai4cm-dark); background: var(--ai4cm-white); font-family: Inter, Arial, sans-serif; line-height: 1.65; }
a { color: var(--ai4cm-orange); text-decoration: none; }
a:hover { color: #b85d1f; }
img { max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--ai4cm-max)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 999; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(92,64,51,.12); backdrop-filter: blur(12px); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-branding { display: flex; align-items: center; gap: 12px; }
.custom-logo { max-height: 48px; width: auto; }
.site-title { color: var(--ai4cm-brown); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 800; }
.main-navigation ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.main-navigation a { color: var(--ai4cm-dark); font-weight: 650; }
.main-navigation a:hover { color: var(--ai4cm-orange); }
.menu-toggle { display: none; border: 0; background: var(--ai4cm-orange); color: white; border-radius: 8px; padding: 10px 14px; }

.ai4cm-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 80% 20%, rgba(224,122,47,.26), transparent 30%), linear-gradient(135deg, #2f211b 0%, #5c4033 65%, #7c5037 100%); color: white; padding: clamp(90px, 12vw, 160px) 0; }
.ai4cm-hero::after { content: ""; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 42px 42px; }
.hero-content { position: relative; z-index: 1; max-width: 820px; }
.eyebrow { display: inline-block; color: #ffd2ad; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.ai4cm-hero h1 { font-family: Georgia, serif; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 1.03; margin: 18px 0 24px; }
.ai4cm-hero p { font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 720px; color: #f9eee4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.ai4cm-button { display: inline-flex; align-items: center; justify-content: center; background: var(--ai4cm-orange); color: white; border-radius: 9px; padding: 13px 22px; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.ai4cm-button:hover { color: white; background: #bd611f; transform: translateY(-2px); }
.ai4cm-button.secondary { background: transparent; border: 1px solid rgba(255,255,255,.55); }
.ai4cm-button.secondary:hover { background: white; color: var(--ai4cm-brown); }

.ai4cm-section { padding: 82px 0; }
.ai4cm-section.alt { background: var(--ai4cm-cream); }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading h2 { color: var(--ai4cm-brown); font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; margin: 0 0 12px; }
.section-heading p { margin: 0; font-size: 1.08rem; }

.ai4cm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ai4cm-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai4cm-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ai4cm-card { background: var(--ai4cm-card); border: 1px solid rgba(92,64,51,.10); border-radius: var(--ai4cm-radius); overflow: hidden; box-shadow: var(--ai4cm-shadow); transition: transform .22s ease, box-shadow .22s ease; height: 100%; }
.ai4cm-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(59,44,34,.16); }
.card-image { aspect-ratio: 16/9; background: linear-gradient(135deg, #d8c1af, #f7e9db); overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 24px; }
.card-kicker { color: var(--ai4cm-orange); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.card-body h3 { margin: 8px 0 12px; color: var(--ai4cm-brown); font-family: Georgia, serif; font-size: 1.45rem; line-height: 1.2; }
.card-body p { margin: 0 0 16px; }
.card-link { font-weight: 800; }

.ai4cm-list { display: grid; gap: 16px; counter-reset: ai4cm-item; }
.ai4cm-list .ai4cm-card { display: grid; grid-template-columns: 84px 1fr; align-items: stretch; counter-increment: ai4cm-item; }
.ai4cm-list .ai4cm-card::before { content: counter(ai4cm-item, decimal-leading-zero); display: grid; place-items: center; background: var(--ai4cm-brown); color: white; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 800; }

.ai4cm-cta { background: linear-gradient(135deg, var(--ai4cm-orange), #b75c1f); color: white; border-radius: 22px; padding: clamp(38px, 6vw, 70px); display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.ai4cm-cta h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); }
.ai4cm-cta .ai4cm-button { background: white; color: var(--ai4cm-brown); white-space: nowrap; }

.site-main { min-height: 55vh; }
.entry-wrap { width: min(calc(100% - 40px), 900px); margin: 70px auto; }
.entry-title { color: var(--ai4cm-brown); font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; }
.entry-meta { color: #79685f; margin-bottom: 30px; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3 { color: var(--ai4cm-brown); font-family: Georgia, serif; }
.archive-header { padding: 70px 0 20px; }
.archive-header h1 { font-family: Georgia, serif; color: var(--ai4cm-brown); font-size: clamp(2.3rem, 5vw, 4rem); margin: 0; }
.pagination { margin: 36px 0; }

.site-footer { background: #2f211b; color: #f7eee6; padding: 60px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: white; font-family: Georgia, serif; }
.site-footer a { color: #ffc28e; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); margin-top: 40px; padding-top: 20px; font-size: .9rem; }

.elementor-page .entry-wrap { width: 100%; max-width: none; margin: 0; }
.elementor-page .entry-header { display: none; }

@media (max-width: 900px) {
  .ai4cm-grid, .ai4cm-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: block; }
  .main-navigation { display: none; position: absolute; left: 0; right: 0; top: 74px; background: white; padding: 20px; border-bottom: 1px solid #eee; }
  .main-navigation.open { display: block; }
  .main-navigation ul { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .ai4cm-grid, .ai4cm-grid.cols-2, .ai4cm-grid.cols-4 { grid-template-columns: 1fr; }
  .ai4cm-list .ai4cm-card { grid-template-columns: 62px 1fr; }
  .ai4cm-cta { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .ai4cm-section { padding: 60px 0; }
}
