﻿/*
 * AIClarum - Main Custom CSS
 * AI Transparency & Compliance Automation
 * Theme: Light | Accent: #0ea5e9 (sky blue)
 */

/* ── CSS Variables ─────────────────────────────── */
:root {
  --accent:          #0ea5e9;
  --accent-dark:     #0284c7;
  --accent-light:    #e0f2fe;
  --bg:              #f8f9fa;
  --surface:         #ffffff;
  --text:            #1e293b;
  --text-muted:      #64748b;
  --border:          rgba(0,0,0,0.08);
  --radius:          12px;
  --gap:             2.5em;
  --nav-height:      70px;
  --funding-bar-h:   0px;

  /* override template primary */
  --primary-color:   #0ea5e9;
  --secondary-color: #0284c7;
}

/* ── Reset / Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'DM Sans', Arial, sans-serif;
}

/* ── Funding Bar ────────────────────────────────── */
#funding-bar {
  background-color: var(--accent-dark) !important;
  color: #ffffff !important;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10001;
  padding: 0.55em 3em 0.55em 1.5em;
  font-size: 0.82em;
  letter-spacing: 0.03em;
  text-align: center;
  box-sizing: border-box;
}
#funding-bar a,
#funding-bar strong,
#funding-bar span {
  color: #ffffff !important;
}
#funding-bar button {
  color: rgba(255,255,255,0.85) !important;
}

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  position: fixed !important;
  top: var(--funding-bar-h, 0px);
  left: 0; right: 0;
  z-index: 9999 !important;
  background: var(--surface) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  min-height: var(--nav-height);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.navbar-brand {
  color: var(--accent) !important;
  font-size: 1.4em !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.navbar-brand img {
  height: 34px !important;
  width: auto !important;
  display: block;
}
.navbar-nav .nav-link {
  color: var(--text) !important;
  font-size: 0.8em !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6em 1em !important;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  color: var(--accent) !important;
}
.navbar-nav .nav-link.active {
  font-weight: 700 !important;
}
#page-top {
  padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
}

/* ── Site Header (top bar) ──────────────────────── */
.site-header {
  background: var(--accent-dark) !important;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
  display: none; /* hidden - we use standard nav */
}

/* ── Hero / Carousel ────────────────────────────── */
.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
}
.hero-carousel,
.carousel-inner,
.carousel-item {
  height: 100% !important;
}
.carousel-image-wrap {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
}
.carousel-image {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.carousel-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1;
  pointer-events: none;
}
.carousel-caption {
  z-index: 9;
  top: 28%;
  bottom: 0;
  left: 0;
  text-align: left;
  width: 58%;
  margin-left: 12px;
  margin-right: 12px;
}
.carousel-caption h1 {
  color: #ffffff !important;
  font-size: 3em;
  line-height: 1.15;
}
.carousel-caption p,
.carousel-caption small {
  color: rgba(255,255,255,0.82) !important;
}
.carousel-control-next,
.carousel-control-prev {
  top: auto;
  bottom: 40px;
  opacity: 1;
}
.carousel-control-prev {
  left: auto;
  right: 80px;
}

/* ── Buttons ────────────────────────────────────── */
.custom-btn,
.btn-accent {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 100px;
  font-weight: 700;
  padding: 12px 28px;
  border: none;
  transition: background 0.3s;
}
.custom-btn:hover,
.btn-accent:hover {
  background: var(--accent-dark) !important;
  color: #fff !important;
}
.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent) !important;
  border-radius: 100px;
  background: transparent;
  font-weight: 700;
  padding: 10px 26px;
  transition: all 0.3s;
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff !important;
}

/* ── Section padding ────────────────────────────── */
.section-padding {
  padding-top: 100px;
  padding-bottom: 100px;
}
.section-bg {
  background: var(--accent-light);
}

/* ── Small title / Section label ────────────────── */
.small-title {
  color: var(--accent);
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.8em;
}

/* ── About Section ──────────────────────────────── */
.about-image-wrap {
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.about-image-info {
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 90%);
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2em;
  border-radius: 0 0 var(--radius) var(--radius);
}
.about-thumb {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5em;
  margin-bottom: 1.5em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.about-thumb.accent-card {
  background: var(--accent);
}
.about-thumb.accent-card h5,
.about-thumb.accent-card p { color: #fff !important; }

/* ── Services / Solutions Tab Section ───────────── */
.services {
  background: var(--bg);
}
.nav-tabs { border-bottom: 0; }
.nav-tabs .nav-link,
.nav-tabs .nav-link span {
  color: var(--text-muted);
  display: block;
  text-align: left;
}
.nav-tabs .nav-link {
  border-radius: 0;
  border: 0;
  border-left: 5px solid transparent;
  padding: 1.5em 2em;
  margin-bottom: 1em;
  transition: all 0.3s;
  background: var(--surface);
  border-radius: 8px;
}
.nav-tabs .nav-link h3 { font-size: 1.2em; margin-bottom: 0.4em; color: var(--text); }
.nav-tabs .nav-link span { font-size: 0.9em; line-height: 1.5; }
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  border-left-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(14,165,233,0.12);
}
.nav-tabs .nav-link.active h3,
.nav-tabs .nav-link:focus h3,
.nav-tabs .nav-link:hover h3 {
  color: var(--accent);
}
.tab-content img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 1.5em;
}

/* ── Features / Stats Bar ────────────────────────── */
.features-bar {
  background: var(--accent);
  padding: 3em 0;
}
.features-bar .feature-stat {
  text-align: center;
  color: #fff;
}
.features-bar .feature-stat h3 {
  color: #fff;
  font-size: 2.5em;
  margin-bottom: 0.1em;
}
.features-bar .feature-stat p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95em;
  margin: 0;
}

/* ── Advantages / Cards ──────────────────────────── */
.advantage-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2em;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: 100%;
  transition: box-shadow 0.3s, transform 0.3s;
}
.advantage-card:hover {
  box-shadow: 0 8px 30px rgba(14,165,233,0.15);
  transform: translateY(-3px);
}
.advantage-card .card-icon {
  width: 52px; height: 52px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2em;
}
.advantage-card .card-icon i {
  font-size: 1.4em;
  color: var(--accent);
}
.advantage-card h5 {
  font-size: 1.05em;
  font-weight: 700;
  margin-bottom: 0.6em;
  color: var(--text);
}
.advantage-card p {
  font-size: 0.92em;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* ── Team Cards ──────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.team-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2em 1.5em;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: center;
}
.team-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 10%;
  display: block;
  margin: 0 auto 1.2em;
}
.team-card h5 { font-weight: 700; font-size: 1.05em; margin-bottom: 0.2em; color: var(--text); }
.team-card .team-role { color: var(--accent); font-size: 0.88em; font-weight: 600; margin-bottom: 0.8em; }
.team-card .bio { font-size: 0.88em; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ── Blog / Listing ─────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
}
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
}
.article-card:hover {
  box-shadow: 0 8px 30px rgba(14,165,233,0.12);
  transform: translateY(-3px);
}
.article-card.pinned {
  border-left: 4px solid var(--accent);
  background: rgba(14,165,233,0.04);
}
.card-thumb {
  overflow: hidden;
  width: 100%;
}
.card-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-body-inner {
  padding: 1.6em;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 0.8em;
}
.tag.funding {
  background: var(--accent);
  color: #fff;
}
.article-card h3 {
  font-size: 1em;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.6em;
  color: var(--text);
}
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card time {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-top: auto;
  display: block;
  padding-top: 0.8em;
}
.article-card p.excerpt {
  font-size: 0.88em;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 0.5em;
}

/* ── Article Detail ──────────────────────────────── */
.article-hero-img {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 2em;
}
.article-hero-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.article-content h2 { font-size: 1.6em; margin-top: 2em; margin-bottom: 0.6em; }
.article-content h3 { font-size: 1.3em; margin-top: 1.5em; margin-bottom: 0.5em; }
.article-content p { font-size: 1em; line-height: 1.8; color: var(--text-muted); margin-bottom: 1.2em; }
.article-content ul { padding-left: 1.5em; margin-bottom: 1.2em; }
.article-content ul li { font-size: 1em; color: var(--text-muted); line-height: 1.8; }
.article-back { display: inline-flex; align-items: center; gap: 0.4em; color: var(--accent); font-weight: 600; font-size: 0.9em; text-decoration: none; margin-bottom: 2em; }
.article-back:hover { color: var(--accent-dark); }

/* ── Section Hero (inner pages) ─────────────────── */
.section-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 6em 0;
}
.section-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
  pointer-events: none;
}
.section-hero > * { position: relative; z-index: 2; }
.section-hero h1, .section-hero h2, .section-hero p { color: #fff !important; }
.section-hero p.text-muted { color: rgba(255,255,255,0.82) !important; }

/* Page hero backgrounds */
body.page-about .section-hero {
  background-image: url('../images/about-hero.jpg');
}
body.page-blog .section-hero {
  background-image: url('../images/blog-hero.jpg');
}
body.page-solutions .section-hero {
  background-image: url('../images/solutions-hero.jpg');
}
body.page-contact .section-hero {
  background-image: url('../images/contact-hero.jpg');
}
body.page-team .section-hero {
  background-image: url('../images/team-hero.jpg');
}
body.page-legal .section-hero {
  background-image: url('../images/legal-hero.jpg');
}

/* ── Spotlight Two-col (About story) ─────────────── */
.spotlight-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4em;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4em 2em;
}
@media (max-width: 768px) {
  .spotlight-section { grid-template-columns: 1fr; }
}
.story-img { width: 100%; overflow: hidden; border-radius: var(--radius); }
.story-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius);
}

/* ── Footer ──────────────────────────────────────── */
#footer, .site-footer {
  background: #1e293b !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 4em 2em 2em;
}
#footer .inner, .footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2em;
  align-items: start;
}
#footer h2, #footer h4, .footer-inner h4 {
  color: #ffffff;
  font-size: 0.95em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
}
#footer p, .footer-inner p {
  color: rgba(255,255,255,0.6);
  font-size: 0.88em;
  line-height: 1.7;
  margin: 0;
}
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5em; }
.footer-nav a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88em;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.copyright-text {
  color: rgba(255,255,255,0.45);
  font-size: 0.82em;
  text-align: center;
  display: block;
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Hide template social icon (no social media per R-SOCIAL1) */
.social-icon { display: none !important; }

/* ── Contact ─────────────────────────────────────── */
.contact-info {
  border-radius: var(--radius);
  padding: 2.5em;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.contact-info h5 { color: var(--text); font-size: 0.95em; }
.contact-icon { color: var(--accent) !important; font-size: 1.4em !important; }
.google-map { border-radius: var(--radius); }

/* ── Cookie Banner ───────────────────────────────── */
#cookie-banner {
  background: var(--surface);
  color: var(--text);
  padding: 1.2em 2em;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10003;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}
#cookie-banner p { margin: 0; font-size: 0.88em; color: var(--text-muted); }
#cookie-banner a { color: var(--accent); }
#cookie-banner button { border: none; padding: 0.45em 1.2em; border-radius: 6px; cursor: pointer; font-size: 0.85em; }
#cookie-banner #cookie-accept { background: var(--accent); color: #fff; }
#cookie-banner #cookie-decline { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }

/* ── Legal pages ─────────────────────────────────── */
.legal-content h2 { font-size: 1.5em; margin-top: 2em; margin-bottom: 0.6em; }
.legal-content h3 { font-size: 1.2em; margin-top: 1.5em; }
.legal-content p, .legal-content li { font-size: 0.95em; line-height: 1.8; color: var(--text-muted); }
.legal-content ul { padding-left: 1.5em; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 991px) {
  .hero { height: 520px; }
  .carousel-caption { width: 100%; }
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .hero { height: 460px; }
  
  #footer .inner, .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero { height: 420px; }
  #footer .inner, .footer-inner { grid-template-columns: 1fr; }
  #cookie-banner { flex-direction: column; text-align: center; }
}

/* Tab active-tab class (Bootstrap tab first button) */
.nav-tabs .nav-link.active-tab,
.nav-tabs .nav-link.active-tab:focus {
  border-left-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(14,165,233,0.12);
}
.nav-tabs .nav-link.active-tab h3 { color: var(--accent); }
/* page-top: offset for fixed nav */
.page-top {
  padding-top: var(--nav-height, 70px);
}

/* container layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Card Grid Equal Height Fix === */
.features-grid,
.services-grid,
.cards-grid,
.solutions-grid,
.advantages-grid {
  align-items: start;
}

.card-custom,
.service-card,
.solution-card,
.advantage-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-custom p,
.service-card p,
.solution-card p,
.advantage-card p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* === Card Equal Height (stretch to tallest card) === */
.features-grid,
.services-grid,
.cards-grid,
.solutions-grid,
.advantages-grid,
.platform-grid,
[class*="-grid"] {
  align-items: stretch;
}

.card-custom,
.service-card,
.solution-card,
.advantage-card,
.feature-card,
.platform-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box;
}

.card-custom h3,
.card-custom h4,
.service-card h3,
.solution-card h3 {
  flex-shrink: 0;
}

.card-custom p:last-of-type,
.service-card p:last-of-type,
.solution-card p:last-of-type {
  flex: 1;
}

/* === Odd-count card grid: last card centered === */
.features-grid > .card-custom:last-child:nth-child(odd),
.services-grid > .card-custom:last-child:nth-child(odd),
.cards-grid > .card-custom:last-child:nth-child(odd),
.solutions-grid > .card-custom:last-child:nth-child(odd),
.advantages-grid > .card-custom:last-child:nth-child(odd),
.features-grid > *:last-child:nth-child(odd),
.services-grid > *:last-child:nth-child(odd),
[class*="-grid"] > .card-custom:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 1rem);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
