/*
Theme Name: Instituto Corte-Real
Theme URI: https://institutocortereal.pt
Author: Luís Corte-Real
Author URI: https://institutocortereal.pt
Description: Tema minimalista para o site institucional do Instituto Corte-Real.
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: institutocortereal
*/

:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.35);
  --max-width: 1120px;
}

/* Reset simples */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #030712 36%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Layout base */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  padding: 4.5rem 0;
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
}

.section h2 {
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.section-intro {
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.7));
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

/* Logo texto (header) */
.logo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-main {
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  font-weight: 600;
}

.logo-sub {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Nav */
.nav-list {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

.nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.18s ease-out;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle-open span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* HERO LOGO ONLY */
.hero {
  padding: 4rem 0 4.5rem;
}

.hero-logo-only {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrapper {
  background-color: #f7efe1;
  padding: 3rem 2.5rem;
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-logo-wrapper img {
  display: block;
  max-width: 420px;
  width: min(80vw, 420px);
  height: auto;
}

/* Cards / Boxes etc (rest igual) */

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.3rem, 3vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 1.3rem;
}

.hero-text p {
  color: var(--muted);
  max-width: 650px;
  margin-bottom: 1.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Cards / Boxes */
.hero-card {
  background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
  border-radius: var(--radius-xl);
  padding: 1.7rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.hero-card ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.hero-card li {
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.hero-card-footer {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-color: rgba(191, 219, 254, 0.2);
  color: #0b1120;
  box-shadow: 0 10px 30px rgba(8, 47, 73, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 45px rgba(8, 47, 73, 0.7);
}

.btn-outline {
  border-color: #1f2937;
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  background-color: rgba(15, 23, 42, 1);
}

/* Listas com check */
.check-list {
  list-style: none;
  margin-top: 1rem;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.check-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

/* Grids */
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.card ul {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Programas */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.program-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.4rem 1.3rem;
}

.program-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.program-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.program-card ul {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* CTA box */
.cta-box {
  margin-top: 2.1rem;
  padding: 1.5rem 1.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.96));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Agenda */
.agenda-placeholder ul {
  padding-left: 1.1rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Testemunhos */
.testimonials-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}

.testimonial-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.4rem 1.3rem;
}

.testimonial-text {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.testimonial-author {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Contactos */
.contact-details p {
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.contact-details a {
  color: var(--accent);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.7rem 1.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.form-group {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background-color: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

textarea {
  resize: vertical;
}

.form-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid #111827;
  padding: 1.4rem 0 1.7rem;
  background: #020617;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-links {
  font-size: 0.82rem;
}

/* Responsividade */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .two-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards-grid,
  .programs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    gap: 1rem;
  }

  .hero-logo-wrapper {
    padding: 2.4rem 1.8rem;
  }
}

@media (max-width: 720px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 1.5rem;
    background: rgba(3, 7, 18, 0.98);
    border-radius: 14px;
    padding: 0.7rem 1.2rem 0.9rem;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid rgba(31, 41, 55, 0.9);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
  }

  .nav.nav-open .nav-list {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 3.2rem;
  }

  .section {
    padding: 3.2rem 0;
  }

  .section-alt {
    padding: 3.2rem 0;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .logo-main {
    font-size: 0.85rem;
  }

  .logo-sub {
    font-size: 0.68rem;
  }

  .hero-logo-wrapper img {
    width: min(82vw, 360px);
    
    /* Ajuste exclusivo da imagem do Instituto em mobile */
@media (max-width: 768px) {
  #sobre img[src*="instituto-sala"] {
    width: 100px !important;
    max-width: 100px !important;
    margin-left: auto;
    margin-right: auto;
  }
}

    
 