/* ============================================
   CAMELOT 174 — Component Styles
   Custom CSS for components beyond theme.json
   ============================================ */

/* --- Transitions --- */
:root {
  --c-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --c-transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Sticky Header --- */
.site-header {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  transition: box-shadow var(--c-transition-fast);
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(26, 10, 46, 0.1);
}

/* --- Navigation CTA Link --- */
.nav-cta .wp-block-navigation-item__content {
  background: var(--wp--preset--color--green-primary);
  color: #fff !important;
  padding: 8px 24px;
  border-radius: 32px;
  font-weight: 600;
  transition: all var(--c-transition-fast);
}

.nav-cta .wp-block-navigation-item__content:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 20, 73, 0.3);
}

/* --- Hero Section --- */
.camelot-hero {
  position: relative;
}

.camelot-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 165, 92, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(0, 20, 73, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(59, 13, 164, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.camelot-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, #ffffff 0%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.camelot-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  border-color: rgba(0, 165, 92, 0.3) !important;
}

/* --- Section Tags --- */
.section-tag {
  border-color: rgba(0, 165, 92, 0.25) !important;
  background: rgba(0, 165, 92, 0.05);
  display: inline-block;
  width: auto;
}

.section-tag--light {
  border-color: rgba(0, 165, 92, 0.4) !important;
  background: rgba(0, 165, 92, 0.1);
}

/* --- Unit Cards (Glass Effect) --- */
.unit-card-wp {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--c-transition-smooth);
}

.unit-card-wp:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.unit-card-wp a {
  color: inherit;
  text-decoration: none;
}

.unit-card-wp a:hover {
  color: inherit;
  text-decoration: underline;
}

/* --- Value Cards --- */
.value-card-wp {
  transition: all var(--c-transition-smooth);
  position: relative;
  overflow: hidden;
}

.value-card-wp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wp--preset--color--green-primary);
  transform: scaleX(0);
  transition: transform var(--c-transition-smooth);
  transform-origin: left;
}

.value-card-wp:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(26, 10, 46, 0.1);
  border-color: rgba(0, 165, 92, 0.3) !important;
}

.value-card-wp:hover::before {
  transform: scaleX(1);
}

/* --- About Card Accent --- */
.about-card {
  position: relative;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--wp--preset--color--green-primary), var(--wp--preset--color--navy));
  border-radius: 0 4px 4px 0;
}

/* --- Blog Cards --- */
.blog-card-wp {
  transition: all var(--c-transition-smooth);
  overflow: hidden;
}

.blog-card-wp:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(26, 10, 46, 0.1);
}

/* --- Mosaic Cards --- */
.mosaic-card {
  transition: all var(--c-transition-smooth);
  cursor: pointer;
  aspect-ratio: 1;
}

.mosaic-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 40px rgba(26, 10, 46, 0.14);
}

/* --- CTA Form Styles --- */
.camelot-cta-form {
  width: 100%;
}

.cta-form__row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cta-form__input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.92rem;
  border: 2px solid var(--wp--preset--color--border);
  border-radius: 12px;
  background: var(--wp--preset--color--surface-alt, #f5f9f7);
  color: var(--wp--preset--color--dark);
  transition: all var(--c-transition-fast);
  outline: none;
}

.cta-form__input::placeholder {
  color: var(--wp--preset--color--text-muted);
}

.cta-form__input:focus {
  border-color: var(--wp--preset--color--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 165, 92, 0.12);
}

.cta-form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a8a82' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  padding-right: 4rem;
}

.cta-form__btn {
  flex: 1;
  padding: 1rem 2rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--wp--preset--color--green-primary);
  border: none;
  border-radius: 32px;
  cursor: pointer;
  transition: all var(--c-transition-fast);
  white-space: nowrap;
}

.cta-form__btn:hover {
  background: #008f4f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 165, 92, 0.4);
}

/* --- Activities List Check Marks --- */
.activities-list li {
  position: relative;
  padding-left: 2rem;
}

.activities-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300A55C' stroke-width='2.5'%3E%3Cpath d='M22 11.08V12a10 10 0 11-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* --- Footer Links --- */
.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  padding-left: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all var(--c-transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--wp--preset--color--green-primary);
  transform: translateX(4px);
}

/* --- Scroll Animations --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-right"] {
  transform: translateX(-30px);
}

[data-animate="fade-left"] {
  transform: translateX(30px);
}

[data-animate].visible {
  opacity: 1;
  transform: translate(0);
}

/* --- Corporación Page — ToC Step Cards --- */
.toc-step-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--c-transition-smooth);
}

.toc-step-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2);
}

.toc-step-card--impact {
  border-color: rgba(0, 165, 92, 0.3) !important;
}

.toc-step-card--impact:hover {
  background: rgba(0, 165, 92, 0.18) !important;
  border-color: rgba(0, 165, 92, 0.5) !important;
}

/* ToC flow arrow connectors between cards */
.toc-flow > .wp-block-column:not(:last-child) .toc-step-card::after {
  content: '→';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 165, 92, 0.5);
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 2;
}

/* --- Corporación Mission Card accent --- */
.corpo-mission-card {
  position: relative;
}

.corpo-mission-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--wp--preset--color--green-primary);
  border-radius: 0 0 3px 3px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .top-bar .top-bar__motto {
    display: none;
  }

  .cta-form__row {
    flex-direction: column;
  }

  .mosaic-card {
    aspect-ratio: auto;
  }

  .toc-flow > .wp-block-column:not(:last-child) .toc-step-card::after {
    content: '↓';
    position: absolute;
    right: auto;
    left: 50%;
    top: auto;
    bottom: -18px;
    transform: translateX(-50%);
  }
}
