@import url("https://cdn.web-fonts.ge/fonts/bpg-arial/css/bpg-arial.min.css");
@import url("https://cdn.web-fonts.ge/fonts/bpg-nino-mtavruli/css/bpg-nino-mtavruli.min.css");

@font-face {
    font-family: "GMWA Header";
    src: url("../fonts/bpg_nino_mtavruli_normal.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --container: 1200px;
    --bg: #ffffff;
    --text: #1b1f24;
    --muted: #6b7280;
    /* Archived-like palette */
    --primary: #1E2D47; /* dark navy header */
    --topbar: #263859;  /* slightly darker top bar */
    --accent: #e10063;  /* pink CTA */
    --primary-contrast: #ffffff;
    --border: #e6e6e6;
    --surface: #d7fcff;

    --font-heading: "GMWA Header", "BPG Nino Mtavruli", sans-serif;

    /* Bootstrap theme alignment */
    --bs-primary: var(--primary);
    --bs-primary-rgb: 30, 45, 71;
    --bs-link-color: var(--primary);
    --bs-link-hover-color: #182237;

    --bs-body-bg: var(--surface);
    --bs-body-color: var(--text);
    --bs-body-font-family: "BPG Arial", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--bs-body-font-family);
    line-height: 1.5;
    background: var(--surface);
    color: var(--text);
}

/* Sticky footer layout (footer at bottom on short pages) */
.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

html,
body {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5,
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .dropdown-item {
    font-family: var(--font-heading);
}

a { color: inherit; }

/* WYSIWYG content helpers (pages + posts) */
.page .content img {
    max-width: 100%;
    height: auto;
}

/* Newspaper-style image/text layouts */
.page .content::after {
    content: "";
    display: block;
    clear: both;
}

.page .content img.content-img-left {
    float: left !important;
    max-width: min(46%, 520px);
    margin: 0 18px 12px 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.page .content img.content-img-right {
    float: right !important;
    max-width: min(46%, 520px);
    margin: 0 0 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.page .content img.content-img-center {
    display: block;
    float: none !important;
    margin: 0 auto 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.page .content img.content-img-full {
    display: block;
    float: none !important;
    width: 100%;
    margin: 0 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.page .content figure.image {
    margin: 0 0 12px;
}

.page .content figure.image img {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.page .content figure.image figcaption {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 6px;
}

.page .content figure.content-figure-left {
    float: left !important;
    max-width: min(46%, 520px);
    margin: 0 18px 12px 0;
}

.page .content figure.content-figure-right {
    float: right !important;
    max-width: min(46%, 520px);
    margin: 0 0 12px 18px;
}

.page .content figure.content-figure-center {
    float: none !important;
    margin: 0 auto 12px;
    max-width: min(80%, 840px);
}

.page .content figure.content-figure-full {
    float: none !important;
    margin: 0 0 12px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .page .content img.content-img-left,
    .page .content img.content-img-right,
    .page .content figure.content-figure-left,
    .page .content figure.content-figure-right {
        float: none;
        max-width: 100%;
        margin: 0 0 12px;
    }
}

/* News post gallery */
.post-gallery .carousel-item.active,
.post-gallery .carousel-item-next,
.post-gallery .carousel-item-prev {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-gallery-img {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f4f4f4;
}

/* Modal gallery image sizing */
.gallery-modal-img {
    height: min(70vh, 680px);
}

.post-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

/* Thumbnail strip as a real carousel (auto-scroll + mouse drag in JS) */
.post-gallery-thumbs[data-thumbs-carousel="1"] {
    --thumbs-per-row: 9;
    --thumb-gap: 8px;
    gap: var(--thumb-gap);
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    cursor: grab;
}

.post-gallery-thumbs[data-thumbs-carousel="1"].is-dragging {
    cursor: grabbing;
}

.post-gallery-thumbs[data-thumbs-carousel="1"] .post-gallery-thumb {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: calc((100% - (var(--thumbs-per-row) - 1) * var(--thumb-gap)) / var(--thumbs-per-row));
}

.post-gallery-thumbs[data-thumbs-carousel="1"] .post-gallery-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}

@media (max-width: 1200px) {
    .post-gallery-thumbs[data-thumbs-carousel="1"] { --thumbs-per-row: 7; }
}

@media (max-width: 992px) {
    .post-gallery-thumbs[data-thumbs-carousel="1"] { --thumbs-per-row: 5; }
}

@media (max-width: 576px) {
    .post-gallery-thumbs[data-thumbs-carousel="1"] { --thumbs-per-row: 3; }
}

.post-gallery-thumb {
    border: 2px solid transparent;
    padding: 0;
    background: transparent;
    border-radius: 10px;
    flex: 0 0 auto;
    text-decoration: none;
    display: block;
}

.post-gallery-thumb img {
    width: 130px;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

/* Page slider thumbs: full-width row on desktop, 3-per-row on mobile */
.page-slider-thumbs {
    overflow: hidden;
    flex-wrap: nowrap;
}

.page-slider-thumbs .post-gallery-thumb {
    flex: 1 1 0;
    width: auto;
}

.page-slider-thumbs .post-gallery-thumb img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .page-slider-thumbs {
        overflow: visible;
        flex-wrap: wrap;
    }

    .page-slider-thumbs .post-gallery-thumb {
        flex: 0 0 calc((100% - 2 * var(--thumb-gap, 8px)) / 3);
        width: calc((100% - 2 * var(--thumb-gap, 8px)) / 3);
    }

    .page-slider-thumbs .post-gallery-thumb img {
        height: 110px;
    }
}

.post-gallery-thumb.active,
.post-gallery-thumb:focus-visible {
    border-color: var(--accent);
    outline: none;
}

/* Page gallery grid widget */
.page-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0 0 18px;
}

.page-gallery-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
    aspect-ratio: 16 / 9;
}

.page-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1);
    transition: transform 220ms ease;
}

.page-gallery-item:hover img,
.page-gallery-item:focus-visible img {
    transform: scale(1.05);
}

/* PDF viewer widget */
.page-pdf-iframe {
    width: 100%;
    height: min(90vh, 980px);
    min-height: 720px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bs-body-bg);
}

@media (max-width: 576px) {
    .page-pdf-iframe {
        min-height: 520px;
    }
}

@media (max-width: 900px) {
    .page-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .page-gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .post-gallery-img {
        height: 240px;
    }
    .post-gallery-thumb img {
        width: 90px;
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

.topbar {
    padding: 12px 0px 12px 0px;
    background: var(--topbar);
    border-bottom: 0;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-flag {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.95;
}

.topbar-flag:hover {
    opacity: 1;
}

.topbar-link {
    text-decoration: none;
    color: #ffffff;
}

.topbar-link:hover {
    text-decoration: underline;
}

.topbar-sep {
    color: rgba(255, 255, 255, 0.7);
    padding: 0 6px;
}

.btn-join {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #c40056;
    --bs-btn-hover-border-color: #c40056;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #b5004f;
    --bs-btn-active-border-color: #b5004f;
}

.site-header {
    background: #ffffff;
}

.navbar {
    min-height: 106px;
}

.brand { text-decoration: none; }

.brand-logo {
    display: block;
    height: 56px;
    width: auto;
    background: transparent;
    padding: 0;
    border: 0;
}

/* Navbar typography (from Elementor global typography 529fd87) */
.navbar .navbar-nav .nav-link,
.navbar .dropdown-item {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    font-style: normal;
    text-decoration: none;
    letter-spacing: 1.3px;
    line-height: normal;
}

@media (max-width: 1024px) {
    .navbar .navbar-nav .nav-link,
    .navbar .dropdown-item {
        font-size: 12px;
        line-height: 1.2em;
        letter-spacing: 0.7px;
    }
}

@media (min-width: 992px) {
    .navbar .navbar-nav {
        gap: 27px;
    }

    .navbar .navbar-nav .nav-link {
        padding-top: 0;
        padding-bottom: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

.navbar[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #E7E7E7;
}

.navbar[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
.navbar[data-bs-theme="dark"] .navbar-nav .nav-link:focus {
    color: #D08DA9;
}

.navbar[data-bs-theme="dark"] .navbar-nav .nav-link.active,
.navbar[data-bs-theme="dark"] .navbar-nav .nav-link[aria-current="page"] {
    color: #CE4F85;
}

.navbar .dropdown-menu {
    --bs-dropdown-bg: #263859;
    --bs-dropdown-link-color: #ffffff;
    --bs-dropdown-link-hover-color: #ffffff;
    --bs-dropdown-link-hover-bg: #CD1060;
    --bs-dropdown-link-active-color: #ffffff;
    --bs-dropdown-link-active-bg: #CD1060;
    width: 300px;
    min-width: 300px;
    padding: 0;
    border-radius: 0;
    border: 0;
}

.navbar .dropdown-item {
    white-space: normal;
    padding: 15px 10px;
}

@media (min-width: 992px) {
    /* Keep dropdown open while moving cursor (no flicker) */
    .navbar .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        margin-top: 11px;
        transition:
            opacity 140ms ease 250ms,
            visibility 0s linear 390ms;
    }

    .navbar .dropdown:hover > .dropdown-menu,
    .navbar .dropdown:focus-within > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition:
            opacity 140ms ease 0s,
            visibility 0s linear 0s;
    }

    .navbar .dropdown-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -11px;
        height: 11px;
        background: transparent;
    }
}

.full-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    max-width: 100vw;
}

/* Homepage full-width bands (match archived Elementor colors) */
.home-band {
    padding: 2em 0;
}

.home-band-inner {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.home-title {
    margin: 0 0 10px;
    font-size: 20px;
    color: var(--primary);
    text-align: center;
}

.home-title-left {
    text-align: left;
}

.home-text {
    margin: 0;
    line-height: 1.7;
    color: var(--muted);
}

.home-lead {
    margin: 0 0 16px;
    font-weight: 800;
    font-size: 24px;
    line-height: 1.3;
    color: var(--primary);
}

.home-actions {
    display: flex;
    justify-content: center;
}

.home-link-muted {
    color: #999999;
    text-decoration: none;
}

.home-link-accent {
    color: #3366ff;
    text-decoration: underline;
}

.home-about {
    background-color: #0D3F70;
    padding: 2em 0 0;
}

.home-about .home-title,
.home-about .home-text {
    color: #ffffff;
}

.home-divider {
    border-top: 1px solid #ffffff;
    margin-top: 15px;
    padding-bottom: 15px;
}

.home-activities {
    background-color: #6799C8;
}

.home-subtitle {
    margin: 0 0 10px;
    font-size: 18px;
    color: #15174C;
    text-align: left;
}

.home-banner {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: contain;
}

.home-banner-small {
    width: auto;
    max-width: 250px;
}

.home-banner-wide {
    width: 100%;
}

.home-membership {
    background: transparent;
}

.home-culture-banner {
    display: block;
    width: 100%;
    max-width: 852px;
    height: auto;
    margin: 10px auto 0;
}

.home-projects {
    background-color: #666666;
    margin-top: 1em;
    margin-bottom: 0;
    padding: 3em 0;
}

.home-projects .home-title {
    color: #ffffff;
    font-size: 18px;
    text-align: center;
}

.home-projects .home-actions {
    margin-top: 14px;
}

.btn-projects {
    background-color: #CD1060;
    border: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    padding: 25px 30px;
}

.btn-projects:hover,
.btn-projects:focus {
    background-color: #263859;
    color: #ffffff;
}

.home-culture {
    background-color: #6799C8;
    margin: 0;
}

.home-culture .home-title {
    color: #000000;
    font-size: 18px;
    text-align: center;
}

.hero {
    position: relative;
    margin-top: 0;
    background: var(--surface);
}

.hero-slider {
    width: 100%;
    max-width: none;
    margin: 0;
    background: #000;
}

.hero-slider .carousel-item {
    position: relative;
}

.hero-slider .carousel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(36, 50, 75, 0.55);
    z-index: 1;
}

/* suppress default overlay when slide has its own custom overlay div */
.hero-slider .carousel-item.has-custom-overlay::before {
    display: none;
}

.hero-slider .carousel-item .slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.hero-slider .carousel-caption {
    z-index: 2;
    left: 0;
    right: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 16px;
    max-width: var(--container);
    margin: 0 auto;
}

.hero-caption {
    max-width: 520px;
    color: #ffffff;
}

.hero-kicker {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.hero-headline {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.is-hidden { display: none; }

.home-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 18px 0;
}

.home-box,
.home-panel,
.home-news {
    border: 1px solid var(--border);
    background: #ffffff;
    padding: 16px;
}

.home-box h2,
.home-panel h2,
.home-news h2 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 18px;
}

.home-box p,
.home-panel p {
    margin: 0 0 10px;
    color: var(--muted);
}

.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 0 18px;
}

.home-news {
    margin-bottom: 18px;
}

.home-news-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.home-news-list {
    display: grid;
    gap: 12px;
}

.news-item {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.news-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.news-title {
    margin: 0 0 6px;
    font-size: 16px;
}

.news-title a {
    color: var(--primary);
    text-decoration: none;
}

.news-title a:hover {
    text-decoration: underline;
}

.news-excerpt {
    margin: 0;
    color: var(--muted);
}

/* Wayback-like homepage sections */
.section-box {
    max-width: var(--container);
    margin: 18px auto;
    padding: 16px;
    border: 1px solid var(--border);
    background: #ffffff;
}

.hero + .section-box {
    margin-top: 0;
}

.section-title {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 20px;
    text-align: center;
}

.section-subtitle {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.section-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0 0;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.section-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 10px auto 0;
}

.section-actions {
    display: flex;
    justify-content: center;
}

.muted-link {
    color: var(--muted);
    text-decoration: underline;
}

.accent-link {
    color: var(--primary);
    text-decoration: underline;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0 10px;
}

/* Homepage news band: avoid plain white box look */
.home-band.home-news {
    border: 0;
    background: transparent;
    padding: 2em 0;
}

.news-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-thumb {
    display: block;
    text-decoration: none;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1);
    transition: transform 220ms ease;
}

.news-card:hover .news-thumb img,
.news-card:focus-within .news-thumb img {
    transform: scale(1.06);
}

.news-card-title {
    margin: 0;
    padding: 10px 12px 6px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.news-card-title a {
    color: var(--primary);
    text-decoration: none;
}

.news-card-title a:hover {
    text-decoration: underline;
}

.news-card-meta {
    margin: 0;
    padding: 0 12px 8px;
    font-size: 12px;
    color: var(--muted);
}

.news-card-excerpt {
    margin: 0;
    padding: 0 12px 12px;
    color: var(--muted);
    line-height: 1.5;
}

/* /news listing page layout */
.news-page .news-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .news-page .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .news-page .news-grid { grid-template-columns: 1fr; }
}


.posts {
    display: grid;
    gap: 14px;
}

.post-card {
    border: 1px solid var(--border);
    padding: 14px;
}

.post-title {
    margin: 0 0 6px;
}

.post-title a {
    text-decoration: none;
    color: var(--primary);
}

.post-excerpt {
    margin: 0;
    color: var(--muted);
}

.meta { color: var(--muted); }

.site-footer {
    margin-top: 30px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    background: #1E2D47;
    border-top: 0;
    color: #ffffff;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-social {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-social a {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .home-boxes { grid-template-columns: 1fr; }
    .home-split { grid-template-columns: 1fr; }
    .hero-slider .carousel-item img { height: 320px; }
    .hero-caption { max-width: 100%; }
    .hero-headline { font-size: 20px; }
    .two-col { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}
