/* =============================================
   SLASHSEO THEME — "Indigo Pulse"
   Visual DNA transferred from First Portfolio
   ============================================= */

/* -----------------------------------------------
   CSS VARIABLES
   ------------------------------------------------ */
:root {
  --white: #ffffff;
  --primary: #4a5494;
  --primary-dark: #3b4378;
  --secondary: #12b486;
  --secondary-light: #17c995;
  --section-bg: #f7f7f8;
  --dark: #111118;
  --text: #62636a;
  --text-light: #8e8f96;
  --border: #e5e6ea;
  --border-hover: #c8c9d0;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-pill: 100px;
  --radius-card: 18px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.15);

  --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

/* -----------------------------------------------
   RESET & BASE
   ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--secondary); color: var(--white); }

/* -----------------------------------------------
   UTILITY
   ------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding { padding: 100px 0; }
.section-bg { background: var(--section-bg); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--secondary);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 24px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 36px;
}

.section-label svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* pill button — matches source's rounded CTA style */
.btn-pill {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--white);
}

/* -----------------------------------------------
   SKIP LINK
   ------------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--secondary);
  color: var(--white);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* -----------------------------------------------
   HEADER / NAV — transparent over hero, sticky on scroll
   ------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
}

.brand {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--white);
  transition: color var(--transition);
}
.brand img {
  height: 32px;
  width: auto;
}
.scrolled .brand { color: var(--dark); }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-desktop a {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.8);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: all var(--transition);
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
}

.scrolled .nav-desktop a {
  color: var(--text);
}
.scrolled .nav-desktop a:hover,
.scrolled .nav-desktop a.active {
  color: var(--secondary);
  background: rgba(18,180,134,0.08);
}

/* hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
  z-index: 550;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  left: 9px;
  transition: all 0.3s;
}
.hamburger span { top: 21px; }
.hamburger span::before { content: ''; top: -8px; }
.hamburger span::after { content: ''; top: 8px; }

.scrolled .hamburger span,
.scrolled .hamburger span::before,
.scrolled .hamburger span::after { background: var(--dark); }

.hamburger.open span { background: transparent; }
.hamburger.open span::before { top: 0; transform: rotate(45deg); }
.hamburger.open span::after { top: 0; transform: rotate(-45deg); }

/* mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 540;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.nav-mobile a:hover { background: var(--section-bg); color: var(--secondary); }

/* -----------------------------------------------
   HERO — asymmetric split, wave divider
   ------------------------------------------------ */
.hero {
  background: var(--primary);
  position: relative;
  overflow: hidden;
  padding: 180px 0 200px;
  min-height: 520px;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 120px;
  background: var(--white);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content { position: relative; z-index: 10; }

.hero-title {
  color: var(--white);
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: -0.04em;
}

.hero-subtitle {
  color: rgba(255,255,255,0.82);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-subtitle p { color: inherit; }

.hero-cta .btn-pill {
  background: var(--white);
  color: var(--primary);
  border-color: transparent;
  font-size: 0.95rem;
  padding: 14px 34px;
}
.hero-cta .btn-pill:hover {
  background: var(--secondary);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.hero-visual {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
}

/* decorative circle behind hero — mirrors source's circle bg */
.hero-circle {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circle-inner {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon-lg {
  font-size: 3rem;
  color: var(--white);
  opacity: 0.7;
}

/* -----------------------------------------------
   TOPICS — staggered card layout with offset
   ------------------------------------------------ */
.topics-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.topic-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

/* stagger effect — matches source's services-thumb-up offset */
.topic-card:nth-child(even) { transform: translateY(32px); }

.topic-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}

.topic-card h3 {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 1.35rem;
}

.topic-card .topic-desc {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* decorative rotated icon bg — mirrors source's services-icon-wrap */
.topic-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 45%;
  height: 50%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transform: rotate(-35deg) translateY(40px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.topic-card:hover::after {
  background: var(--secondary);
  border-color: var(--secondary);
}

/* -----------------------------------------------
   LATEST POSTS — asymmetric featured layout
   ------------------------------------------------ */
.posts-section .section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.posts-section .section-header h2 { margin-bottom: 0; }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* first post spans full width — editorial feel */
.post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
  background: var(--section-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 2px solid var(--white);
  transition: all var(--transition);
}

.post-card-featured:hover { border-color: var(--secondary); }

.post-card-featured .post-card-image {
  height: 100%;
  min-height: 320px;
}

.post-card-featured .post-card-body { padding: 36px 36px 36px 0; }

.post-card {
  background: var(--section-bg);
  border: 2px solid var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all var(--transition);
}

.post-card:hover { border-color: var(--secondary); }

.post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-card-body { padding: 28px 28px 32px; }

.post-card-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 10px;
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.post-card-title a { color: var(--dark); }
.post-card-title a:hover { color: var(--secondary); }

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 18px;
}

.post-card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card-link:hover { color: var(--secondary); gap: 10px; }
.post-card-link::after { content: '→'; transition: inherit; }

/* -----------------------------------------------
   FAQ — editorial accordion, not generic
   ------------------------------------------------ */
.faq-section { border-top: 1px solid var(--border); }

.faq-layout {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: 60px;
  align-items: start;
}

.faq-intro h2 { margin-bottom: 16px; }
.faq-intro p { color: var(--text-light); font-size: 0.95rem; }

.faq-list { list-style: none; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 40px 22px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  text-align: left;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  line-height: 1.4;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--secondary); }

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-light);
  transition: transform var(--transition), color var(--transition);
}

.faq-item.active .faq-question::after {
  content: '−';
  color: var(--secondary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 600px;
  padding-bottom: 22px;
}

.faq-answer-inner {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
}

/* -----------------------------------------------
   FOOTER — clean, editorial
   ------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 300px;
}

.footer-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
  padding: 4px 0;
}
.footer-links a:hover { color: var(--secondary); padding-left: 6px; }

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--secondary);
  font-weight: 600;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.footer-contact-link:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.copyright {
  font-size: 0.82rem;
  color: var(--text-light);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* -----------------------------------------------
   PAGE TEMPLATE (about page, etc.)
   ------------------------------------------------ */
.page-hero {
  background: var(--primary);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.page-hero h1 { color: var(--white); position: relative; z-index: 2; }

.page-content {
  padding: 80px 0 100px;
  max-width: 780px;
  margin: 0 auto;
}

.page-content h2,
.page-content h3 { margin-top: 2em; margin-bottom: 0.6em; }
.page-content p { margin-bottom: 1.2em; }
.page-content ul, .page-content ol { margin-bottom: 1.2em; padding-left: 1.5em; }
.page-content a { color: var(--secondary); font-weight: 600; }
.page-content a:hover { color: var(--primary); }
.page-content img { border-radius: var(--radius-card); margin: 2em 0; }
.page-content blockquote {
  border-left: 3px solid var(--secondary);
  padding: 12px 24px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-light);
}

/* -----------------------------------------------
   BLOG INDEX
   ------------------------------------------------ */
.blog-hero {
  background: var(--primary);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(75% 100% at 50% 100%);
}
.blog-hero h1 { color: var(--white); position: relative; z-index: 2; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* -----------------------------------------------
   PAGINATION — pill-shaped links
   ------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--white);
}

.pagination .active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.pagination .prev-next {
  font-weight: 700;
  padding: 0 20px;
}

/* -----------------------------------------------
   POST SINGLE
   ------------------------------------------------ */
.post-hero {
  background: var(--primary);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
.post-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.post-hero-inner { position: relative; z-index: 2; max-width: 780px; }
.post-hero h1 { color: var(--white); margin-bottom: 16px; }
.post-hero-date {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-cover {
  max-width: 900px;
  margin: -60px auto 0;
  position: relative;
  z-index: 10;
  padding: 0 24px;
}

.post-cover img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}

.post-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.post-excerpt {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 2em;
  padding-bottom: 2em;
  border-bottom: 1px solid var(--border);
}

.post-body-content h2,
.post-body-content h3 { margin-top: 2em; margin-bottom: 0.6em; }
.post-body-content p { margin-bottom: 1.2em; }
.post-body-content ul, .post-body-content ol { margin-bottom: 1.2em; padding-left: 1.5em; }
.post-body-content a { color: var(--secondary); font-weight: 600; }
.post-body-content a:hover { color: var(--primary); }
.post-body-content img { border-radius: var(--radius-card); margin: 2em 0; }
.post-body-content blockquote {
  border-left: 3px solid var(--secondary);
  padding: 12px 24px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-light);
}

/* -----------------------------------------------
   FOCUS STYLES
   ------------------------------------------------ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -----------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 991px) {
  .nav-desktop { display: none; }
  .hamburger { display: block; }

  .hero { padding: 160px 0 180px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }

  .section-padding { padding: 72px 0; }

  .topics-grid { grid-template-columns: 1fr; }
  .topic-card:nth-child(even) { transform: none; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card-featured { grid-template-columns: 1fr; }
  .post-card-featured .post-card-image { min-height: 240px; }
  .post-card-featured .post-card-body { padding: 28px; }

  .faq-layout { grid-template-columns: 1fr; gap: 32px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { padding: 140px 0 160px; min-height: auto; }
  .hero-subtitle { font-size: 1rem; }

  .section-padding { padding: 56px 0; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; text-align: center; }
}
