/* ==========================================================================
   mariusdesign.ca — site styles
   Loaded after theme.css. Contains:
     1. Accent colour (set from the database through --default-color)
     2. Page grid (replaces the page-builder section/column wrappers)
     3. Portfolio galleries
     4. Site-specific adjustments carried over from the old "Additional CSS"
     5. Image viewer (lightbox)
   ========================================================================== */

/* 1. Accent colour -------------------------------------------------------- */
:root { --default-color: #FFFE54; }

.theme-btn { background: var(--default-color); border: 2px solid var(--default-color); }
.theme-btn:hover { color: var(--default-color); }
.icon-menu:hover { border-color: var(--default-color); }
.icon-menu:hover span { background: var(--default-color); }
.dmenu li a.active,
.dmenu li a:hover,
.dmenu li .scroll-to.active,
.dmenu li .scroll-to:hover { color: var(--default-color); }
.section-header h1 span,
.hero-section .hero-content h1 span,
.hero-section .hero-content .facts h1 { color: var(--default-color); }
.left-sidebar .social-profile li a:hover { color: var(--default-color); border-color: var(--default-color); }
.resume-area .resume-content .resume-timeline .item:hover::before { background: var(--default-color); }
.resume-area .resume-content .resume-timeline .item:hover .date { color: var(--default-color); }
.skills .skill:hover .skill-inner { border-color: var(--default-color); }
.skills .skill .skill-inner h1 { color: var(--default-color); }
.testimonial-item .testimonial-item-inner .author p span { color: var(--default-color); }
.testimonial-area .testimonial-slider-wrap .testimonial-footer-nav .testimonial-nav button:hover {
    border-color: var(--default-color);
    color: var(--default-color);
}

/* 2. Page grid ------------------------------------------------------------ */
.site-grid {
    display: flex;
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
}
.site-grid__side { width: 33.333%; min-height: 1px; }
.site-grid__main {
    width: 66.666%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.site-grid__main > * { width: 100%; }
.site-grid__main > .block { margin-bottom: 20px; }
.site-grid__main > .block:last-child { margin-bottom: 0; }
.site-grid img { height: auto; max-width: 100%; border: none; box-shadow: none; }

@media (max-width: 1024px) { .site-grid { max-width: 1024px; } }
@media (max-width: 767px) {
    .site-grid { flex-wrap: wrap; max-width: 767px; }
    .site-grid__side,
    .site-grid__main { width: 100%; }
}

.block--testimonial { padding-top: 70px; }
.block--contact { padding-top: 90px; }
.block--contact-details { padding: 0 0 300px 15px; }

/* 3. Portfolio ------------------------------------------------------------ */
.portfolio-intro .portfolio-area { padding-bottom: 0 !important; }

.pf-row { display: flex; position: relative; }
.pf-col {
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}
.pf-row--half > .pf-col { width: 50%; }
.pf-col > * { margin-bottom: 20px; }
.pf-col > *:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
    .pf-row { flex-wrap: wrap; }
    .pf-row--half > .pf-col { width: 100%; }
}

.pf-heading {
    color: #fff;
    margin: 0;
    padding: 0;
    font-weight: 400;
    line-height: 1;
}
.pf-row--first > .pf-col { padding-top: 0; padding-bottom: 20px; }
.pf-row--first .pf-heading { margin-left: -2px; }

/* A gallery shows its first picture; the rest open in the image viewer. */
.pf-gallery { height: 420px; overflow: hidden; }
.pf-gallery__item { display: block; margin: 0; padding: 0 0 15px; text-align: center; }
.pf-gallery__item a { display: block; cursor: zoom-in; }
.pf-gallery .pf-gallery__item img {
    display: block;
    width: 100%;
    height: 410px;
    object-fit: cover;
    border-radius: 30px;
    overflow: hidden;
}

.pf-caption { margin-top: -20px; }
.pf-caption p { margin: 0 0 16px; }
.pf-caption--name p { color: #a3a3a3; }
.pf-col > .pf-caption + .pf-caption { margin-top: -20px; }

/* Pill button laid over the lower-left corner of a gallery. */
.pf-button {
    position: absolute;
    left: 25px;
    top: 355px;
    margin: 0 !important;
    display: inline-block;
    background: #fff;
    color: #000;
    font-size: 14px;
    line-height: 1;
    padding: 12px 15px;
    border-radius: 20px;
    text-align: center;
    transition: all .3s;
}
.pf-button:hover,
.pf-button:focus { background: #000; color: #fff; }

@media (min-width: 768px) {
    /* same width limit the button had in its old column, so it wraps at the same point */
    .pf-button { max-width: calc((100% - 15px) * 0.23064 - 20px); }
}
@media (max-width: 767px) {
    .pf-button { font-size: 10px; padding: 10px 8px; white-space: nowrap; }
}

/* 4. Site-specific adjustments -------------------------------------------- */
.about-area { padding-bottom: 0 !important; }
.about-text .about-area { padding-top: 0; }
.left-sidebar h2 { font-size: 18px; }
.testimonial-area { margin-bottom: 70px; }
.contact-area p { width: 100%; float: left; }
.customtext p { font-size: 20px; color: #fff; }
.customtext p span { color: var(--default-color); }

/* 5. Image viewer ---------------------------------------------------------- */
.lb[hidden] { display: none; }
.lb {
    --lb-ui: hsla(0, 0%, 93%, .9);
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .8);
    color: var(--lb-ui);
    user-select: none;
    opacity: 0;
    transition: opacity .3s ease;
}
.lb.is-open { opacity: 1; }
.lb__header {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 14px 15px 20px;
    font-size: 20px;
    line-height: 1;
    z-index: 10;
    transition: background-color .3s;
}
.lb__counter { font-size: .75em; }
.lb__tools { display: flex; align-items: center; }
.lb__btn,
.lb__nav {
    background: none;
    border: 0;
    color: var(--lb-ui);
    cursor: pointer;
    line-height: 1;
    transition: all .3s;
}
.lb__btn { font-size: 24px; margin: 0 .25em; padding: .15em; }
.lb__btn:hover,
.lb__nav:hover { color: #fff; }
.lb__btn:focus-visible,
.lb__nav:focus-visible { outline: 1px solid var(--lb-ui); }
.lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 25px;
    padding: 10px;
    background-color: rgba(0, 0, 0, .5);
}
.lb__nav--prev { left: 6%; }
.lb__nav--next { right: 6%; }
.lb__nav[hidden] { display: none; }
.lb__stage {
    position: absolute;
    top: 70px; bottom: 70px; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}
.lb__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .3), 0 0 8px -5px rgba(0, 0, 0, .3);
    opacity: 0;
    transition: opacity .25s ease, transform .3s ease;
    cursor: zoom-in;
}
.lb__img.is-loaded { opacity: 1; }
.lb.is-zoomed .lb__img { transform: scale(2); cursor: zoom-out; }
.lb.is-zoomed .lb__header,
.lb.is-zoomed .lb__footer { background-color: rgba(0, 0, 0, .5); }
.lb.is-zoomed .lb__nav { opacity: 0; pointer-events: none; }
.lb__footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 15px 20px;
    text-align: center;
    z-index: 5;
    transition: background-color .3s;
}
.lb__title { font-size: 16px; font-weight: 700; }
body.lb-open { overflow: hidden; }

@media (max-width: 767px) {
    .lb__nav--prev { left: 0; }
    .lb__nav--next { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lb, .lb__img { transition: none; }
}

/* 6. Not-found page -------------------------------------------------------- */
.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; text-align: center; }
.not-found h1 { font-size: 110px; font-weight: 300; line-height: 1; color: var(--default-color); }
.not-found .theme-btn { width: auto; }
