/* ============================================================================
   XIKEO DESIGN - Custom CSS
   Warm editorial design system with smooth interactions
   ============================================================================ */

:root {
  --navy: #1B3A5C;
  --accent: #D4863B;
  --warm-bg: #FAF8F5;
  --card-bg: #FFFFFF;
  --text: #2D2D2D;
  --muted: #7A7A7A;
  --light-border: #E8E4DF;
  --section-bg: #F3EFE9;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background-color: var(--warm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.wp-block-template-part nav,
nav.wp-block-navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-border);
  padding: 16px 40px;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 24px; }
h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 16px; }
h3 { font-size: clamp(20px, 3vw, 24px); margin-bottom: 12px; }

p {
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ============================================================================
   SECTION LABELS
   ============================================================================ */

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

/* ============================================================================
   CARDS - BASE
   ============================================================================ */

.wp-block-group.card,
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.wp-block-group.card:hover,
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ============================================================================
   PROJECT CARDS
   ============================================================================ */

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.project-card img,
.project-image {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.project-card-content {
  padding: 24px;
}

.project-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.project-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.project-description {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* Project image placeholders */
.pi-1 { background: linear-gradient(135deg, #E8D5C4 0%, #D4B896 100%); }
.pi-2 { background: linear-gradient(135deg, #C4D5E8 0%, #96B8D4 100%); }
.pi-3 { background: linear-gradient(135deg, #D5E8C4 0%, #B8D496 100%); }
.pi-4 { background: linear-gradient(135deg, #E8C4D5 0%, #D496B8 100%); }
.pi-5 { background: linear-gradient(135deg, #D5C4E8 0%, #B896D4 100%); }
.pi-6 { background: linear-gradient(135deg, #C4E8D5 0%, #96D4B8 100%); }

/* ============================================================================
   CASE STUDY CARDS
   ============================================================================ */

.case-study-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.case-study-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.case-study-card.alt {
  direction: rtl;
}

.case-study-card.alt > * {
  direction: ltr;
}

.case-study-image {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.case-study-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-study-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.case-study-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}

.case-study-challenge,
.case-study-result {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 16px;
}

.case-study-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 12px;
}

.case-study-link:hover {
  transform: translateX(4px);
}

/* ============================================================================
   SERVICE CARDS
   ============================================================================ */

.service-card {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  color: white;
}

.service-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-6px);
}

.service-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.service-name {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

.service-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* ============================================================================
   TESTIMONIAL CARDS
   ============================================================================ */

.testimonial-card {
  background-color: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.testimonial-quote {
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.testimonial-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.testimonial-role {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.wp-block-button__link,
button,
a.button {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 36px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.wp-block-button__link:hover,
button:hover,
a.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 134, 59, 0.3);
}

.wp-block-button__link:active,
button:active {
  transform: translateY(0);
}

/* ============================================================================
   STATISTICS
   ============================================================================ */

.stat-number {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text);
  margin-top: 8px;
}

/* ============================================================================
   SEPARATORS
   ============================================================================ */

.separator {
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 24px 0;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--light-border);
  margin: 48px 0;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.section-hero {
  background-color: var(--warm-bg);
  padding: 160px 40px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-navy {
  background-color: var(--navy);
  padding: 80px 40px;
}

.section-light {
  background-color: var(--section-bg);
  padding: 80px 40px;
}

.section-default {
  background-color: var(--warm-bg);
  padding: 80px 40px;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */

.cta-section {
  background-color: var(--section-bg);
  padding: 80px 40px;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================================
   PORTFOLIO & GRID LAYOUTS
   ============================================================================ */

.wp-block-columns {
  gap: 32px;
}

.wp-block-column {
  flex-basis: 50%;
}

/* ============================================================================
   WHITESPACE & SPACING
   ============================================================================ */

.wp-block-group {
  margin-bottom: 0;
}

.wp-block-heading {
  margin-bottom: 16px;
}

.wp-block-paragraph {
  margin-bottom: 16px;
}


/* ============================================================================
   RESPONSIVE — TABLET (768px and below)
   ============================================================================ */

@media (max-width: 768px) {

  /* --- Navigation --- */
  nav.wp-block-navigation,
  .wp-block-template-part nav {
    padding: 12px 20px;
  }

  /* --- All sections: reduce side padding --- */
  .section-hero,
  .section-navy,
  .section-light,
  .section-default,
  .cta-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section-hero {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .section-navy,
  .section-light,
  .section-default,
  .cta-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* --- WordPress columns: stack to single column --- */
  .wp-block-columns {
    flex-direction: column !important;
    gap: 24px;
  }

  .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
    width: 100%;
  }

  /* --- Case study cards: stack to single column --- */
  .case-study-card,
  .case-study-card.alt {
    grid-template-columns: 1fr !important;
    direction: ltr !important;
  }

  .case-study-card .wp-block-group[style*="min-height:400px"],
  .case-study-card .wp-block-group[style*="min-height: 400px"] {
    min-height: 220px !important;
  }

  .case-study-card .wp-block-group[style*="padding:48px"],
  .case-study-card .wp-block-group[style*="padding: 48px"],
  .case-study-content {
    padding: 32px 24px !important;
  }

  .case-study-title {
    font-size: 24px;
  }

  /* --- Service cards: keep some breathing room --- */
  .service-card {
    padding: 24px 20px;
  }

  /* --- Project cards --- */
  .project-card img,
  .project-image,
  .project-card .wp-block-group[style*="min-height:280px"] {
    height: 220px;
    min-height: 220px !important;
  }

  .project-card-content {
    padding: 20px;
  }

  /* --- Testimonials --- */
  .testimonial-card {
    padding: 24px;
  }

  /* --- Stats --- */
  .stat-number {
    font-size: 32px;
  }

  /* --- Buttons --- */
  .wp-block-button__link,
  button,
  a.button {
    padding: 14px 28px;
    font-size: 14px;
  }

  /* --- About section: reduce grid gap --- */
  .wp-block-group[style*="grid-template-columns: 1fr 1.5fr"],
  .wp-block-group[style*="grid-template-columns:1fr 1.5fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* --- Any inline 4-column grid: go to 2 columns --- */
  .wp-block-group[style*="grid-template-columns:repeat(4"],
  .wp-block-group[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* --- Any inline 3-column grid: go to 1 column --- */
  .wp-block-group[style*="grid-template-columns:repeat(3"],
  .wp-block-group[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Any inline 2-column grid: go to 1 column --- */
  .wp-block-group[style*="grid-template-columns:repeat(2"],
  .wp-block-group[style*="grid-template-columns: repeat(2"],
  .wp-block-group[style*="grid-template-columns:1fr 1fr"],
  .wp-block-group[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Reduce wide padding on all wp-block-group with 40px --- */
  .wp-block-group.alignfull[style*="padding-left:40px"],
  .wp-block-group.alignfull[style*="padding-left: 40px"] {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}


/* ============================================================================
   RESPONSIVE — MOBILE (480px and below)
   ============================================================================ */

@media (max-width: 480px) {

  /* --- Sections: tighter padding --- */
  .section-hero {
    padding: 80px 16px 40px;
  }

  .section-navy,
  .section-light,
  .section-default,
  .cta-section {
    padding: 40px 16px;
  }

  /* --- All wide groups: reduce padding further --- */
  .wp-block-group.alignfull[style*="padding-left"],
  .wp-block-group.alignfull[style*="padding-right"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .wp-block-group.alignfull[style*="padding-top:80px"],
  .wp-block-group.alignfull[style*="padding-top: 80px"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  /* --- Case study cards: tighter content --- */
  .case-study-card .wp-block-group[style*="min-height"],
  .case-study-card .pi-1,
  .case-study-card .pi-2,
  .case-study-card .pi-3,
  .case-study-card .pi-4 {
    min-height: 180px !important;
  }

  .case-study-card .wp-block-group[style*="padding:48px"],
  .case-study-card .wp-block-group[style*="padding: 48px"],
  .case-study-content {
    padding: 24px 16px !important;
  }

  .case-study-title {
    font-size: 22px;
  }

  .case-study-challenge,
  .case-study-result {
    font-size: 14px;
  }

  /* --- Project cards: shorter images --- */
  .project-card img,
  .project-image,
  .project-card .wp-block-group[style*="min-height"] {
    height: 180px;
    min-height: 180px !important;
  }

  .project-card-content {
    padding: 16px;
  }

  /* --- Service cards --- */
  .service-card {
    padding: 20px 16px;
  }

  .service-icon {
    font-size: 32px;
  }

  .service-name {
    font-size: 16px;
  }

  /* --- Testimonials --- */
  .testimonial-card {
    padding: 20px;
  }

  .testimonial-quote {
    font-size: 14px;
  }

  /* --- Buttons --- */
  .wp-block-button__link,
  button,
  a.button {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    text-align: center;
  }

  /* --- Stats: wrap nicely --- */
  .stat-number {
    font-size: 28px;
  }

  .stat-label {
    font-size: 12px;
  }

  /* --- WordPress columns gap --- */
  .wp-block-columns {
    gap: 16px;
  }

  /* --- Hero content padding (inline max-width sections) --- */
  .wp-block-group[style*="padding:160px"],
  .wp-block-group[style*="padding: 160px"] {
    padding-top: 80px !important;
    padding-bottom: 40px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  nav.wp-block-navigation,
  .wp-block-template-part nav {
    display: none;
  }

  .wp-block-button__link,
  button,
  a.button {
    display: none;
  }

  body {
    background-color: white;
  }

  .section-navy {
    background-color: var(--navy);
    color: white;
  }
}
