/* ==========================================================
   NESTE DIA NA HISTÓRIA — EXPERIÊNCIA VISUAL
   ========================================================== */

.history-day-portal{
  position:relative;
  min-height:470px;
  overflow:hidden;
  color:#fff;
  background:var(--history-bg) center 46%/cover no-repeat;
  isolation:isolate
}
.history-day-shade{
  position:absolute;inset:0;z-index:-1;
  background:
    radial-gradient(circle at 20% 55%,rgba(196,157,82,.18),transparent 28%),
    linear-gradient(90deg,rgba(5,37,62,.97) 0%,rgba(5,37,62,.90) 47%,rgba(5,37,62,.58) 76%,rgba(5,37,62,.78) 100%)
}
.history-day-portal-inner{padding-top:28px;padding-bottom:48px}
.history-day-breadcrumb{
  display:flex;align-items:center;gap:8px;
  color:rgba(255,255,255,.68);font-size:.7rem
}
.history-day-breadcrumb a{color:rgba(255,255,255,.76);text-decoration:none}
.history-day-hero-grid{
  display:grid;grid-template-columns:190px minmax(0,1fr);gap:44px;
  align-items:center;max-width:970px;padding:78px 0 34px
}
.history-date-emblem{
  width:180px;height:220px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  border:1px solid rgba(226,194,134,.55);border-radius:14px;
  background:rgba(255,255,255,.07);
  box-shadow:inset 0 0 0 7px rgba(255,255,255,.025),0 20px 40px rgba(2,20,35,.18);
  backdrop-filter:blur(4px)
}
.history-date-emblem small{
  color:#d8b66f;font-size:.72rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase
}
.history-date-emblem strong{
  margin:3px 0;color:#fff;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:5rem;line-height:.95;font-weight:600
}
.history-date-emblem span{color:rgba(255,255,255,.7);font-size:.72rem}
.history-eyebrow{
  display:block;color:#b07d21;font-size:.66rem;font-weight:900;
  letter-spacing:.14em;text-transform:uppercase
}
.history-day-copy .history-eyebrow{color:#d7b36b}
.history-day-copy h1{
  margin:7px 0 14px;color:#fff;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(3rem,6vw,5.7rem);line-height:.95;font-weight:600;letter-spacing:-.035em
}
.history-day-copy p{
  max-width:700px;margin:0;color:rgba(255,255,255,.82);
  font-family:Georgia,"Times New Roman",serif;font-size:1.08rem;line-height:1.72
}
.history-day-copy p strong{color:#fff}
.history-year-span{
  display:flex;align-items:center;gap:13px;max-width:390px;margin-top:28px;
  color:#fff;font-family:Georgia,serif;font-size:.92rem
}
.history-year-span i{flex:1;height:1px;background:linear-gradient(90deg,#d5b16a,rgba(213,177,106,.2))}

.history-day-main{
  padding:70px 0 80px;
  background:linear-gradient(180deg,#f5f1e9 0,#fff 330px)
}
.history-date-picker{
  display:grid;grid-template-columns:minmax(0,.8fr) minmax(500px,1.2fr);gap:35px;
  align-items:end;padding:28px 30px;margin-bottom:58px;
  border:1px solid #e2ddd3;border-radius:14px;background:#fff;
  box-shadow:0 12px 32px rgba(15,44,65,.06)
}
.history-date-picker h2,.history-results-head h2,.history-empty h2,.history-next-paths h2{
  margin:5px 0 7px;color:#0b3557;
  font-family:"Cormorant Garamond",Georgia,serif;font-weight:600
}
.history-date-picker h2{font-size:2rem}
.history-date-picker p{margin:0;color:#74818b;font-size:.75rem;line-height:1.55}
.history-date-form{
  display:grid;grid-template-columns:110px minmax(190px,1fr) auto;gap:10px;align-items:end
}
.history-date-form label span{
  display:block;margin-bottom:6px;color:#687985;font-size:.63rem;font-weight:800;
  letter-spacing:.07em;text-transform:uppercase
}
.history-date-form input,.history-date-form select{
  width:100%;height:46px;padding:0 12px;
  border:1px solid #dce2e5;border-radius:8px;background:#fbfcfc;color:#28485f;
  font-size:.8rem;outline:none
}
.history-date-form input:focus,.history-date-form select:focus{
  border-color:#b88a36;box-shadow:0 0 0 3px rgba(184,138,54,.1)
}
.history-date-form button{
  height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:0;border-radius:8px;padding:0 17px;background:#0b3a5c;color:#fff;
  font-size:.72rem;font-weight:800;cursor:pointer
}
.history-date-form button:hover{background:#0d466f}

.history-results{max-width:1050px;margin:0 auto}
.history-results-head{margin-bottom:30px}
.history-results-head h2{font-size:2.7rem}
.history-results-head p{margin:0;color:#73818c;font-size:.78rem}

.history-timeline{position:relative}
.history-timeline::before{
  content:"";position:absolute;left:88px;top:16px;bottom:24px;width:1px;
  background:linear-gradient(#c2a466,#d8dfe3 12%,#d8dfe3 88%,#c2a466)
}
.history-entry{
  position:relative;display:grid;grid-template-columns:125px minmax(0,1fr);
  gap:25px;align-items:start;margin-bottom:22px
}
.history-year-marker{
  position:relative;padding-top:20px;text-align:right
}
.history-year-marker span{
  padding-right:26px;color:#89631e;
  font-family:"Cormorant Garamond",Georgia,serif;font-size:1.52rem;font-weight:700
}
.history-year-marker i{
  position:absolute;right:29px;top:29px;width:12px;height:12px;
  border:3px solid #fff;border-radius:50%;background:#b68a3a;
  box-shadow:0 0 0 1px #b68a3a
}
.history-document-card{
  min-height:180px;display:grid;grid-template-columns:130px 1fr;gap:22px;
  padding:16px;border:1px solid #e0e5e7;border-radius:12px;
  background:#fff;text-decoration:none!important;color:inherit!important;
  box-shadow:0 8px 24px rgba(15,44,65,.045);
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease
}
.history-document-card:hover{
  transform:translateY(-3px);border-color:#d2b373;
  box-shadow:0 14px 30px rgba(15,44,65,.09)
}
.history-document-cover{
  min-height:148px;display:grid;place-items:center;overflow:hidden;
  border-radius:8px;background:#f3efe7
}
.history-document-cover img{display:block;width:100%;height:148px;object-fit:contain}
.history-cover-placeholder{
  width:100%;height:100%;display:grid;place-items:center;
  color:#a67b32;font-size:2rem
}
.history-document-info{display:flex;flex-direction:column;padding:8px 5px 5px 0}
.history-document-kind{
  color:#a7741d;font-size:.59rem;font-weight:900;letter-spacing:.09em;text-transform:uppercase
}
.history-document-info h3{
  margin:6px 0 10px;color:#183c58;
  font-family:"Cormorant Garamond",Georgia,serif;font-size:1.52rem;line-height:1.15
}
.history-document-meta{display:flex;flex-wrap:wrap;gap:7px 13px;color:#73818b;font-size:.68rem}
.history-document-meta span{display:inline-flex;align-items:center;gap:5px}
.history-document-open{
  display:inline-flex;align-items:center;gap:7px;margin-top:auto;padding-top:15px;
  color:#8e651c;font-size:.7rem;font-weight:800
}

.history-empty{
  max-width:760px;margin:0 auto;padding:56px 35px;text-align:center;
  border:1px solid #e1ddd4;border-radius:15px;background:#fff
}
.history-empty-icon{
  width:56px;height:56px;display:grid;place-items:center;margin:0 auto 17px;
  border-radius:50%;background:#f5eee1;color:#a87823;font-size:1.35rem
}
.history-empty h2{font-size:2.35rem}
.history-empty p{max-width:600px;margin:0 auto;color:#73808a;line-height:1.7}
.history-empty-actions{
  display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:22px
}
.history-empty-actions a{
  display:inline-flex;align-items:center;gap:8px;padding:11px 14px;
  border:1px solid #d8dee1;border-radius:8px;color:#31516a;text-decoration:none;font-size:.72rem;font-weight:800
}

.history-next-paths{
  display:grid;grid-template-columns:.75fr 1.25fr;gap:34px;align-items:start;
  max-width:1050px;margin:62px auto 0;padding-top:38px;border-top:1px solid #e4e6e7
}
.history-next-paths h2{font-size:2rem}
.history-next-links{display:grid;gap:10px}
.history-next-links a{
  display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:center;
  padding:13px;border:1px solid #e1e5e7;border-radius:9px;background:#fff;
  color:inherit;text-decoration:none
}
.history-next-links>a>i{
  width:42px;height:42px;display:grid;place-items:center;border-radius:8px;
  background:#f5efe4;color:#a77720
}
.history-next-links strong{display:block;color:#24445c;font-size:.76rem}
.history-next-links small{display:block;margin-top:2px;color:#85919a;font-size:.65rem;line-height:1.35}

@media(max-width:900px){
  .history-date-picker{grid-template-columns:1fr}
  .history-date-form{grid-template-columns:100px 1fr auto}
  .history-next-paths{grid-template-columns:1fr}
}
@media(max-width:700px){
  .history-day-hero-grid{grid-template-columns:1fr;gap:26px;padding-top:50px}
  .history-date-emblem{width:145px;height:165px}
  .history-date-emblem strong{font-size:3.9rem}
  .history-day-copy h1{font-size:3.3rem}
  .history-day-main{padding-top:50px}
  .history-date-picker{padding:22px 18px}
  .history-date-form{grid-template-columns:1fr 1fr}
  .history-date-form button{grid-column:1/-1}
  .history-results-head h2{font-size:2.2rem}
  .history-timeline::before{left:24px}
  .history-entry{grid-template-columns:48px minmax(0,1fr);gap:11px}
  .history-year-marker span{
    display:block;padding:0;writing-mode:vertical-rl;transform:rotate(180deg);
    font-size:1rem;text-align:center
  }
  .history-year-marker i{right:18px;top:49px}
  .history-document-card{grid-template-columns:92px 1fr;gap:14px}
  .history-document-cover{min-height:118px}
  .history-document-cover img{height:118px}
  .history-document-info h3{font-size:1.25rem}
}
@media(max-width:480px){
  .history-date-form{grid-template-columns:1fr}
  .history-date-form button{grid-column:auto}
  .history-document-card{grid-template-columns:1fr}
  .history-document-cover{max-width:170px}
  .history-document-cover img{height:180px}
}
