/**
 * Studio Hikari Core — Engenharia Especial
 */

/* =====================================================================
   Custom properties
   ===================================================================== */
.sh-ee-wrapper {
	--sh-ee-color-title:      #163a3a;
	--sh-ee-color-local:      #676767;
	--sh-ee-color-text:       #2b2b2b;
	--sh-ee-pill-active-bg:   #0098a9;
	--sh-ee-pill-active-text: #ffffff;
	--sh-ee-pill-text:        #2b2b2b;
	--sh-ee-radius:           10px;
	--sh-ee-gap:              28px;
}

/* =====================================================================
   Barra de filtros
   ===================================================================== */
.sh-ee-filtros {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 32px;
}

.sh-ee-filtro {
	appearance: none;
	border: none;
	background: transparent;
	color: var(--sh-ee-pill-text);
	font-size: 1rem;
	line-height: 1;
	padding: 10px 20px;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.sh-ee-filtro:hover        { background-color: rgba(0,0,0,0.05); }
.sh-ee-filtro.is-active    { background-color: var(--sh-ee-pill-active-bg); color: var(--sh-ee-pill-active-text); }
.sh-ee-filtro.is-active:hover { background-color: var(--sh-ee-pill-active-bg); }

.sh-ee-filtro:focus-visible {
	outline: 2px solid var(--sh-ee-pill-active-bg);
	outline-offset: 2px;
}

/* Tablet */
@media (max-width: 900px) {
	.sh-ee-filtros {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
		margin-bottom: 24px;
	}
	.sh-ee-filtros::-webkit-scrollbar { display: none; }
	.sh-ee-filtro { flex-shrink: 0; font-size: .9rem; padding: 8px 16px; }
}

/* Mobile */
@media (max-width: 580px) {
	.sh-ee-filtro { font-size: .85rem; padding: 8px 14px; }
}

/* =====================================================================
   Grade de cards
   ===================================================================== */
.sh-ee-grid {
	display: grid;
	gap: var(--sh-ee-gap);
	grid-template-columns: repeat(3,1fr);
	margin: 0; padding: 0; list-style: none;
}
.sh-ee-grid--cols-2 { grid-template-columns: repeat(2,1fr); }
.sh-ee-grid--cols-4 { grid-template-columns: repeat(4,1fr); }

@media (max-width: 900px) {
	.sh-ee-grid,
	.sh-ee-grid--cols-3,
	.sh-ee-grid--cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 580px) {
	.sh-ee-grid,
	.sh-ee-grid--cols-2,
	.sh-ee-grid--cols-3,
	.sh-ee-grid--cols-4 { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================================================================
   Card individual
   ===================================================================== */
.sh-ee-card { position: relative; }

.sh-ee-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.sh-ee-card__image {
	aspect-ratio: 4/3;
	overflow: hidden;
	border-radius: var(--sh-ee-radius);
}
.sh-ee-card__image img {
	width: 100%; height: 100%;
	object-fit: cover; display: block;
	transition: transform .4s ease;
}
.sh-ee-card:hover .sh-ee-card__image img { transform: scale(1.04); }

.sh-ee-card__body { padding: 16px 2px 0; }

.sh-ee-card__title {
	margin: 0 0 4px;
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	line-height: 1.3;
	color: var(--sh-ee-color-title);
}

.sh-ee-card__local {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: var(--sh-ee-color-local);
}

.sh-ee-grid__empty { opacity: .6; }

/* =====================================================================
   Overlay (fundo escuro fixo)
   ===================================================================== */
.sh-ee-overlay {
	display: none;              /* escondido por padrão */
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0,0,0,0.55);
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.sh-ee-overlay.is-open {
	display: flex;
}

body.sh-ee-modal-open { overflow: hidden; }

/* =====================================================================
   Modal card — 800×600
   ===================================================================== */
.sh-ee-modal {
	position: relative;
	width: 800px;
	height: 600px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 40px);
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 16px 48px rgba(0,0,0,0.22);
	flex-shrink: 0;
}

/* Header: padding 32px topo + laterais */
.sh-ee-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 32px 32px 0;
	flex-shrink: 0;
}

.sh-ee-modal__header-text { flex: 1; min-width: 0; }

.sh-ee-modal__title {
	margin: 0 0 4px;
	font-size: 1.4rem !important;
	font-weight: 700 !important;
	line-height: 1.2;
	color: var(--sh-ee-color-title);
}

.sh-ee-modal__local {
	margin: 0;
	font-size: .9rem;
	font-weight: 400;
	color: var(--sh-ee-color-local);
}

/* Botão X: o círculo e a cor já vêm no SVG (48×48) */
.sh-ee-modal__close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: opacity .2s ease;
}
.sh-ee-modal__close:hover  { opacity: .85; }
.sh-ee-modal__close svg    { display: block; width: 48px; height: 48px; }

/* Espaço de 32px entre header e imagem */
.sh-ee-modal__image {
	margin-top: 32px;
	flex: 1;
	overflow: hidden;
	min-height: 0;       /* necessário para flex crescer corretamente */
}
.sh-ee-modal__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Corpo de conteúdo (opcional — renderizado só se existir) */
.sh-ee-modal__body {
	padding: 20px 32px 28px;
	flex-shrink: 0;
}
.sh-ee-modal__content {
	font-size: .95rem;
	line-height: 1.6;
	color: var(--sh-ee-color-text);
}
.sh-ee-modal__link {
	display: inline-block;
	margin-top: 12px;
	font-weight: 600;
	font-size: .9rem;
	color: var(--sh-ee-pill-active-bg);
	text-decoration: underline;
}

/* =====================================================================
   Modal responsivo
   ===================================================================== */
@media (max-width: 860px) {
	.sh-ee-modal {
		width: 100%;
		height: auto;
		max-height: calc(100vh - 40px);
	}
	.sh-ee-modal__image {
		max-height: 45vh;
	}
}

@media (max-width: 580px) {
	.sh-ee-modal         { border-radius: 12px; }
	.sh-ee-modal__header { padding: 20px 20px 0; }
	.sh-ee-modal__title  { font-size: 1.1rem !important; }
	.sh-ee-modal__close  { width: 40px; height: 40px; }
	.sh-ee-modal__close svg { width: 40px; height: 40px; }
	.sh-ee-modal__image  { margin-top: 20px; }
	.sh-ee-modal__body   { padding: 16px 20px 20px; }
}
