/* =========================================
   COPELAB — Complete Custom Stylesheet
   Corporate Blue: #005395
   Footer Blue: #142846
   ========================================= */


/* =========================================
   1. FONTS & GLOBAL
   ========================================= */

@font-face {
    font-family: "DuneRise";
    src: url("../fonts/Dune_Rise.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}


/* =========================================
   2. HEADER — WHITE & CLEAN
   ========================================= */

.top-site-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.top-site-header .navbar-section {
    flex: 0 0 auto;
}

.top-site-header .navbar a,
.top-site-header .navbar .btn-link {
    color: #222;
}

.top-site-header .navbar a:hover {
    color: #000;
}

.top-site-header .dropmenu ul li a {
    color: #222;
}

@media (min-width: 768px) {
    .top-site-header .navbar-section.desktop-menu {
        margin-left: auto;
    }

    .top-site-header .navbar-section.mobile-menu-toggle {
        display: none;
    }
}


/* =========================================
   3. HERO — FULLWIDTH IMAGE + OVERLAY
   ========================================= */

.top-hero-section {
    width: 100%;
    margin-top: 30px;
    padding: 0;
    background: #000;
    color: #fff;
}

.top-hero-image {
    position: relative;
    width: 100%;
    min-height: 40vh;
    background-size: cover;
    background-position: center;
}

.top-hero-image.top-hero-half {
    min-height: 20vh !important;
}

.top-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-hero-text {
    text-align: center;
    margin-top: 80px;
    padding: 2rem;
    color: #fff;
    background: transparent;
}

.top-hero-title {
    font-family: "DuneRise", system-ui, sans-serif;
    font-size: 2.7rem;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 1rem;
    color: #fff;
}

.top-hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-top: 0.25rem;
    color: #fff;
    background: transparent;
}


/* =========================================
   4. STANDARD PAGE AREA
   ========================================= */

.top-page-wrapper {
    width: 100%;
    padding: 3rem 0;
}

.top-page-header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem 1rem;
    background: transparent;
}

.top-page-title {
    font-size: 2.4rem;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.top-page-subtitle {
    margin-top: 0.5rem;
    font-size: 1.15rem;
    color: #666;
}


/* =========================================
   5. DEFAULT PAGE CONTENT AREA
   ========================================= */

#page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#body-wrapper {
    padding-top: 0 !important;
    background: linear-gradient(to bottom, #ffffff 0%, #dddddd 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

#body-content {
    min-height: 100vh;
    max-width: 1200px;
    background: #ffffff;
    margin: 0 auto;
    padding: 2rem 1.5rem !important;
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.05),
        0 0 25px rgba(0, 0, 0, 0.06);
}

.top-page-content {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}


/* =========================================
   6. WEBAPP MODE
   ========================================= */

body.layout-webapp {
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
}

body.layout-webapp.header-fixed #header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
}

body.layout-webapp #page-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

body.layout-webapp #header {
    flex: 0 0 auto;
}

.top-webapp-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-height: 0;
}

.top-webapp-root {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    margin: 0;
    padding: 0;
    min-height: 0;
}

.top-webapp-frame {
    padding-top: 80px;
    flex: 1 1 auto;
    width: 100%;
    border: none;
    display: block;
    min-height: 0;
    height: auto;
}

.top-webapp-error {
    padding: 1rem;
    text-align: center;
    color: #c00;
}


/* =========================================
   7. FOOTER — FULLWIDTH DARK BLUE
   ========================================= */

.top-site-footer {
    background: #142846;
    color: #f0f4ff;
    padding: 3rem 0;
    font-size: 0.95rem;
}

.top-site-footer p,
.top-site-footer span,
.top-site-footer li,
.top-site-footer a {
    color: #f0f4ff;
    opacity: 0.92;
}

.top-site-footer a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.footer-title {
    font-family: "DuneRise", system-ui, sans-serif;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: #ffffff !important;
}

.top-footer-bottom-gap {
    margin-bottom: 1.2rem;
}

.top-site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-site-footer li {
    margin: 0.35rem 0;
}


/* =========================================
   8. LISTING CARDS
   ========================================= */

.top-listing-intro {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
    color: #444;
}

.top-listing-wrapper {
    margin-top: 1rem;
}

.top-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.top-listing-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f9f9f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.top-listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.top-listing-card-body {
    padding: 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail support */
.top-listing-thumb-wrapper {
    display: block;
    width: 100%;
    overflow: hidden;
    background: #111;
}

.top-listing-thumb-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.top-listing-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.top-listing-card:hover .top-listing-thumb {
    transform: scale(1.03);
}

.top-listing-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* Card text & meta */
.top-listing-title {
    font-size: 1.3rem;
    margin: 0 0 0.4rem;
}

.top-listing-title a {
    text-decoration: none;
    color: #142846;
}

.top-listing-title a:hover {
    text-decoration: underline;
}

.top-listing-subtitle {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    color: #666;
}

.top-listing-meta {
    font-size: 0.85rem;
    color: #999;
    margin: 0 0 0.7rem;
}

.top-listing-excerpt {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 1rem;
    flex: 1 0 auto;
}

.top-listing-footer {
    text-align: right;
    margin-top: 0.5rem;
}

.top-listing-readmore {
    font-size: 0.9rem;
    text-decoration: none;
    color: #142846;
}

.top-listing-readmore:hover {
    text-decoration: underline;
}

.top-listing-empty {
    text-align: center;
    margin: 3rem 0;
    color: #999;
}


/* =========================================
   9. FIGURES & IMAGES
   ========================================= */

.top-figure img,
.top-figure-grid img {
    max-width: min(100%, 700px);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: block;
    margin: 0 auto;
}

.top-figure {
    text-align: center;
    margin: 2rem auto;
}

.top-figure figcaption {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.6rem;
    font-style: italic;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Figure grid */
.top-figure-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.top-figure-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .top-figure-grid--2col {
        grid-template-columns: 1fr;
    }
}

.top-figure-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .top-figure-grid--3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .top-figure-grid--3col {
        grid-template-columns: 1fr;
    }
}

.top-figure-grid .top-figure {
    margin: 0;
}

.top-figure-grid-caption {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-top: 0.6rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Image placeholder */
.top-figure-placeholder {
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
}


/* =========================================
   10. PROJECT PAGE COMPONENTS
   ========================================= */

/* Results highlight box */
.top-results-highlight {
    background: rgba(0, 83, 149, 0.06);
    border-left: 3px solid #005395;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
}

.top-results-highlight strong {
    color: #005395;
}

/* Publication reference */
.top-publication-ref {
    margin-top: 1.25rem;
    font-size: 0.72rem;
    color: #888;
    line-height: 1.45;
}

.top-publication-ref::before {
    content: "📄 ";
    opacity: 0.6;
}

.top-publication-ref a {
    color: #005395;
    text-decoration: none;
}

.top-publication-ref a:hover {
    text-decoration: underline;
}

.top-publication-ref em {
    color: #666;
}


/* =========================================
   11. TABLES
   ========================================= */

table {
    width: auto;
    max-width: 100%;
    margin: 1.5rem auto;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th,
table td {
    padding: 0.55rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ccc;
}

table tr:hover {
    background: #fafafa;
}

table td strong {
    color: #005395;
}


/* =========================================
   12. PAGE INTRO
   ========================================= */

.top-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #444;
    max-width: 750px;
    margin: 0 auto 2rem;
    text-align: center;
}

.top-intro strong {
    color: #005395;
}


/* =========================================
   13. UTILITY CLASSES
   ========================================= */

.top-text-center {
    text-align: center;
}

hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2.5rem 0;
}

/* Spacing */
.top-mt-1 { margin-top: 0.5rem; }
.top-mt-2 { margin-top: 1rem; }
.top-mt-3 { margin-top: 1.5rem; }
.top-mb-1 { margin-bottom: 0.5rem; }
.top-mb-2 { margin-bottom: 1rem; }
.top-mb-3 { margin-bottom: 1.5rem; }