/*
Theme Name:        ArijitCloudly Child
Theme URI:         https://arijitcloudly.com
Description:       Modern child theme for ArijitCloudly – AI, Revenue Cloud & SaaS blog
Author:            Arijit Majee
Author URI:        https://arijitcloudly.com
Template:          twentytwentyfour
Version:           1.0.0
License:           GNU General Public License v2 or later
Text Domain:       arijitcloudly-child
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ac-bg:           #f8f9fb;
  --ac-bg-alt:       #ffffff;
  --ac-navy:         #0b1120;
  --ac-navy-mid:     #121d35;
  --ac-blue:         #1a56db;
  --ac-blue-light:   #3b82f6;
  --ac-cyan:         #06b6d4;
  --ac-teal:         #0d9488;
  --ac-gold:         #d97706;
  --ac-purple:       #7c3aed;
  --ac-green:        #059669;
  --ac-red:          #dc2626;
  --ac-text:         #1e293b;
  --ac-text-muted:   #64748b;
  --ac-border:       #e2e8f0;
  --ac-border-dark:  rgba(0,0,0,0.07);
  --ac-shadow-sm:    0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --ac-shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --ac-shadow-lg:    0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
  --ac-radius:       12px;
  --ac-radius-lg:    20px;
  --ac-font-display: 'Syne', sans-serif;
  --ac-font-body:    'DM Sans', sans-serif;
}

/* ============================================================
   BASE RESET & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--ac-font-body);
  background: var(--ac-bg);
  color: var(--ac-text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--ac-font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ac-navy);
}

a { color: var(--ac-blue); text-decoration: none; }
a:hover { color: var(--ac-blue-light); }

img { max-width: 100%; height: auto; }

/* ============================================================
   NAVIGATION — FULL REDESIGN
   ============================================================ */
#masthead,
.site-header,
header.site-header {
  position: sticky !important;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ac-border);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
  padding: 0 !important;
}

.site-header .wp-block-group,
.header-inner,
.site-branding-and-navigation,
nav.main-navigation,
.wp-block-navigation__responsive-container-open {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Logo */
.site-logo img,
.custom-logo,
.site-branding img {
  height: 42px !important;
  width: auto !important;
}

/* Nav items */
.wp-block-navigation a,
.main-navigation a,
nav ul li a {
  font-family: var(--ac-font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--ac-text-muted) !important;
  padding: 0.45rem 0.8rem !important;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s !important;
  letter-spacing: 0;
}

.wp-block-navigation a:hover,
.main-navigation a:hover,
nav ul li a:hover {
  color: var(--ac-navy) !important;
  background: var(--ac-bg) !important;
}

/* Active / current page */
.current-menu-item > a,
.current_page_item > a {
  color: var(--ac-blue) !important;
  background: rgba(26, 86, 219, 0.07) !important;
  font-weight: 600 !important;
}

/* CTA nav button */
.nav-cta > a,
.menu-item.cta > a {
  background: var(--ac-blue) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.1rem !important;
}
.nav-cta > a:hover,
.menu-item.cta > a:hover {
  background: var(--ac-blue-light) !important;
  color: #fff !important;
}

/* Dropdown */
.wp-block-navigation__submenu-container,
.sub-menu {
  background: #fff !important;
  border: 1px solid var(--ac-border) !important;
  border-radius: var(--ac-radius) !important;
  box-shadow: var(--ac-shadow-lg) !important;
  padding: 0.5rem !important;
  min-width: 200px !important;
  margin-top: 0.5rem !important;
}

.sub-menu li a,
.wp-block-navigation__submenu-container a {
  font-size: 0.85rem !important;
  color: var(--ac-text) !important;
  padding: 0.5rem 0.9rem !important;
  border-radius: 7px !important;
  display: block;
}

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.ac-hero {
  background: var(--ac-navy);
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
  text-align: center;
}
.ac-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 0%, rgba(6,182,212,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(26,86,219,0.2) 0%, transparent 60%);
}
.ac-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 20%, transparent 100%);
}
.ac-hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.ac-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--ac-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.ac-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
}
.ac-hero h1 span { color: var(--ac-cyan); }
.ac-hero p {
  color: rgba(255,255,255,0.62);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}
.ac-hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.ac-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--ac-font-body);
  transition: all 0.2s;
  cursor: pointer;
}
.ac-btn-primary {
  background: var(--ac-blue);
  color: #fff;
  box-shadow: 0 0 24px rgba(26,86,219,0.4);
}
.ac-btn-primary:hover { background: var(--ac-blue-light); color: #fff; transform: translateY(-2px); }
.ac-btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.ac-btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; transform: translateY(-2px); }

/* ============================================================
   CATEGORY STRIP
   ============================================================ */
.ac-cats {
  background: #fff;
  border-bottom: 1px solid var(--ac-border);
  padding: 1.25rem 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.ac-cats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.ac-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid;
  transition: all 0.2s;
  cursor: pointer;
}
.ac-cat-pill:hover { transform: translateY(-1px); box-shadow: var(--ac-shadow-sm); }
.pill-ai    { color: #7c3aed; border-color: rgba(124,58,237,0.25); background: rgba(124,58,237,0.06); }
.pill-rc    { color: #0d9488; border-color: rgba(13,148,136,0.25); background: rgba(13,148,136,0.06); }
.pill-bp    { color: #d97706; border-color: rgba(217,119,6,0.25);  background: rgba(217,119,6,0.06);  }
.pill-cert  { color: #1a56db; border-color: rgba(26,86,219,0.25);  background: rgba(26,86,219,0.06);  }
.pill-pod   { color: #dc2626; border-color: rgba(220,38,38,0.25);  background: rgba(220,38,38,0.06);  }
.pill-ai:hover    { background: rgba(124,58,237,0.12); }
.pill-rc:hover    { background: rgba(13,148,136,0.12); }
.pill-bp:hover    { background: rgba(217,119,6,0.12);  }
.pill-cert:hover  { background: rgba(26,86,219,0.12);  }
.pill-pod:hover   { background: rgba(220,38,38,0.12);  }

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.ac-section {
  padding: 4.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.ac-section-header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.ac-section-header h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 0; }
.ac-section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ac-blue);
  margin-bottom: 0.4rem;
  display: block;
}
.ac-view-all {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ac-blue);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ac-view-all::after { content: '→'; }
.ac-view-all:hover { color: var(--ac-blue-light); }

/* ============================================================
   FEATURED POST — LARGE CARD
   ============================================================ */
.ac-featured {
  border-radius: var(--ac-radius-lg);
  overflow: hidden;
  background: var(--ac-navy);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  box-shadow: var(--ac-shadow-lg);
  margin-bottom: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.ac-featured:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
.ac-featured-img {
  position: relative;
  overflow: hidden;
}
.ac-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.ac-featured:hover .ac-featured-img img { transform: scale(1.04); }
.ac-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ac-navy);
}
.ac-post-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.cat-ai     { background: rgba(124,58,237,0.18); color: #a78bfa; }
.cat-rc     { background: rgba(13,148,136,0.18); color: #2dd4bf; }
.cat-bp     { background: rgba(217,119,6,0.18);  color: #fbbf24; }
.cat-cert   { background: rgba(26,86,219,0.18);  color: #93c5fd; }
.cat-pod    { background: rgba(220,38,38,0.18);  color: #fca5a5; }

.ac-featured-body h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.ac-featured-body p { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin-bottom: 1.5rem; }
.ac-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.ac-post-meta span::before { content: '·'; margin-right: 0.75rem; }
.ac-post-meta span:first-child::before { display: none; }
.ac-read-btn {
  align-self: flex-start;
  margin-top: 1.5rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: all 0.2s;
}
.ac-read-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ============================================================
   POST CARDS GRID
   ============================================================ */
.ac-grid { display: grid; gap: 1.25rem; }
.ac-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ac-grid-2 { grid-template-columns: repeat(2, 1fr); }

.ac-card {
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.ac-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ac-shadow-lg);
  border-color: transparent;
}
.ac-card-img {
  overflow: hidden;
  height: 180px;
  background: var(--ac-bg);
}
.ac-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.ac-card:hover .ac-card-img img { transform: scale(1.05); }
.ac-card-body { padding: 1.25rem 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.ac-card-body h3 {
  font-size: 1rem;
  color: var(--ac-navy);
  margin: 0.6rem 0 0.5rem;
  line-height: 1.35;
}
.ac-card-body h3 a { color: inherit; }
.ac-card-body h3 a:hover { color: var(--ac-blue); }
.ac-card-excerpt { font-size: 0.83rem; color: var(--ac-text-muted); flex: 1; margin-bottom: 1rem; line-height: 1.6; }
.ac-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ac-text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--ac-border);
}
.ac-card-date { display: flex; align-items: center; gap: 0.3rem; }
.ac-card-read {
  color: var(--ac-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
}
.ac-card-read::after { content: '→'; }

/* ============================================================
   PODCAST / VIDEO CARD
   ============================================================ */
.ac-media-card {
  background: var(--ac-navy-mid);
  border-radius: var(--ac-radius);
  overflow: hidden;
  display: flex;
  gap: 0;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.06);
}
.ac-media-card:hover { transform: translateY(-3px); box-shadow: var(--ac-shadow-lg); }
.ac-media-thumb {
  position: relative;
  width: 140px;
  min-height: 100px;
  flex-shrink: 0;
  overflow: hidden;
  background: #1e2d45;
}
.ac-media-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.ac-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-play-btn span {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--ac-navy);
}
.ac-media-body { padding: 1rem 1.25rem; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ac-media-ep { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-cyan); margin-bottom: 0.35rem; }
.ac-media-body h4 { font-size: 0.9rem; color: #fff; margin-bottom: 0.35rem; font-family: var(--ac-font-body); font-weight: 600; line-height: 1.35; }
.ac-media-body h4 a { color: inherit; }
.ac-media-body h4 a:hover { color: var(--ac-cyan); }
.ac-media-meta { font-size: 0.72rem; color: rgba(255,255,255,0.4); }

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.ac-newsletter {
  background: linear-gradient(135deg, var(--ac-navy) 0%, #1e3a5f 100%);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ac-newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(6,182,212,0.1) 0%, transparent 65%);
}
.ac-newsletter-inner { position: relative; max-width: 560px; margin: 0 auto; }
.ac-newsletter h2 { color: #fff; font-size: 1.8rem; margin-bottom: 0.75rem; }
.ac-newsletter p { color: rgba(255,255,255,0.55); font-size: 0.95rem; margin-bottom: 2rem; }
.ac-nl-form { display: flex; gap: 0.75rem; max-width: 440px; margin: 0 auto; }
.ac-nl-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-family: var(--ac-font-body);
  outline: none;
  transition: border-color 0.2s;
}
.ac-nl-input::placeholder { color: rgba(255,255,255,0.35); }
.ac-nl-input:focus { border-color: var(--ac-cyan); }
.ac-nl-btn {
  background: var(--ac-blue);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--ac-font-body);
  white-space: nowrap;
  transition: background 0.2s;
}
.ac-nl-btn:hover { background: var(--ac-blue-light); }

/* ============================================================
   TOPIC SHOWCASE CARDS
   ============================================================ */
.ac-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.ac-topic-card {
  padding: 1.5rem 1.25rem;
  border-radius: var(--ac-radius);
  border: 1.5px solid var(--ac-border);
  background: #fff;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.ac-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ac-shadow-lg);
}
.ac-topic-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.ac-topic-title { font-family: var(--ac-font-display); font-size: 0.95rem; font-weight: 700; color: var(--ac-navy); margin-bottom: 0.3rem; }
.ac-topic-count { font-size: 0.75rem; color: var(--ac-text-muted); }

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.ac-widget {
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.ac-widget h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ac-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ac-border);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer,
#colophon {
  background: var(--ac-navy) !important;
  color: rgba(255,255,255,0.5) !important;
  padding: 3rem 2rem 1.5rem !important;
}
.site-footer a { color: rgba(255,255,255,0.6) !important; }
.site-footer a:hover { color: #fff !important; }
.site-footer h3, .site-footer h4, .site-footer .widget-title {
  color: #fff !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 1rem !important;
}
.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.45); line-height: 1.7; margin-top: 0.75rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav ul li { margin-bottom: 0.6rem; }
.footer-nav ul li a { font-size: 0.83rem; }
.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   UTILITY + ANIMATIONS
   ============================================================ */
.ac-divider {
  border: none;
  border-top: 1px solid var(--ac-border);
  margin: 0;
}
.ac-alt-bg { background: var(--ac-bg); }
.ac-white-bg { background: #fff; }

@keyframes ac-fadeup {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ac-animate { animation: ac-fadeup 0.6s ease both; }
.ac-delay-1 { animation-delay: 0.1s; }
.ac-delay-2 { animation-delay: 0.2s; }
.ac-delay-3 { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ac-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .ac-grid-3, .ac-grid-2 { grid-template-columns: 1fr; }
  .ac-featured { grid-template-columns: 1fr; }
  .ac-featured-img { height: 220px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .ac-nl-form { flex-direction: column; }
  .ac-section { padding: 3rem 1.25rem; }
}
@media (max-width: 480px) {
  .footer-columns { grid-template-columns: 1fr; }
  .ac-hero { padding: 5rem 1.25rem 3.5rem; }
}
/* ── CTA Button: targets the last item in the nav ── */
.wp-block-navigation__container > .wp-block-navigation-item:last-child > a,
.main-navigation ul > li:last-child > a,
nav ul li:last-child a {
  background: #1a56db !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
.wp-block-navigation__container > .wp-block-navigation-item:last-child > a:hover,
.main-navigation ul > li:last-child > a:hover,
nav ul li:last-child a:hover {
  background: #3b82f6 !important;
  color: #fff !important;
}