
.efm { 
  --efm-guinda: var(--guinda, #7B1C3E);
   --efm-oro: var(--oro); 
   max-width: 1100px; 
   margin: 0 auto; 
   padding: 0 20px 80px; }

/* Aviso: hoy / próxima efeméride */
.efm-proxima { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px; 
  flex-wrap: wrap;
  max-width: 760px; 
  margin: 0 auto 26px; 
  padding: 14px 20px; 
  border-left: 4px solid var(--efm-oro);
  background: rgba(123,28,62,.06); 
  color: #3b2a2a; 
  line-height: 1.5; 
}
.efm-proxima[hidden] { 
  display: none;
 }
.efm-proxima > span { flex: 1 1 340px;
 }
.efm-proxima strong { color: var(--efm-guinda);
 }
.efm-proxima button { border: 1px solid var(--efm-guinda);
   background: transparent;
   color: var(--efm-guinda);

  padding: 7px 16px;
   border-radius: 4px;
   font: inherit;
   font-weight: 600;
   cursor: pointer;
   transition: background .2s, color .2s;
 }
.efm-proxima button:hover { background: var(--efm-guinda);
   color: #fff;
 }

/* Selector de meses */
.efm-meses { display: flex;
   gap: 6px;
   overflow-x: auto;
   padding: 6px 2px 30px;
   justify-content: center;
   scrollbar-width: thin;
 }
.efm-meses button { position: relative;
   flex: none;
   min-width: 58px;
   padding: 9px 12px 11px;
   border: 1px solid rgba(123,28,62,.25);

  border-radius: 999px;
   background: transparent;
   color: #3b2a2a;
   font: inherit;
   font-size: 15px;
   cursor: pointer;
   transition: background .2s, color .2s;
 }
.efm-meses button:hover { background: rgba(123,28,62,.08);
 }
.efm-meses button[aria-pressed="true"] { background: var(--efm-guinda);
   border-color: var(--efm-guinda);
   color: #fff;
 }
.efm-meses button.tiene::after { content: "";
   position: absolute;
   left: 50%;
   bottom: 4px;
   width: 5px;
   height: 5px;
   margin-left: -2.5px;
   border-radius: 50%;
   background: var(--efm-oro);
 }
.efm button:focus-visible { outline: 3px solid var(--efm-oro);
   outline-offset: 2px;
 }


/* Línea del tiempo */
.efm-linea { position: relative;
   display: grid;
   grid-template-columns: 1fr 1fr;
   column-gap: 72px;
   row-gap: 36px;
   align-items: start;
   margin: 0;
   padding: 0;
   list-style: none;
 }
.efm-linea::before { content: "";
   position: absolute;
   left: 50%;
   top: 0;
   bottom: 0;
   width: 6px;
   transform: translateX(-50%);
   border-radius: 3px;

  background: repeating-linear-gradient(180deg, #a48e6c 0 9px, #b9a379 9px 21px);
 }
.efm-item { position: relative;
   width: min(420px, 100%);
 }
.efm-item:nth-child(odd)  { grid-column: 1;
   justify-self: end;
 }
.efm-item:nth-child(even) { grid-column: 2;
   justify-self: start;
   margin-top: 90px;
 }
.efm-linea.uno .efm-item { grid-column: 1 / -1;
   justify-self: center;
 }
.efm-linea.uno::before, .efm-linea.uno .efm-nodo { display: none;
 }

.efm-nodo { position: absolute;
   top: 64px;
   width: 22px;
   height: 22px;
   border-radius: 50%;
   background: var(--c);
   border: 4px solid #fdf6ec;
   box-shadow: 0 0 0 1px rgba(0,0,0,.15);
 }
.efm-nodo::before { content: "";
   position: absolute;
   top: 5px;
   width: 36px;
   height: 4px;
   background: #a48e6c;
 }
.efm-item:nth-child(odd)  .efm-nodo { right: -47px;
 }
.efm-item:nth-child(odd)  .efm-nodo::before { right: 100%;
 }
.efm-item:nth-child(even) .efm-nodo { left: -47px;
 }
.efm-item:nth-child(even) .efm-nodo::before { left: 100%;
 }

/* Tarjeta con borde inferior de papel picado */
.efm-tarjeta { position: relative;
   aspect-ratio: 4 / 5;
   overflow: hidden;
   border-radius: 6px 6px 0 0;
   background: linear-gradient(160deg, var(--c), #1d0a10);
         }
.efm-tarjeta img { position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   object-fit: cover;
   filter: grayscale(1) contrast(1.05);
 }
.efm-tarjeta::after { content: "";
   position: absolute;
   inset: 0;
   background: var(--c);
   mix-blend-mode: color;
   opacity: .6;
   pointer-events: none;
 } /* mismo tono para fotos de distinta calidad */
.efm-ini { position: absolute;
   right: 18px;
   top: 38%;
   font: 600 150px/1 'Playfair Display', Georgia, serif;
   color: rgba(255,255,255,.12);
 }
.efm-cinta { position: absolute;
   z-index: 2;
   top: 0;
   left: 18px;
   width: 82px;
   padding: 9px 0 18px;
   text-align: center;
   background: var(--efm-oro);
   color: #2b1a1a;

  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 10px), 0 100%);
   line-height: 1.1;
 }
.efm-cinta b { display: block;
   font: 900 48px/1 var(--font-titles);
 }
.efm-cinta span { display: block;
   font: 500 18px/1 var(--font-titles);
 }
.efm-cinta i { display: block;
   font-size: 18px;
   font-style: normal;
   opacity: .8;
 }
.efm-texto { position: absolute;
   z-index: 2;
   left: 0;
   right: 0;
   bottom: 0;
   padding: 70px 20px 24px;
   color: #fff;
   background: linear-gradient(transparent, rgba(20,6,12,.9) 70%);
 }
.efm-texto small { display: block;
   margin-bottom: 4px;
   font-size: 15px;
   color: var(--efm-oro);
 }
.efm-texto h3 { margin: 0 0 6px;
   font: 900 44px/1.15 var(--font-titles);
   color: #fff;
 }
.efm-texto p { margin: 0;
   font-size: 18px;
   line-height: 1.45;
   color: rgba(255,255,255,.88);
 }
.efm-item.efm-resalte .efm-tarjeta { animation: efm-resalte 1.6s ease 2;
 }
@keyframes efm-resalte { 50% { transform: translateY(-6px);
 } }

.efm-vacio { max-width: 520px;
   margin: 30px auto;
   text-align: center;
   color: #5b4636;
   line-height: 1.7;
 }
.efm-vacio button { margin-top: 12px;
   padding: 9px 20px;
   border: 0;
   border-radius: 4px;
   background: var(--efm-guinda);
   color: #fff;
   font: inherit;
   cursor: pointer;
 }

@media (max-width: 760px) {
  .efm-meses { justify-content: flex-start;
   }
  .efm-linea { grid-template-columns: 1fr;
     padding-left: 44px;
     row-gap: 30px;
   }
  .efm-linea::before, .efm-linea.uno::before { display: block;
     left: 16px;
     transform: none;
   }
  .efm-item:nth-child(n), .efm-linea.uno .efm-item { grid-column: 1;
     justify-self: start;
     margin-top: 0;
     width: min(380px, 100%);
   }
  .efm-item:nth-child(n) .efm-nodo, .efm-linea.uno .efm-nodo { display: block;
     left: -39px;
     right: auto;
   }
  .efm-nodo::before { display: none;
   }
}
@media (prefers-reduced-motion: reduce) { .efm-item.efm-resalte .efm-tarjeta { animation: none;
 } }
