/* ==========================================================================
   iDiLink - Estilos para Ficha de Proyecto Individual /trabajos/[slug]
   Fase 3C - CSS Estable sin hashing Vite
   ========================================================================== */

:root {
  --primary: #0052CC;
  --primary-hover: #003D99;
  --primary-light: #E0F2FE;
  --primary-badge-text: #0256B3;
  --dark: #0B1E40;
  --dark-surface: #132A52;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(11, 30, 64, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(11, 30, 64, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(11, 30, 64, 0.12);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Top Announcement Bar */
.top-bar {
  background: var(--dark);
  color: #E2E8F0;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.top-bar-link {
  color: #38BDF8;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.top-bar-link:hover {
  color: #7DD3FC;
  text-decoration: underline;
}

/* Site Header */
.site-header {
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(11, 30, 64, 0.05);
  border-bottom: 1px solid var(--border);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  height: 58px;
  width: auto;
  display: block;
  transition: var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.02);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Breadcrumbs */
.breadcrumb-nav {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  font-size: 0.875rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #94A3B8;
  user-select: none;
}

.breadcrumb-item.active {
  color: var(--text-dark);
  font-weight: 600;
}

/* Hero Section of Project Detail */
.project-hero {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%);
  padding: 3rem 0 2rem;
}

.project-hero-header {
  max-width: 900px;
  margin-bottom: 2rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-badge-text);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.project-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Project Layout Grid */
.project-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

/* Project Gallery & Visuals */
.project-gallery-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.project-main-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
}

.project-thumb-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  background: #F1F5F9;
  aspect-ratio: 1;
}

.project-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project Meta Sidebar & Details */
.project-info-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.project-info-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
}

.meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}

/* Case Study Content Sections */
.project-content-section {
  padding: 3rem 0;
}

.content-blocks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.content-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.content-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.content-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
}

.content-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Related Product CTA Box */
.related-product-cta-box {
  background: linear-gradient(135deg, #0B1E40 0%, #132A52 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.cta-box-text {
  max-width: 650px;
}

.cta-box-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.cta-box-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.cta-box-desc {
  font-size: 1.05rem;
  color: #CBD5E1;
  line-height: 1.6;
}

.cta-box-action {
  flex-shrink: 0;
}

/* Site Footer */
.site-footer {
  background: var(--dark);
  color: #E2E8F0;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: #94A3B8;
  font-size: 0.9rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.brand-logo-img-footer {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-column h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-list a {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-nav-list a:hover {
  color: #38BDF8;
  padding-left: 4px;
}

.footer-contact-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-whatsapp-card, .footer-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-whatsapp-card:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25D366;
}

.footer-whatsapp-card-icon {
  background: #25D366;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #94A3B8;
}

.footer-legal-nav {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-legal-nav a {
  color: #94A3B8;
  transition: var(--transition);
}

.footer-legal-nav a:hover {
  color: #FFFFFF;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .project-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .project-title {
    font-size: 2rem;
  }
  
  .content-blocks-grid {
    grid-template-columns: 1fr;
  }
  
  .related-product-cta-box {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  
  .cta-box-action {
    width: 100%;
  }
  
  .cta-box-action .btn {
    width: 100%;
  }

  .main-nav {
    display: none;
  }

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

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 375px) {
  .project-title {
    font-size: 1.65rem;
  }
  
  .container {
    padding: 0 1rem;
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

.footer-acc-btn { width: 100%; background: transparent; border: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; text-align: left; }
.footer-acc-chevron { display: none; }
@media (max-width: 768px) {
  .footer-main-grid { gap: 1.25rem; }
  .footer-column.has-accordion h4 { margin-bottom: 0; padding: 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .footer-column.has-accordion h4::after { display: none; }
  .footer-acc-btn { cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
  .footer-acc-chevron { display: inline-flex; font-size: 0.9rem; color: #94A3B8; transition: transform 0.25s ease, color 0.2s ease; }
  .footer-column.has-accordion.is-open .footer-acc-chevron { transform: rotate(180deg); color: #FFFFFF; }
  .footer-column:not(.is-open) > .footer-nav-list,
  .footer-column.has-accordion:not(.is-open) > .footer-contact-box { display: none; }
  .footer-column.has-accordion.is-open > .footer-nav-list,
  .footer-column.has-accordion.is-open > .footer-contact-box { padding-top: 0.85rem; }
}
