/* =============================================
   INDEX.CSS — Estils específics de la pàgina d'inici.
   Requereix plantilla.css com a base.
   ============================================= */

/* ==================== CONTENIDOR ==================== */
.pantalla {
  overflow-y: auto;
}

/* ==================== COS ==================== */
.cos_pagina {
  display: flex;
  align-items: center;
  gap: 4%;
  padding: clamp(10px, 1.5vh, 18px) 0;
  overflow-y: auto;
}

.foto_cos {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.foto_cos img {
  max-width: 100%;
  max-height: clamp(62vh, 72vh, 82vh);
  object-fit: contain;
  border: 6px solid white;
  outline: 1px solid #ccc;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

figcaption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 8px;
  text-align: center;
}

.texte {
  flex: 2.5;
}

.caixa_texte {
  width: 100%;
  padding-right: 12%;
  padding-left: 2%;
}

.texte p {
  font-size: clamp(0.82rem, 0.88vw, 0.96rem);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.texte p:not(.autor) {
  text-align: justify;
  text-indent: 1.5em;
}

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

.texte p.autor {
  font-size: 1.05rem;
  font-weight: bold;
  color: #888;
  text-align: right;
  text-indent: 0;
  margin-top: 2rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {

  .cos_pagina {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    overflow-y: visible;
    padding: 20px 0;
  }

  .foto_cos {
    width: 100%;
    max-width: 400px;
  }

  .foto_cos img {
    max-height: 85vh;
    max-width: 100%;
  }

  .texte {
    flex: none;
    width: 100%;
  }

  .caixa_texte {
    padding-right: 0;
    padding-left: 0;
  }

  .texte p {
    font-size: 1rem;
    text-align: left;
    text-indent: 0;
    line-height: 1.6;
  }
}
