/* Thema: Dynamisch Tegels
   Dit thema verandert niet alleen kleuren, maar ook de VORM van contentblokken:
   lerarenprofielen worden tegels/kaarten (i.p.v. een lijst), afbeeldingen en
   pdf-links krijgen een andere behandeling, en de pagina "glijdt in beeld"
   bij het laden. */
:root {
    --color-bg: #f2f7f6;
    --color-surface: #ffffff;
    --color-text: #16302c;
    --color-text-muted: #5b7d77;
    --color-primary: #0f9b8e;
    --color-primary-dark: #0b756c;
    --color-secondary: #16302c;
    --color-accent: #ff6f59;
    --color-border: #dcebe8;
    --font-heading: 'Segoe UI', Verdana, Arial, sans-serif;
    --font-body: 'Segoe UI', Verdana, Arial, sans-serif;
    --radius: 16px;
    --shadow: 0 12px 32px rgba(15, 60, 55, 0.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------- */
/* Laad-animatie: alles "glijdt" rustig in beeld zodra de pagina laadt.   */
/* --------------------------------------------------------------------- */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeScaleIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
.site-header { animation: riseIn 0.5s ease both; }
.site-carousel { animation: fadeScaleIn 0.6s ease both; animation-delay: 0.08s; }
.sidebar-widget { animation: riseIn 0.5s ease both; animation-delay: 0.12s; }

.content > * { animation: riseIn 0.55s cubic-bezier(.22,.68,.36,1) both; }
.content > *:nth-child(1) { animation-delay: 0.05s; }
.content > *:nth-child(2) { animation-delay: 0.10s; }
.content > *:nth-child(3) { animation-delay: 0.15s; }
.content > *:nth-child(4) { animation-delay: 0.20s; }
.content > *:nth-child(5) { animation-delay: 0.25s; }
.content > *:nth-child(6) { animation-delay: 0.30s; }
.content > *:nth-child(7) { animation-delay: 0.34s; }
.content > *:nth-child(8) { animation-delay: 0.38s; }
.content > *:nth-child(9) { animation-delay: 0.42s; }
.content > *:nth-child(10) { animation-delay: 0.46s; }
.content > *:nth-child(n+11) { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    .site-header, .site-carousel, .sidebar-widget, .content > * { animation: none; }
}

/* Header */
.site-header { background: var(--color-surface); box-shadow: var(--shadow); position: relative; z-index: 30; }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 8px; flex-wrap: wrap; gap: 10px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 94px; height: 94px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 5px var(--color-primary); }
.brand-name { font-family: var(--font-heading); font-size: 25px; font-weight: 800; color: var(--color-secondary); }
.brand-name::first-letter { color: var(--color-accent); }
.social-links { display: flex; gap: 10px; align-items: center; }
.social-links img { height: 26px; width: 26px; opacity: 0.85; transition: transform 0.2s ease, opacity 0.2s ease; }
.social-links img:hover { opacity: 1; transform: translateY(-2px) scale(1.08); }

.header-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; }
.tagline { margin: 0; color: var(--color-text-muted); font-style: italic; }

/* Navigation */
.site-nav { position: relative; flex: 1; display: flex; justify-content: flex-end; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 34px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 3px; background: var(--color-secondary); border-radius: 2px; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-link { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--color-text); font-weight: 700; font-size: 14.5px; }
.nav-link::after {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px;
    background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav-item.active > .nav-link::after, .nav-link:hover::after { transform: scaleX(1); }
.nav-link:hover { text-decoration: none; }
.nav-caret { width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; }
.nav-submenu {
    list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
    background: var(--color-surface); border-radius: 12px; box-shadow: var(--shadow); min-width: 230px;
    display: block; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.18s ease; z-index: 20;
}
.nav-item.has-children:hover .nav-submenu, .nav-item.has-children.open .nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-submenu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--color-text); font-size: 14px; }
.nav-submenu a:hover, .nav-submenu a.active { background: var(--color-bg); text-decoration: none; color: var(--color-primary-dark); }

/* Carousel */
.site-carousel { margin: 20px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.site-carousel img { object-fit: cover; height: 380px; }
.carousel-caption { background: rgba(15, 48, 44, 0.55); border-radius: 999px; padding: 8px 20px; }
.carousel-caption h2 { font-size: 19px; margin: 0; }

/* Layout */
.main-area { padding: 10px 0 40px; }
.page-grid { display: grid; gap: 28px; }
.page-grid.layout-standard { grid-template-columns: 260px 1fr; }
.page-grid.layout-wide { grid-template-columns: 1fr; }

.content {
    background: var(--color-surface); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
    display: flex; flex-wrap: wrap; gap: 22px; align-content: flex-start;
}
.content > * { flex: 1 1 100%; min-width: 0; margin: 0 !important; }

.content h1 { font-family: var(--font-heading); font-size: 29px; color: var(--color-secondary); position: relative; padding-bottom: 12px; }
.content h2 { font-family: var(--font-heading); font-size: 21px; color: var(--color-primary-dark); position: relative; padding-bottom: 10px; }
.content h1::after, .content h2::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: 64px; border-radius: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.content h2::after { bottom: -6px; width: 44px; }
.content h3 { font-size: 18px; color: var(--color-secondary); }
.block-heading { margin-bottom: 0; }

.block-text p { margin: 0 0 14px; }
.block-text p:last-child { margin-bottom: 0; }
.block-banner {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent)); color: #fff;
    padding: 14px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow);
}
.block-banner a { color: #fff; text-decoration: underline; }

/* Afbeeldingen: ronder, met schaduw en hover-zoom */
.block-image img { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.3s ease; }
.block-image img:hover { transform: scale(1.02); }
/* .content is een flex-container (voor de profieltegels), waarin CSS-floats
   niet werken op de directe kinderen - losse afbeeldingen worden hier daarom
   bewust getoond als gecentreerde "showcase"-afbeelding i.p.v. tekst-omloop. */
.block-image-left, .block-image-right, .block-image-center { text-align: center; flex-basis: 100%; }
.block-image-left img, .block-image-right img, .block-image-center img { margin: 0 auto; max-width: min(100%, 520px); }
.block-image figcaption { text-align: center; color: var(--color-text-muted); font-size: 13px; margin-top: 8px; }

.block-image-grid { display: grid; grid-template-columns: repeat(var(--grid-columns, 4), 1fr); gap: 16px; }
.grid-item { text-align: center; margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--color-bg); }
.grid-item img { max-width: 100%; transition: transform 0.35s ease; display: block; }
.grid-item:hover img { transform: scale(1.08); }
.grid-item figcaption {
    font-size: 12.5px; margin-top: 0; color: #fff; background: rgba(15,48,44,0.75); padding: 6px 4px;
    position: absolute; left: 0; right: 0; bottom: 0; transform: translateY(100%); transition: transform 0.25s ease;
}
.grid-item:hover figcaption { transform: translateY(0); }

/* PDF-lijst als tegel-chips i.p.v. een lijn met streepjes */
.block-pdf-list { display: flex; flex-wrap: wrap; gap: 10px; line-height: normal; }
.block-pdf-list .pdf-sep { display: none; }
.block-pdf-list a {
    display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg); color: var(--color-primary-dark);
    padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; border: 1px solid var(--color-border);
    transition: background 0.2s ease, transform 0.2s ease;
}
.block-pdf-list a::before { content: '📄'; font-size: 13px; }
.block-pdf-list a:hover { background: var(--color-primary); color: #fff; text-decoration: none; transform: translateY(-2px); }

.block-table table { width: 100%; border-collapse: separate; border-spacing: 0; }
.block-table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); }
.block-table th, .block-table td { padding: 12px 16px; text-align: left; }
.block-table th { background: var(--color-secondary); color: #fff; font-family: var(--font-heading); font-weight: 600; }
.block-table tbody tr:nth-child(odd) { background: var(--color-bg); }
.block-table tbody tr { transition: background 0.15s ease; }
.block-table tbody tr:hover { background: #e4f3f1; }

.block-embed iframe { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; }
.gallery-item img { width: 100%; height: 150px; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption { padding: 8px 10px; font-size: 13px; color: var(--color-text-muted); }
.album-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.album-list li { margin: 0; }
.album-list a {
    display: inline-block; background: var(--color-bg); padding: 12px 20px; border-radius: 999px; font-weight: 700;
    border: 1px solid var(--color-border); transition: background 0.2s ease, transform 0.2s ease;
}
.album-list a:hover { background: var(--color-primary); color: #fff; text-decoration: none; transform: translateY(-2px); }

/* Profielen (bv. de leraren-pagina): TEGELS i.p.v. een lijst */
.block-profile {
    flex: 1 1 250px; max-width: 100%; display: flex; flex-direction: column;
    background: var(--color-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.block-profile:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,60,55,0.16); }
.block-profile .profile-photo { aspect-ratio: 1 / 1; overflow: hidden; }
.block-profile .profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.block-profile .profile-body { padding: 18px 20px 22px; }
.profile-name { margin: 0 0 2px; font-family: var(--font-heading); font-size: 18px; color: var(--color-secondary); }
.profile-subtitle { margin: 0 0 10px; color: var(--color-accent); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; }
.profile-bio p { margin: 0 0 10px; font-size: 14.5px; }
.profile-bio p:last-child { margin-bottom: 0; }

/* Uitgelichte profieltegel (bv. de hoofdleraar): breed, foto naast tekst */
.block-profile-featured {
    flex-basis: 100%; flex-direction: row; background: linear-gradient(135deg, var(--color-bg), #fff);
    border: 2px solid var(--color-primary);
}
.block-profile-featured .profile-photo { flex: 0 0 260px; aspect-ratio: auto; }
.block-profile-featured .profile-body { flex: 1; align-self: center; padding: 24px 30px; }
.block-profile-featured .profile-name { font-size: 23px; }
@media (max-width: 700px) {
    .block-profile-featured { flex-direction: column; }
    .block-profile-featured .profile-photo { aspect-ratio: 4 / 3; }
}

/* Sidebar */
.sidebar-widget { background: var(--color-surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sidebar-widget h2 { font-size: 16px; margin-top: 0; color: var(--color-primary-dark); }
.sidebar-thumbs { display: grid; gap: 10px; }
.sidebar-thumbs figure { margin: 0; }
.sidebar-thumbs img { width: 100%; border-radius: 12px; transition: transform 0.25s ease; }
.sidebar-thumbs a:hover img { transform: scale(1.03); }
.sidebar-thumbs figcaption { font-size: 13px; margin-top: 4px; color: var(--color-text-muted); }

/* Forms */
.trial-form { background: var(--color-bg); border-radius: var(--radius); padding: 24px; }
.form-group { margin-bottom: 16px !important; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-radio { display: flex; gap: 24px; }
.form-check { font-weight: 700; }
.form-control {
    width: 100%; padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 12px; font-size: 15px;
    background: #fff; transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(15,155,142,0.18); }
.btn-primary {
    background: var(--color-accent); border: none; color: #fff; padding: 13px 28px;
    border-radius: 999px; font-weight: 800; cursor: pointer; font-size: 15px; box-shadow: var(--shadow);
    transition: transform 0.2s ease, background 0.2s ease;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.alert-danger { background: #ffe3dd; border: 1px solid var(--color-accent); color: #9a2a1a; padding: 14px 18px; border-radius: 12px; margin-bottom: 0; }

/* Footer */
.site-footer { margin-top: 40px; padding: 30px 0; background: var(--color-secondary); color: #cfe6e2; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; align-items: center; text-align: center; }
.footer-partner img { max-width: 130px; border-radius: 10px; }
.footer-info p { margin: 4px 0; }
.footer-copyright { color: #9dbdb7; font-size: 13px; }

@media (max-width: 900px) {
    .page-grid.layout-standard { grid-template-columns: 1fr; }
    .nav-toggle { display: flex; }
    .site-nav { width: 100%; justify-content: flex-start; }
    .nav-list {
        max-height: 0; opacity: 0; overflow: hidden; flex-direction: column; width: 100%; background: var(--color-surface);
        border-radius: 12px; padding: 0 10px; margin-top: 10px; transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .nav-list.open { max-height: 600px; opacity: 1; padding: 10px; }
    .nav-submenu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding-left: 14px; }
    .nav-item.has-children.open .nav-submenu { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .content { padding: 20px; }
    .site-carousel img { height: 220px; }
    .block-image-grid { grid-template-columns: repeat(2, 1fr); }
    .brand-logo { width: 64px; height: 64px; }
}
