/* Visual First / Etapa 3. Estilos limitados à seção Especialidades. */
#especialidades { position:relative; isolation:isolate; background:#031321; color:#f5f7fa; padding-block:56px 42px; font-family:Arial,'Segoe UI',sans-serif; }
#especialidades>.container { width:92%; max-width:1536px; }
#especialidades .specialties-intro { position:relative; display:grid; grid-template-columns:minmax(0,3fr) minmax(0,1fr); gap:14px 50px; padding:0 30px 30px; }
#especialidades .specialties-intro::before { content:''; position:absolute; z-index:-1; right:0; top:-56px; bottom:0; width:50%; background:linear-gradient(90deg,#031321,transparent),linear-gradient(0deg,#031321,rgba(3,19,33,.5)),url('assets/turbina-detalhe-1600.webp') center/cover no-repeat; opacity:.55; pointer-events:none; }
#especialidades .specialties-heading .eyebrow { color:#24bcff; font-size:12px; font-weight:500; letter-spacing:.8px; margin-bottom:12px; }
#especialidades .specialties-heading h2 { font-size:clamp(32px,3vw,49px); line-height:1.07; font-weight:800; letter-spacing:-.7px; text-transform:uppercase; }
#especialidades .specialties-heading h2 span { color:#00aaff; }
#especialidades .specialties-aside { grid-column:2; grid-row:1 / 3; align-self:center; padding-left:19px; border-left:3px solid #00aaff; color:#e8eef5; font-size:14px; line-height:1.7; max-width:260px; }
#especialidades .specialties-description { grid-column:1; color:#e4edf4; font-size:15px; line-height:1.55; max-width:800px; }
#especialidades .service-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; background:none; border:0; }
#especialidades .service-card { display:flex; flex-direction:column; position:relative; overflow:hidden; min-height:235px; padding:0; background:#0b2031; border:1px solid #285069; border-radius:3px; color:white; transition:border-color .18s; }
#especialidades .service-card:hover { border-color:#29baff; background:#0b2031; }
#especialidades .service-card:focus-visible { outline:3px solid #8dceff; outline-offset:4px; }
#especialidades .specialty-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; }
#especialidades .service-card[data-specialty="Turbinas a vapor"] .specialty-photo { object-position:48% 40%; }
#especialidades .specialty-shade { position:absolute; inset:0; background:linear-gradient(0deg,#021321 0%,rgba(2,19,33,.99) 20%,rgba(2,19,33,.87) 35%,rgba(2,19,33,.12) 68%,transparent 90%); }
#especialidades .specialty-photo-trigger { position:absolute; z-index:2; inset:0; display:block; width:100%; height:100%; padding:0; margin:0; border:0; border-radius:inherit; appearance:none; -webkit-appearance:none; background:transparent; cursor:zoom-in; }
#especialidades .specialty-photo-trigger:focus-visible { outline:3px solid #8dceff; outline-offset:-4px; }
#especialidades .card-content { position:relative; z-index:3; margin-top:auto; flex:0 0 auto; padding:100px 65px 20px 22px; pointer-events:none; }
#especialidades .card-number { display:block; font-size:9px; line-height:1.35; font-weight:600; letter-spacing:.5px; color:#37bfff; }
#especialidades .service-card h3 { font-size:19px; line-height:1.17; letter-spacing:-.2px; font-weight:750; margin-top:7px; color:#fff; }
#especialidades .card-content>p { font-size:13px; line-height:1.45; margin:7px 0 0; color:#e2ebf2; }
#especialidades .card-contact-link { position:absolute; z-index:4; inset:56% 0 0; }
#especialidades .card-contact-link:focus-visible { outline:3px solid #8dceff; outline-offset:-5px; }
#especialidades .card-action { position:absolute; z-index:5; bottom:23px; right:18px; display:grid; place-items:center; appearance:none; -webkit-appearance:none; width:37px; height:37px; padding:0; margin:0; border:1px solid #00b7ff; border-radius:50%; color:#24bcff; background:rgba(3,19,33,.65); font-size:26px; line-height:1; font-weight:400; cursor:pointer; }
#especialidades .card-action::before { content:'+'; position:absolute; inset:0; display:grid; place-items:center; color:#24bcff; font:inherit; line-height:1; text-align:center; pointer-events:none; }
#especialidades .card-action::after { content:'Ver fotos'; position:absolute; right:calc(100% + 9px); top:50%; transform:translateY(-50%); width:max-content; padding:5px 8px; border:1px solid #285069; border-radius:2px; background:#071a29; color:#f5f7fa; font-size:12px; line-height:1.2; font-weight:600; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .16s ease,visibility .16s ease; }
#especialidades .card-action:hover::after, #especialidades .card-action:focus-visible::after { opacity:1; visibility:visible; }
#especialidades .specialties-review { color:#b7cadc; font-size:11px; line-height:1.6; margin-top:22px; }
#especialidades .specialties-review summary { width:fit-content; padding-block:8px; cursor:pointer; }
#especialidades .specialties-review p { max-width:950px; margin-top:8px; }
#especialidades .specialties-review :focus-visible { outline:3px solid #8dceff; outline-offset:4px; }
@media(min-width:1600px) {
 #especialidades .service-card { min-height:260px; }
 #especialidades .service-card h3 { font-size:21px; }
 #especialidades .card-content>p { font-size:14px; }
}

/* Galeria de fotos das especialidades: regras isoladas da seção e do modal. */
.specialty-gallery[hidden] { display:none; }
.specialty-gallery { position:fixed; z-index:2000; inset:0; color:#f5f7fa; }
.specialty-gallery__backdrop { position:absolute; inset:0; background:rgba(2,8,14,.96); }
.specialty-gallery__dialog { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:6vh 5vw; }
.specialty-gallery__figure { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; width:90vw; height:85vh; max-width:90vw; max-height:85vh; }
.specialty-gallery__image { display:block; flex:1 1 auto; min-height:0; width:100%; height:calc(100% - 42px); max-width:100%; max-height:100%; object-fit:contain; }
.specialty-gallery__figure figcaption { display:flex; align-items:center; justify-content:center; gap:14px; color:#f5f7fa; text-align:center; font-size:14px; line-height:1.4; }
.specialty-gallery__count { color:#b8c9d8; font-variant-numeric:tabular-nums; }
.specialty-gallery__close, .specialty-gallery__previous, .specialty-gallery__next { position:absolute; z-index:1; display:grid; place-items:center; border:1px solid rgba(194,202,212,.45); border-radius:50%; color:#fff; background:rgba(13,32,49,.88); cursor:pointer; }
.specialty-gallery__close { top:20px; right:22px; width:46px; height:46px; font-size:30px; line-height:1; }
.specialty-gallery__previous, .specialty-gallery__next { top:50%; width:48px; height:48px; font-size:38px; line-height:1; transform:translateY(-50%); }
.specialty-gallery__previous { left:20px; }
.specialty-gallery__next { right:20px; }
.specialty-gallery :focus-visible { outline:3px solid #48bcff; outline-offset:4px; }
@media(max-width:600px) {
 .specialty-gallery__dialog { padding:6vh 5vw; }
 .specialty-gallery__figure { width:90vw; height:85vh; height:85dvh; max-width:90vw; max-height:85vh; max-height:85dvh; }
 .specialty-gallery__image { width:100%; height:calc(100% - 42px); max-width:100%; max-height:100%; }
 .specialty-gallery__close { top:12px; right:12px; width:42px; height:42px; }
 .specialty-gallery__previous, .specialty-gallery__next { top:auto; bottom:14px; width:40px; height:40px; font-size:32px; transform:none; }
 .specialty-gallery__previous { left:14px; }
 .specialty-gallery__next { right:14px; }
 .specialty-gallery__figure figcaption { font-size:13px; }
}
@media(prefers-reduced-motion:reduce) {
 #especialidades .card-action::after { transition:none; }
}
@media(min-width:801px) and (max-width:1100px) {
 #especialidades .specialties-intro { padding-inline:0; grid-template-columns:minmax(0,2.5fr) minmax(0,1fr); gap:15px 25px; }
 #especialidades .service-grid { gap:15px; }
 #especialidades .card-content { padding:115px 48px 18px 16px; }
 #especialidades .service-card h3 { font-size:17px; }
 #especialidades .card-content>p { font-size:12px; }
 #especialidades .card-action { width:30px; height:30px; right:11px; font-size:22px; }
}
@media(max-width:800px) {
 #especialidades { padding-block:35px 30px; }
 #especialidades>.container { width:92%; }
 #especialidades .specialties-intro { grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:17px 17px; padding:0 7px 25px; }
 #especialidades .specialties-intro::before { width:72%; top:-35px; }
 #especialidades .specialties-heading .eyebrow { font-size:10px; letter-spacing:.6px; margin-bottom:13px; }
 #especialidades .specialties-heading h2 { font-size:clamp(21px,5.5vw,39px); letter-spacing:-.4px; line-height:1.1; overflow-wrap:normal; }
 #especialidades .specialties-aside { grid-row:1; padding-left:11px; border-width:2px; font-size:12px; line-height:1.65; }
 #especialidades .specialties-description { grid-column:1/-1; font-size:14px; line-height:1.6; }
 #especialidades .service-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
 #especialidades .service-card { min-height:350px; }
 #especialidades .specialty-photo { height:210px; }
 #especialidades .specialty-shade { background:linear-gradient(180deg,transparent 90px,rgba(3,19,33,.2) 130px,#031321 210px); }
 #especialidades .card-content { padding:135px 14px 20px; }
 #especialidades .card-contact-link { top:60%; }
 #especialidades .card-number { font-size:8px; letter-spacing:.15px; }
 #especialidades .service-card h3 { font-size:16px; line-height:1.2; margin-top:8px; }
 #especialidades .card-content>p { font-size:12px; line-height:1.5; padding-right:25px; }
 #especialidades .card-action { width:29px; height:29px; right:9px; bottom:18px; font-size:21px; }
 #especialidades .service-card:last-child { grid-column:1/-1; min-height:250px; }
 #especialidades .service-card:last-child .specialty-photo { height:100%; }
 #especialidades .service-card:last-child .specialty-shade { background:linear-gradient(0deg,#031321,rgba(3,19,33,.9) 35%,transparent 85%); }
 #especialidades .service-card:last-child .card-content { max-width:75%; padding-top:110px; }
 #especialidades .service-card:last-child .card-action { right:20px; bottom:22px; width:36px; height:36px; font-size:25px; }
}
@media(max-width:450px) {
 #especialidades .specialties-intro { grid-template-columns:minmax(0,2fr) minmax(0,.85fr); gap:17px 12px; }
 #especialidades .specialties-heading h2 { font-size:clamp(20px,5.3vw,24px); }
 #especialidades .specialties-aside { font-size:11px; padding-left:9px; }
 #especialidades .service-card h3 { font-size:14px; }
 #especialidades .card-content { padding-inline:12px; }
 #especialidades .card-content>p { font-size:12px; padding-right:15px; }
 #especialidades .card-action { bottom:11px; right:8px; width:25px; height:25px; font-size:20px; }
}
@media(max-width:359px) {
 #especialidades .specialties-intro { display:block; }
 #especialidades .specialties-heading h2 { font-size:28px; }
 #especialidades .specialties-aside { margin-top:20px; max-width:none; font-size:12px; }
 #especialidades .specialties-description { margin-top:18px; }
 #especialidades .service-grid { grid-template-columns:1fr; }
 #especialidades .service-card,#especialidades .service-card:last-child { min-height:300px; }
 #especialidades .specialty-photo { height:100%; }
 #especialidades .service-card h3 { font-size:19px; }
 #especialidades .card-content { padding:120px 52px 20px 18px; }
 #especialidades .service-card:last-child .card-content { max-width:none; padding:120px 52px 20px 18px; }
 #especialidades .card-number { font-size:9px; }
 #especialidades .card-action { width:30px; height:30px; right:12px; bottom:20px; }
}

/* Etapa 8: numeração e contexto auxiliares legíveis no celular. */
#especialidades .card-number { font-size:12px; }
@media(max-width:800px) { #especialidades .specialties-heading .eyebrow { font-size:12px; } }
@media(max-width:450px) { #especialidades .specialties-aside { font-size:12px; } }
