/* ==========================================================================
   EPB Theme — CTE Page Styles (Centros Tecnológicos Especializados)
   ========================================================================== */

:root {
  --cte-azul: #377EFF;
  --cte-azul-escuro: #102662;
  --cte-branco: #ffffff;
  --cte-preto: #000000;
  --cte-cinza-suave: #f9f9f9;
}

body {
  overflow-x: hidden;
}

/* ───────────────────────────────────────────────────────────────────────────
   1. INTRO SECTION (Centros Tecnológicos Especializados)
   ─────────────────────────────────────────────────────────────────────────── */
.cte-intro {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 24px 0 0 0;
  background-color: var(--cte-branco);
  box-sizing: border-box;
}

@media (min-width: 1200px) {
  .cte-intro__frame {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    aspect-ratio: 1920 / 626;
  }

  .cte-intro__photo {
    position: absolute;
    left: 2.04%;
    top: 0;
    width: 48.3%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(0% 0%, 100% 10.31%, 100% 89.69%, 0% 100%);
    -webkit-clip-path: polygon(0% 0%, 100% 10.31%, 100% 89.69%, 0% 100%);
  }

  .cte-intro__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center !important;
    clip-path: polygon(0% 0%, 91.67% 12.5%, 100% 87.5%, 0% 100%);
    -webkit-clip-path: polygon(0% 0%, 91.67% 12.5%, 100% 87.5%, 0% 100%);
    transition: clip-path 1s cubic-bezier(.22,1,.36,1), -webkit-clip-path 1s cubic-bezier(.22,1,.36,1) !important;
    will-change: clip-path;
  }

  /* Hover effect with smooth parallelogram transformation (exact matches from page-campanha.php) */
  .cte-intro__photo:hover img,
  .cte-intro__photo img:hover,
  .cte-intro__frame:hover .cte-intro__photo img {
    clip-path: polygon(0% 0%, 100% 12.5%, 91.67% 87.5%, 0% 100%) !important;
    -webkit-clip-path: polygon(0% 0%, 100% 12.5%, 91.67% 87.5%, 0% 100%) !important;
  }

  .cte-intro__title {
    position: absolute;
    left: 58.06% !important;
    top: 12.4% !important;
    width: 38% !important;
    margin: 0;
    font-family: var(--font-brand), 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 3.33vw, 64px) !important;
    line-height: clamp(40px, 3.75vw, 72px) !important;
    color: var(--cte-azul-escuro);
    overflow-wrap: anywhere;
  }

  .cte-intro__body {
    position: absolute;
    left: 63.67% !important;
    top: 44.4% !important;
    width: 30% !important;
    margin: 0;
    font-family: var(--font-sans), 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 0.83vw, 16px) !important;
    line-height: clamp(20px, 1.25vw, 24px) !important;
    color: var(--cte-preto);
  }
}

@media (max-width: 1199px) {
  .cte-intro__frame {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-fluid-md);
    padding: 0 var(--spacing-fluid-inset);
  }

  .cte-intro__photo {
    width: 100%;
    aspect-ratio: 960 / 640;
    overflow: hidden;
    order: 1;
  }

  .cte-intro__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(0% 0%, 91.67% 12.5%, 100% 87.5%, 0% 100%);
    -webkit-clip-path: polygon(0% 0%, 91.67% 12.5%, 100% 87.5%, 0% 100%);
  }

  .cte-intro__title {
    margin: 0 0 clamp(12px,calc(1.8vw + 4.8px),26px) 0;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: var(--text-h2-fluid);
    line-height: var(--leading-h2-fluid);
    color: var(--cte-azul-escuro);
    order: 2;
  }

  .cte-intro__body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: var(--text-body-fluid);
    line-height: var(--leading-body-fluid);
    color: var(--cte-preto);
    order: 3;
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   2. OBJECTIVE SECTIONS (Informático & Industrial)
   ─────────────────────────────────────────────────────────────────────────── */
.cte-section {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 1200px) {
  .cte-section {
    padding: 0 8.3333%;
    display: grid;
    grid-template-columns: 35% 58%;
    gap: 7%;
  }

  .cte-section__title {
    font-family: var(--font-brand), 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 3.33vw, 64px) !important;
    line-height: clamp(40px, 3.75vw, 72px) !important;
    color: var(--cte-azul-escuro);
    margin: 0 0 32px 0;
  }

  .cte-section__text {
    font-family: var(--font-sans), 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 0.83vw, 16px) !important;
    line-height: clamp(20px, 1.25vw, 24px) !important;
    color: var(--cte-preto);
    margin-left: 24% !important;
  }

  .cte-section__text p {
    margin: 0 0 24px 0;
  }
}

@media (max-width: 1199px) {
  .cte-section {
    padding: 0 var(--spacing-fluid-inset);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-fluid-md);
  }

  .cte-section__title {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: var(--text-h2-fluid);
    line-height: var(--leading-h2-fluid);
    color: var(--cte-azul-escuro);
    margin: 0;
  }

  .cte-section__text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: var(--text-body-fluid);
    line-height: var(--leading-body-fluid);
    color: var(--cte-preto);
  }

  .cte-section__text p {
    margin: 0 0 16px 0;
  }
}

/* Styled labels within texts */
.cte-section__text p strong {
  color: var(--cte-azul-escuro);
  font-weight: 600;
}

/* ───────────────────────────────────────────────────────────────────────────
   3. ACCORDION STYLES
   ─────────────────────────────────────────────────────────────────────────── */
.cte-accordions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.cte-accordion {
  border: 2px solid var(--cte-azul);
  background-color: var(--cte-branco);
  padding: clamp(16px, 1.5vw, 24px);
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.cte-accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  gap: 16px;
  box-sizing: border-box;
  text-align: left;
}

.cte-accordion__title {
  font-family: var(--font-brand), 'Syne', sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 0.9vw, 18px);
  line-height: 1.4;
  color: var(--cte-azul);
  margin: 0;
  transition: color 0.3s ease;
}

.cte-accordion__chevron {
  width: 12px;
  height: 6px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  color: var(--cte-azul);
}

.cte-accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding-top 0.4s ease;
  padding-top: 0;
  font-family: var(--font-sans), 'Inter', sans-serif;
  font-size: clamp(14px, 0.83vw, 16px);
  line-height: 1.6;
  color: var(--cte-preto);
  box-sizing: border-box;
}

/* Accordion Active/Open state */
.cte-accordion.open {
  border-color: var(--cte-azul-escuro);
}

.cte-accordion.open .cte-accordion__title {
  color: var(--cte-azul-escuro);
}

.cte-accordion.open .cte-accordion__chevron {
  transform: rotate(180deg);
  color: var(--cte-azul-escuro);
}

.cte-accordion.open .cte-accordion__body {
  max-height: none; /* Height is handled dynamically via JS for transition, fallback to none */
  padding-top: 24px;
}

/* Bullet list style inside accordion body */
.cte-accordion__body ul {
  list-style-type: none;
  padding-left: 0;
  margin: 12px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cte-accordion__body li {
  position: relative;
  padding-left: 20px;
  font-size: clamp(13px, 0.8vw, 15px);
  line-height: 1.5;
  color: #333;
}

.cte-accordion__body li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--cte-azul);
  font-size: 16px;
  line-height: 1;
}

.cte-accordion__body p {
  margin: 0 0 16px 0;
}

.cte-accordion__body p:last-child {
  margin-bottom: 0;
}

.cte-intro__body strong,
.cte-intro__body b,
.cte-section__text strong,
.cte-section__text b,
.cte-accordion__body strong,
.cte-accordion__body b {
  font-weight: 700 !important;
}

.cte-accordion__body a {
  color: var(--cte-azul);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.cte-accordion__body a:hover {
  opacity: 0.8;
}

