/**
 * @file
 * CinemaOS — Component CSS
 *
 * All new components added for Drupal content type and paragraph rendering.
 * Every rule uses the CinemaOS design tokens defined in styles.css so that
 * future token changes propagate automatically. No Bootstrap classes are used.
 */

/* ============================================================================
   NAV REGION WRAPPER
   Drupal's region.html.twig wraps output in a <div>. display:contents makes
   that div invisible to the .nav flex container so .nav-links and .cart-trigger
   participate as direct flex children.
   ============================================================================ */
.nav > div { display: contents; }

/* ============================================================================
   ZOOMABLE IMAGES
   Any <img class="zoomable"> opens in the lightbox on click.
   Add data-full="/path/to/hires.jpg" to load a larger version in the overlay.
   ============================================================================ */
img.zoomable,
img[data-zoom] {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
img.zoomable:hover,
img[data-zoom]:hover { opacity: 0.88; }

/* Primary nav <ul>: structural selector so layout works regardless of whether
   the menu template injects the nav-links class (e.g. non-"main" machine name).
   Values mirror .nav-links exactly; specificity 0-0-3 defers to .nav-links. */
.nav > div > ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  flex: 1;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav > div > ul > li { position: relative; list-style: none; }
.nav > div > ul > li > a { color: var(--muted); }
.nav > div > ul > li > a:hover { color: var(--text); }

/* ============================================================================
   INNER PAGE BANNER
   ============================================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-banner h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.page-banner nav[aria-label="Breadcrumb"] ol {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.page-banner nav[aria-label="Breadcrumb"] li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--border);
}

.page-banner nav[aria-label="Breadcrumb"] a {
  color: var(--secondary);
  text-decoration: none;
}

/* ============================================================================
   LAYOUT WITH SIDEBAR
   ============================================================================ */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .layout-with-sidebar {
    grid-template-columns: 240px 1fr;
  }

  .layout-with-sidebar aside + .main-content-area + aside {
    /* two sidebars */
    grid-template-columns: 240px 1fr 240px;
  }
}

.layout-with-sidebar aside {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ============================================================================
   BLOG DETAIL
   ============================================================================ */
.blog-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-meta a {
  color: var(--secondary);
  text-decoration: none;
}

.blog-body {
  line-height: 1.8;
  color: var(--text);
}

.blog-body h2,
.blog-body h3 {
  margin-top: 2rem;
  color: var(--text);
}

.blog-body img {
  max-width: 100%;
  border-radius: var(--radius);
}

.blog-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================================
   SERVICE DETAIL
   ============================================================================ */
.service-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.service-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .service-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.service-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: sticky;
  top: 5rem;
}

.service-sidebar h3 {
  margin-top: 0;
  color: var(--secondary);
}

/* ============================================================================
   TESTIMONIALS
   ============================================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.testimonial-card blockquote {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-card .tc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.testimonial-card .tc-name {
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.testimonial-card .tc-role {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
}

/* ============================================================================
   TEAM
   ============================================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
}

.team-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid var(--primary);
}

.team-card h4 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 1rem;
}

.team-card .tc-role {
  color: var(--secondary);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}

.team-card .tc-bio {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.team-card .tc-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-about {
  gap: 3rem;
  align-items: center;
}

/* ============================================================================
   CAREERS
   ============================================================================ */
.careers-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.career-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease;
}

.career-row:hover {
  border-color: var(--primary);
}

.career-row h3 {
  margin: 0;
  flex: 1 1 200px;
  font-size: 1rem;
  color: var(--text);
}

.career-row .cr-vacancies,
.career-row .cr-location {
  color: var(--muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

/* ============================================================================
   CLIENTS
   ============================================================================ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.client-card:hover {
  border-color: var(--primary);
}

.client-card img {
  max-width: 100px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.4);
  transition: filter 0.2s ease;
}

.client-card:hover img {
  filter: none;
}

.client-card .cc-name {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ============================================================================
   CTA BANNER
   ============================================================================ */
.cta-banner {
  background: var(--grad);
  padding: 3rem 0;
}

.cta-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-banner h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

/* ============================================================================
   CONTACT SECTION
   ============================================================================ */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-card i[data-lucide] {
  color: var(--primary);
  width: 2rem;
  height: 2rem;
}

.contact-card h4 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============================================================================
   PORTFOLIO GRID
   ============================================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 240px;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
}

.portfolio-cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.portfolio-cell.tall {
  grid-row: span 2;
}

.portfolio-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portfolio-cell:hover img {
  transform: scale(1.06);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.portfolio-cell:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  text-align: center;
}

.portfolio-overlay .po-category {
  color: var(--secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portfolio-overlay .po-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.portfolio-overlay .po-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease;
}

.portfolio-overlay .po-actions a:hover {
  background: var(--secondary);
}

/* ============================================================================
   TIMELINE
   ============================================================================ */
.cinemaos-timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  position: relative;
}

.cinemaos-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

@media (max-width: 700px) {
  .cinemaos-timeline::before {
    left: 1.5rem;
  }
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item--right {
  flex-direction: row-reverse;
}

.timeline-marker {
  flex: 0 0 auto;
  width: 80px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.timeline-body {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-body h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 700px) {
  .timeline-item,
  .timeline-item--right {
    flex-direction: column;
    padding-left: 3.5rem;
  }

  .timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    padding: 0;
  }
}

/* ============================================================================
   VIDEO SECTION
   ============================================================================ */
.video-section {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 6rem 0;
  text-align: center;
}

.video-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.7);
}

.video-section .container {
  position: relative;
  z-index: 1;
}

.video-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.video-section p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 0 0 12px rgba(108, 99, 255, 0.2);
}

.play-btn:hover {
  transform: scale(1.1);
  background: var(--secondary);
  box-shadow: 0 0 0 16px rgba(0, 212, 170, 0.15);
}

.play-btn i[data-lucide] {
  width: 2rem;
  height: 2rem;
}

/* ============================================================================
   SOCIAL LINK
   ============================================================================ */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface-elev);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================================================
   ERROR PAGES (403 / 404)
   ============================================================================ */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-page .error-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.error-page .error-icon i[data-lucide] {
  width: 80px;
  height: 80px;
}

.error-page h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.error-page .error-code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ============================================================================
   COMMENTS
   ============================================================================ */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  margin-bottom: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.comment-item .ci-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.comment-item .ci-body {
  flex: 1;
}

.comment-item .ci-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-item .ci-author {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.comment-item .ci-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.comment-item .ci-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.comment-login-prompt {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.comment-login-prompt a {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================================================
   NAV DROPDOWN
   ============================================================================ */
.nav-item {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  list-style: none;
  margin: 0;
}

.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown {
  display: block;
}

.nav-dropdown li {
  padding: 0;
}

.nav-dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 0.3rem;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-chevron,
.nav-item:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* ============================================================================
   PRICING ITEM CARD (grid variant)
   ============================================================================ */
.price-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.price-card-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.price-card-item h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.price-card-item .price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.price-card-item .price-per {
  color: var(--muted);
  font-size: 0.85rem;
}

.price-card-item .pill {
  display: inline-block;
  background: var(--secondary);
  color: #0d0f14;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-card-item .feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.price-card-item .feature-list li {
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
}

.price-card-item .feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
}

/* ============================================================================
   PRICING GRID (section-level)
   ============================================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ============================================================================
   VIEW REFERENCE
   ============================================================================ */
.view-reference {
  padding: 3rem 0;
}

/* ============================================================================
   FOUNDER / BLOCKQUOTE
   ============================================================================ */
.founder-quote {
  border-left: 4px solid var(--secondary);
  padding: 1rem 1.5rem;
  margin: 0;
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.founder-quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.founder-quote cite span {
  display: block;
  color: var(--secondary);
  font-weight: 400;
  font-size: 0.875rem;
}

/* ============================================================================
   CAROUSEL (multi-image variant)
   ============================================================================ */
.para-carousel {
  overflow: hidden;
  border-radius: var(--radius);
}

.para-carousel [data-carousel] {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 0;
}

.para-carousel [data-carousel]::-webkit-scrollbar {
  display: none;
}

.para-carousel [data-carousel] img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
}
