/*
 * Inner pages (layouts/inner.blade.php): page banner, content card, legacy content
 * typography, PDF viewer, directors, contact, gallery, 404.
 * Site colours: dark blue #00354e, gold #f2b705.
 */

/* ---------- Buttons (same as home page) ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 4px; border: 0;
    font: bold 13px/1.2 Arial, Helvetica, sans-serif; letter-spacing: .4px; text-transform: uppercase;
    text-decoration: none; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn--blue { background: #00354e; color: #fff; }
.btn--blue:hover { background: #004e72; color: #fff; box-shadow: 0 6px 18px rgba(0, 53, 78, .3); transform: translateY(-1px); }
.btn--outline { border: 2px solid #00354e; color: #00354e; padding: 8px 18px; background: #fff; }
.btn--outline:hover { background: #00354e; color: #fff; }

/* ---------- Page banner ---------- */
.page-hero {
    position: relative;
    clear: both;
    width: 950px;
    height: 190px;
    overflow: hidden;
    background: #00354e;
}
.page-hero__bg {
    position: absolute; inset: -10px;
    background-size: cover; background-position: center 40%;
    animation: hero-pan 18s ease-in-out infinite alternate;
}
.page-hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0, 37, 55, .94) 0%, rgba(0, 53, 78, .82) 45%, rgba(0, 53, 78, .35) 100%);
}
.page-hero__inner {
    position: relative; z-index: 1;
    height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 45px;
    font-family: Arial, Helvetica, sans-serif;
}
.page-hero__title {
    margin: 8px 0 0;
    max-width: 820px;
    color: #fff;
    font-size: 30px; line-height: 1.2; font-weight: bold;
    animation: rise .7s .1s ease both;
}
.page-hero__title::after {
    content: ""; display: block; width: 46px; height: 3px; margin-top: 14px; background: #f2b705;
    animation: grow .7s .4s ease both;
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #9fbdd0; font-size: 13px; animation: rise .6s ease both; }
.crumbs a { color: #f2b705; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs__sep { color: #6f93ab; }
.crumbs [aria-current] { color: #d9e6ef; }

@keyframes hero-pan { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.1) translateX(-12px); } }
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes grow { from { width: 0; } to { width: 46px; } }

/* ---------- Content card ---------- */
.text_container.page {
    width: 950px; height: auto; float: none; clear: both;
    margin: 0; padding: 0;
    background: #fff;
    box-sizing: border-box;
}
.text_container.page > .container.page-content {
    width: auto; height: auto; float: none; margin: 0;
    padding: 38px 28px 46px;          /* 950 - 2 x 28 = 894px: the content width of the legacy pages */
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.75;
    color: #3b4f5e;
    animation: rise .6s .15s ease both;
    overflow: hidden;              /* contain floated legacy content */
}

/* legacy content: readable text */
/* legacy pages place boxes side by side with inline widths/floats (e.g. text 600px + picture 275px):
   keep those on desktop; boxes without a width fill the line. responsive.css stacks them on small screens. */
.page-content .bottom {
    height: auto !important;
    padding: 0; overflow: visible;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px; line-height: 1.75; color: #3b4f5e;
}
.page-content .bottom:not([style*="width"]) { width: auto; float: none; }
.page-content p { margin: 0 0 14px; }
.page-content a { color: #005b86; }
.page-content a:hover { color: #c48f00; }
.page-content .btn--blue, .page-content .btn--blue:hover { color: #fff; }        /* buttons keep their own colours */
.page-content .btn--outline { color: #00354e; }
.page-content .btn--outline:hover { color: #fff; }
.page-content strong, .page-content b { color: #1f3442; }
.page-content h1, .page-content h2, .page-content h3, .page-content h4 { color: #00354e; line-height: 1.3; margin: 22px 0 10px; }
.page-content ul, .page-content ol { margin: 0 0 14px 22px; }
.page-content li { margin-bottom: 4px; }
.page-content img { max-width: 100%; height: auto; border-radius: 6px; }
.page-content hr { border: 0; border-top: 1px solid #e3e9ee; margin: 24px 0; }

/* legacy section title bars inside a page -> clean section headings */
.page-content .top {
    width: auto !important; height: auto; float: none;
    margin: 28px 0 18px; padding: 0 0 10px;
    position: relative;
    background: none;
    border-bottom: 1px solid #e3e9ee;
    color: #00354e;
    font: bold 18px/1.35 Arial, Helvetica, sans-serif;
    text-transform: none;
}
.page-content .top::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 46px; height: 3px; background: #f2b705; }
.page-content > .page-type > .top:first-child { margin-top: 0; }

/* tables */
.page-content table {
    border-collapse: collapse;
    max-width: 100%;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    background: #fff;
}
.page-content table td, .page-content table th { border: 1px solid #dfe7ed; padding: 7px 10px; vertical-align: top; }
.page-content table th, .page-content table tr:first-child td[bgcolor], .page-content table thead td { background: #eef4f8; color: #00354e; }
.page-content table tr:nth-child(even) td { background-color: #fafcfd; }
.page-content table tr:hover td { background-color: #fff8e1; }

/* intro text */
.page-intro { margin: 0 0 22px; color: #5a6d7b; font-size: 15px; }
.page-text { margin-bottom: 26px; }

/* list pages: no extra top padding (title is in the banner) */
.page-content .doc-list { width: auto; padding-top: 0; }

/* ---------- PDF viewer ---------- */
.doc-viewer { border: 1px solid #e3e9ee; border-radius: 8px; overflow: hidden; background: #f5f8fa; }
.doc-viewer__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 18px; background: #fff; border-bottom: 1px solid #e3e9ee;
}
.doc-viewer__file { display: flex; align-items: center; gap: 14px; min-width: 0; }
.doc-viewer__icon {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 54px; border-radius: 4px 12px 4px 4px;
    background: #c62828; color: #fff; font: bold 12px Arial, sans-serif; letter-spacing: .5px;
}
.doc-viewer__name { display: block; color: #00354e; font-weight: bold; font-size: 15px; line-height: 1.35; }
.doc-viewer__meta { display: block; color: #6b7f8e; font-size: 12px; }
.doc-viewer__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-viewer__frame { display: block; width: 100%; height: 820px; border: 0; background: #525659; }
.doc-viewer__missing { margin: 0; padding: 40px; text-align: center; color: #6b7f8e; }

/* ---------- Board of Directors ---------- */
.person { text-align: center; }
.person__photo { overflow: hidden; border-radius: 8px; background: #eef4f8; }
.person__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; border-radius: 0; transition: transform .5s ease; }
.person:hover .person__photo img { transform: scale(1.05); }
.person__name { margin: 14px 0 4px; color: #00354e; font-size: 16px; line-height: 1.35; }
.person__role { display: inline-block; color: #c48f00; font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.person__note { margin: 6px 0 0; color: #6b7f8e; font-size: 12px; line-height: 1.5; }

.person--featured {
    display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center;
    margin-bottom: 34px; padding: 22px; text-align: left;
    border-radius: 10px; background: linear-gradient(135deg, #00354e, #00577f); color: #fff;
    box-shadow: 0 14px 34px rgba(0, 37, 55, .2);
}
.person--featured .person__photo { height: 250px; border: 4px solid rgba(255, 255, 255, .15); }
.person--featured .person__name { margin: 8px 0; color: #fff; font-size: 24px; }
.person--featured .person__role { color: #f2b705; font-size: 13px; }
.person--featured .person__note { color: #cfe0ec; font-size: 14px; }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 22px; }
.people .person { padding: 14px 14px 18px; border: 1px solid #e3e9ee; border-radius: 10px; background: #fff; transition: transform .25s, box-shadow .25s; }
.people .person:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0, 37, 55, .13); }
.people .person__photo { height: 230px; }

/* ---------- Contact ---------- */
.contact-page { display: grid; grid-template-columns: 330px 1fr; gap: 28px; align-items: start; }
.contact-info {
    padding: 28px 26px; border-radius: 10px;
    background: linear-gradient(160deg, #00354e, #00577f); color: #d4e3ee;
    box-shadow: 0 14px 30px rgba(0, 37, 55, .18);
}
.page-content .contact-info__title { margin: 0 0 8px; color: #fff; font-size: 21px; }
.contact-info__lead { margin: 0 0 20px; font-size: 13px; color: #b7cddc; }
.contact-info__address { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 13px; line-height: 1.7; }
.contact-info__address b, .contact-info__address strong { color: #f2b705; }
.contact-info__quick { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.contact-info__quick a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: bold; word-break: break-word; }
.contact-info__quick a svg { flex: 0 0 auto; color: #f2b705; }
.contact-info__quick a:hover { color: #f2b705; }

.contact-form { padding: 26px 28px; border: 1px solid #e3e9ee; border-radius: 10px; background: #fff; }
.contact-form__title { margin: 0 0 18px; color: #00354e; font-size: 21px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; color: #00354e; font-size: 13px; font-weight: bold; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1px solid #cfdbe4; border-radius: 5px;
    background: #fbfdfe; color: #22323d; font: 14px Arial, Helvetica, sans-serif;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: #00577f; background: #fff; box-shadow: 0 0 0 3px rgba(0, 87, 127, .15);
}
.contact-form .warning { display: none; margin-top: 5px; color: #c62828; font-size: 12px; }   /* shown by assets/js/js.js */
.form-alert { display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 5px; font-size: 14px; }
.form-alert--error { background: #fdecea; color: #b71c1c; border: 1px solid #f5c6c2; }
.form-alert--success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c3e6c5; }
.captcha { display: flex; align-items: center; gap: 10px; }
.captcha input { max-width: 120px; letter-spacing: 3px; font-weight: bold; }
.captcha img { height: 34px; width: auto; border-radius: 4px; border: 1px solid #cfdbe4; }
.captcha__refresh { width: 34px; height: 34px; border: 1px solid #cfdbe4; border-radius: 4px; background: #fff; color: #00354e; font-size: 18px; cursor: pointer; }
.captcha__refresh:hover { background: #eef4f8; }
.form-row--captcha { align-items: end; }
.form-field--submit { text-align: right; }
#ajax_loader { display: none; margin: 0 0 8px; }

/* ---------- Production process timeline: 4 x 4 "snake" flow with arrows (page body: database/seeders/data/production-process.html) ----------
   Row 1 left->right, arrow down, row 2 right->left, arrow down, row 3 left->right, arrow down, row 4 right->left
   (same flow as the original flowchart). Steps keep their natural order in the HTML; CSS places them. */
.page-content .process__intro { margin: 0 auto 38px; max-width: 640px; text-align: center; color: #5a6d7b; font-size: 15px; }
.process-flow {
    --slot: .7s; --start: 2.6s;
    list-style: none; margin: 0 !important; padding: 10px 0 0;
    display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 70px;
}
.process-step {
    --cycle: calc(var(--slot) * 16); --at: calc(var(--start) + var(--d, 0) * var(--slot));
    position: relative; margin: 0 !important; padding: 0 6px; text-align: center; list-style: none;
}
/* snake placement (tablet/desktop only) */
@media (min-width: 601px) {
.process-step:nth-child(-n + 4) { grid-row: 1; }
.process-step:nth-child(n + 5):nth-child(-n + 8) { grid-row: 2; }
.process-step:nth-child(n + 9):nth-child(-n + 12) { grid-row: 3; }
.process-step:nth-child(n + 13) { grid-row: 4; }
.process-step:nth-child(5), .process-step:nth-child(13) { grid-column: 4; }
.process-step:nth-child(6), .process-step:nth-child(14) { grid-column: 3; }
.process-step:nth-child(7), .process-step:nth-child(15) { grid-column: 2; }
.process-step:nth-child(8), .process-step:nth-child(16) { grid-column: 1; }
}

/* round icon badge */
.process-step__icon {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 80px; height: 80px; margin: 0 auto;
    border: 2px solid #d3dfe8; border-radius: 50%;
    background: #fff; color: #00354e;
    box-shadow: 0 6px 16px rgba(0, 37, 55, .08);
    transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.process-step__icon svg { width: 34px; height: 34px; }
.process-step__num {
    position: absolute; z-index: 3; top: -6px; left: 50%; margin-left: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; box-sizing: border-box;
    background: #f2b705; color: #00354e; font: bold 11px Arial, sans-serif;
    box-shadow: 0 0 0 3px #fff;
}
.page-content .process-step__title { margin: 14px 0 0; padding: 0; border: 0; color: #00354e; font-size: 14px; font-weight: bold; line-height: 1.35; }
.process-step--final .process-step__icon { background: #f2b705; border-color: #f2b705; color: #00354e; }
.process-step--final .process-step__num { background: #00354e; color: #f2b705; }

/* ----- arrows: each step points to the next one ----- */
.process-step::after {
    content: ""; position: absolute; z-index: 1; pointer-events: none;
    top: 32px; left: calc(50% + 52px); width: calc(100% - 104px); height: 16px;
    background-color: #c7d4de;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 7h84V0l16 10-16 10v-7H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 7h84V0l16 10-16 10v-7H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    animation: process-arrow var(--cycle) linear infinite; animation-delay: calc(var(--at) + var(--slot) * .45);
}
@media (min-width: 601px) {
/* left-pointing (rows 2 and 4) */
.process-step:nth-child(n + 5):nth-child(-n + 7)::after,
.process-step:nth-child(n + 13):nth-child(-n + 15)::after { left: auto; right: calc(50% + 52px); transform: scaleX(-1); }
/* down at the end of a row (steps 4, 8, 12) */
.process-step:nth-child(4)::after, .process-step:nth-child(8)::after, .process-step:nth-child(12)::after {
    top: auto; bottom: -58px; left: 50%; right: auto; width: 46px; height: 16px;
    transform: translateX(-50%) rotate(90deg);
}
}
.process-step:last-child::after { display: none; }

@keyframes process-arrow {
    0%, 12%, 100% { background-color: #c7d4de; }
    3%, 8% { background-color: #f2b705; }
}

/* ----- one by one: each step lights up in its slot ----- */
.process-step .process-step__icon { animation: process-active var(--cycle) ease-in-out infinite; animation-delay: var(--at); }
@keyframes process-active {
    0%, 9%, 100% { background: #fff; border-color: #d3dfe8; color: #00354e; scale: 1; box-shadow: 0 6px 16px rgba(0, 37, 55, .08); }
    2%, 6% { background: #00354e; border-color: #00354e; color: #f2b705; scale: 1.12; box-shadow: 0 0 0 6px rgba(242, 183, 5, .28), 0 12px 24px rgba(0, 37, 55, .22); }
}
.process-step--final .process-step__icon { animation-name: process-active-final; }
@keyframes process-active-final {
    0%, 9%, 100% { background: #f2b705; border-color: #f2b705; color: #00354e; scale: 1; }
    2%, 6% { background: #00354e; border-color: #00354e; color: #f2b705; scale: 1.14; box-shadow: 0 0 0 8px rgba(242, 183, 5, .35); }
}
.process-step:hover .process-step__icon {
    animation: none; background: #00354e; border-color: #00354e; color: #f2b705;
    transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 37, 55, .22);
}

/* entrance: steps appear one by one */
.js .process-step.reveal { translate: none; scale: .6; transition: opacity .45s ease, scale .5s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--d, 0) * 150ms); }
.js .process-step.reveal.is-visible { scale: 1; }

@media (max-width: 600px) {
    /* phones: one column, natural order, arrows down */
    .page-content .process__intro { text-align: left; margin-bottom: 26px; }
    .process-flow { grid-template-columns: 1fr; row-gap: 46px; }
    .process-step:nth-child(n) { grid-row: auto; grid-column: 1; display: flex; align-items: center; gap: 18px; padding: 0; text-align: left; }
    .process-step__icon { flex: 0 0 auto; width: 60px; height: 60px; margin: 0; }
    .process-step__icon svg { width: 27px; height: 27px; }
    .process-step__num { top: -6px; left: 42px; margin-left: 0; min-width: 22px; height: 22px; font-size: 10px; }
    .page-content .process-step__title { margin: 0; }
    .process-step:nth-child(n)::after {
        top: auto; right: auto; bottom: -38px; left: 30px; width: 30px; height: 14px;
        transform: translateX(-50%) rotate(90deg);
    }
    .process-step:last-child::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .process-step::after, .process-step .process-step__icon { animation: none !important; }
    .js .process-step.reveal { scale: 1; transition: none; }
}

/* ---------- Gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-grid__item { position: relative; display: block; height: 190px; overflow: hidden; border-radius: 8px; background: #eef4f8; }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease, filter .5s; }
.photo-grid__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 37, 55, .55)); opacity: 0; transition: opacity .3s; }
.photo-grid__item:hover img { transform: scale(1.08); }
.photo-grid__item:hover::after { opacity: 1; }
.photo-grid__caption { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: #fff; font-size: 13px; font-weight: bold; }
.photo-grid__more { margin: 26px 0 0; text-align: center; }

/* ---------- 404 ---------- */
.not-found { padding: 30px 10px 20px; text-align: center; }
.not-found__code { display: block; color: #00354e; font: bold 96px/1 Arial, Helvetica, sans-serif; letter-spacing: 4px; text-shadow: 6px 6px 0 #f2b705; }
.not-found__title { margin: 22px 0 8px; color: #00354e; font-size: 22px; }
.not-found__text { margin: 0 0 22px; color: #6b7f8e; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .6s ease, translate .6s ease; transition-delay: calc(var(--d, 0) * 100ms); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* footer right after the content */
.text_container.page + .footer .site-footer { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .page-hero { width: 100%; height: 170px; }
    .page-hero__inner { padding: 0 22px; }
    .page-hero__title { font-size: 25px; }
    .text_container.page { width: 100%; }
    .text_container.page > .container.page-content { padding: 26px 18px 30px; }
    .people { grid-template-columns: repeat(2, 1fr); }
    .contact-page { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .doc-viewer__frame { height: 75vh; min-height: 420px; }
}
@media (max-width: 600px) {
    .page-hero { height: 150px; }
    .page-hero__title { font-size: 21px; }
    .crumbs { font-size: 12px; }
    .text_container.page > .container.page-content { padding: 20px 14px 26px; font-size: 14px; }
    .person--featured { grid-template-columns: 1fr; text-align: center; }
    .person--featured .person__photo { height: 260px; max-width: 260px; margin: 0 auto; }
    .people { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-field--submit { text-align: left; }
    .contact-form { padding: 20px 16px; }
    .photo-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .photo-grid__item { height: 130px; }
    .doc-viewer__actions .btn { flex: 1; justify-content: center; }
    .not-found__code { font-size: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    .page-hero__bg, .page-hero__title, .page-hero__title::after, .crumbs, .text_container.page > .container.page-content { animation: none !important; }
    .js .reveal { opacity: 1; translate: none; transition: none; }
}
