/*
Theme Name: CIMS Caribbean Theme
Theme URI: https://cimsdashboard.com
Author: CIMS
Author URI: https://cimsdashboard.com
Description: Mobile-responsive WooCommerce-ready WordPress theme for Caribbean Invoice Management System. Fully editable via Theme Options / Customizer. Integrates with CIMS Dashboard plugin.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cims-theme
Tags: dark, custom-colors, custom-logo, custom-menu, featured-images, flexible-header, full-width-template, theme-options, translation-ready, woocommerce, responsive, one-column, two-columns

CIMS Caribbean Theme - Landing + marketing pages for CIMS Dashboard.
*/

/* ==========================================================================
   CSS Variables (overridable via Customizer)
   ========================================================================== */
:root {
  --cims-bg: #0a0f1a;
  --cims-bg-secondary: #0d1526;
  --cims-card: #111827;
  --cims-border: #1e293b;
  --cims-green: #22c55e;
  --cims-green-hover: #16a34a;
  --cims-green-light: #4ade80;
  --cims-text: #f8fafc;
  --cims-text-muted: #94a3b8;
  --cims-text-dim: #64748b;
  --cims-accent: #22c55e;
  --cims-radius: 12px;
  --cims-radius-sm: 8px;
  --cims-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --cims-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cims-container: 1100px;
  --cims-header-height: 72px;
  --cims-aurora-speed: 20s;
  --cims-aurora-speed-2: 25s;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--cims-font);
  background: var(--cims-bg);
  color: var(--cims-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Faded glowing #22c55e aurora background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 15% -5%, rgba(34, 197, 94, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 75% 50% at 90% 10%, rgba(34, 197, 94, 0.16) 0%, transparent 52%),
    radial-gradient(ellipse 65% 45% at 50% 95%, rgba(34, 197, 94, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 55% 35% at 5% 55%, rgba(34, 197, 94, 0.10) 0%, transparent 48%),
    radial-gradient(ellipse 40% 30% at 70% 40%, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
  animation: cims-aurora var(--cims-aurora-speed) ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at 60% 30%, rgba(34, 197, 94, 0.06) 0%, transparent 60%);
  animation: cims-aurora-2 var(--cims-aurora-speed-2) ease-in-out infinite alternate;
}

@keyframes cims-aurora {
  0% {
    opacity: 0.75;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 1;
    transform: scale(1.08) translate(2%, -2%);
  }
}

@keyframes cims-aurora-2 {
  0% {
    opacity: 0.5;
    transform: scale(1.05) translate(-1%, 1%);
  }
  100% {
    opacity: 0.95;
    transform: scale(1) translate(1%, -1%);
  }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cims-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cims-green-light); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--cims-container);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on all devices */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

.cims-header__inner,
.cims-hero,
.cims-showcase,
.cims-features,
.cims-footer,
.cims-content,
.cims-page-header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cims-showcase__devices {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cims-showcase__laptop,
.cims-showcase__main {
  max-width: 100% !important;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.cims-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cims-border);
  height: var(--cims-header-height);
}

.cims-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.cims-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cims-text);
  white-space: nowrap;
}

.cims-logo img,
.cims-logo .custom-logo,
.cims-menu-logo {
  height: 40px;
  width: auto;
  max-height: 48px;
  object-fit: contain;
}

.cims-logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

.cims-logo img { height: 36px; width: auto; }
.cims-logo span { color: var(--cims-green); }

.cims-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.cims-nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cims-nav-menu a {
  color: var(--cims-text-muted);
  padding: 8px 14px;
  border-radius: var(--cims-radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cims-nav-menu a:hover,
.cims-nav-menu .current-menu-item > a {
  color: var(--cims-text);
  background: rgba(34, 197, 94, 0.1);
}

.cims-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.cims-btn--primary {
  background: var(--cims-green);
  color: #0a0f1a !important;
}

.cims-btn--primary:hover {
  background: var(--cims-green-hover);
  color: #0a0f1a !important;
  transform: translateY(-1px);
}

.cims-btn--outline {
  background: transparent;
  color: var(--cims-text) !important;
  border: 1px solid var(--cims-border);
}

.cims-btn--outline:hover {
  border-color: var(--cims-green);
  color: var(--cims-green) !important;
  background: rgba(34, 197, 94, 0.08);
}

.cims-btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Mobile menu toggle */
.cims-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cims-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.cims-hero {
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cims-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cims-hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cims-hero__title .highlight {
  color: var(--cims-green);
}

.cims-hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--cims-text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.cims-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

/* ==========================================================================
   Dashboard Showcase
   ========================================================================== */
.cims-showcase {
  padding: 20px 0 60px;
  position: relative;
}

.cims-showcase__devices {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}

.cims-showcase__laptop {
  width: 75%;
  max-width: 720px;
  z-index: 2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--cims-shadow);
  border: 1px solid var(--cims-border);
}

.cims-showcase__tablet {
  width: 32%;
  max-width: 280px;
  position: absolute;
  right: 8%;
  bottom: -10%;
  z-index: 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--cims-shadow);
  border: 1px solid var(--cims-border);
}

.cims-showcase__phone {
  width: 18%;
  max-width: 160px;
  position: absolute;
  right: 0;
  bottom: -5%;
  z-index: 4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--cims-shadow);
  border: 1px solid var(--cims-border);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.cims-features {
  padding: 60px 0 80px;
}

.cims-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cims-feature {
  background: var(--cims-card);
  border: 1px solid var(--cims-border);
  border-radius: var(--cims-radius);
  padding: 28px 22px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.cims-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.4);
}

.cims-feature__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 12px;
  color: #22c55e;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}

.cims-feature__icon .cims-feature__svg {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.cims-feature__icon .cims-feature__svg svg {
  width: 24px;
  height: 24px;
  stroke: #22c55e;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.5));
}

.cims-feature__icon .cims-feature__emoji {
  color: #22c55e;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
  line-height: 1;
  /* Approximate green tint on emoji where filters apply */
  filter: sepia(1) saturate(5) hue-rotate(70deg) brightness(0.95);
}

.cims-feature__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  /* Tint uploaded icons toward #22c55e */
  filter: brightness(0) saturate(100%) invert(64%) sepia(64%) saturate(500%) hue-rotate(85deg) brightness(95%) contrast(95%);
}

.cims-feature__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--cims-text);
}

.cims-feature__desc {
  font-size: 0.9rem;
  color: var(--cims-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Generic Page Content
   ========================================================================== */
.cims-page-header {
  padding: 60px 0 30px;
  text-align: center;
}

.cims-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cims-page-header p {
  color: var(--cims-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.cims-content {
  padding: 20px 0 80px;
}

.cims-content .entry-content {
  max-width: 800px;
  margin: 0 auto;
}

.cims-content .entry-content h2 {
  font-size: 1.5rem;
  margin: 2em 0 0.75em;
  color: var(--cims-green);
}

.cims-content .entry-content h3 {
  font-size: 1.2rem;
  margin: 1.5em 0 0.5em;
}

.cims-content .entry-content p {
  margin-bottom: 1.25em;
  color: var(--cims-text-muted);
}

.cims-content .entry-content ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 1.25em;
  color: var(--cims-text-muted);
}

/* How it works steps */
.cims-steps {
  display: grid;
  gap: 32px;
  max-width: 800px;
  margin: 40px auto;
}

.cims-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--cims-card);
  border: 1px solid var(--cims-border);
  border-radius: var(--cims-radius);
  padding: 24px;
}

.cims-step__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cims-green);
  color: #0a0f1a;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cims-step__body h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.cims-step__body p {
  color: var(--cims-text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* FAQ Accordion */
.cims-faq {
  max-width: 720px;
  margin: 40px auto;
}

.cims-faq-item {
  border: 1px solid var(--cims-border);
  border-radius: var(--cims-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--cims-card);
}

.cims-faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cims-faq-item summary::-webkit-details-marker { display: none; }

.cims-faq-item summary::after {
  content: '+';
  color: var(--cims-green);
  font-size: 1.3rem;
  font-weight: 400;
}

.cims-faq-item[open] summary::after { content: '−'; }

.cims-faq-item .cims-faq-answer {
  padding: 0 20px 18px;
  color: var(--cims-text-muted);
  font-size: 0.95rem;
}

/* Support / Contact */
.cims-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 40px auto;
}

.cims-support-card {
  background: var(--cims-card);
  border: 1px solid var(--cims-border);
  border-radius: var(--cims-radius);
  padding: 28px;
  text-align: center;
}

.cims-support-card h3 {
  margin: 12px 0 8px;
}

.cims-support-card p {
  color: var(--cims-text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.cims-footer {
  background: var(--cims-bg-secondary);
  border-top: 1px solid var(--cims-border);
  padding: 48px 0 24px;
}

.cims-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.cims-footer__brand p {
  color: var(--cims-text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}

.cims-footer__col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--cims-text);
}

.cims-footer__col a {
  display: block;
  color: var(--cims-text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.cims-footer__col a:hover { color: var(--cims-green); }

.cims-footer__bottom {
  border-top: 1px solid var(--cims-border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--cims-text-dim);
}

/* ==========================================================================
   WooCommerce Compatibility
   ========================================================================== */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
  background: var(--cims-green) !important;
  color: #0a0f1a !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
}

.woocommerce .button:hover {
  background: var(--cims-green-hover) !important;
}

.woocommerce-page .content-area {
  max-width: var(--cims-container);
  margin: 0 auto;
  padding: 40px 20px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  :root {
    --cims-container: 960px;
  }
}

@media (max-width: 992px) {
  :root {
    --cims-container: 100%;
  }
  .container {
    padding: 0 16px;
  }
  .cims-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cims-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .cims-showcase__tablet {
    width: 36%;
    right: 4%;
  }
  .cims-showcase__phone {
    width: 20%;
  }
}

@media (max-width: 768px) {
  .cims-menu-toggle { display: block; }

  .cims-nav {
    position: fixed;
    top: var(--cims-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cims-bg);
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .cims-nav.is-open {
    transform: translateX(0);
  }

  .cims-nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }

  .cims-nav-menu a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
  }

  .cims-nav .cims-btn {
    width: 100%;
    justify-content: center;
  }

  .cims-hero { padding: 48px 0 24px; }

  .cims-showcase__devices {
    flex-direction: column;
    align-items: center;
  }

  .cims-showcase__laptop {
    width: 100%;
  }

  .cims-showcase__tablet,
  .cims-showcase__phone {
    position: static;
    width: 70%;
    max-width: 240px;
    margin-top: 16px;
  }

  .cims-showcase__phone {
    width: 45%;
    max-width: 140px;
  }

  .cims-features__grid {
    grid-template-columns: 1fr;
  }

  .cims-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cims-step {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .cims-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cims-btn--lg {
    width: 100%;
  }
}

/* Utility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Language switcher */
.cims-lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.cims-lang-switcher .cims-lang-link {
  font-size: 0.8rem;
  color: var(--cims-text-muted);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--cims-border);
}
.cims-lang-switcher .cims-lang-link:hover,
.cims-lang-switcher .cims-lang-link.is-active {
  color: #0a0f1a;
  background: var(--cims-green);
  border-color: var(--cims-green);
}
