/* Common styles for Polish History & Heritage Club website */

@font-face {
    font-family: 'Essays1743';
    src: url('/files/Essays1743.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: url('/files/bg.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 1.5em;
    height: 200px;
    color: #000;
    flex-shrink: 0;
    position: relative;
}

.header-logo {
    width: 100px;
    height: 100px;
    background: url('/files/logo.png') center/contain no-repeat;
    margin-right: 1.5em;
    flex-shrink: 0;
}

.title {
    font-family: 'Essays1743', serif;
}

/* Navigation Container */
.nav-container {
    position: relative;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    background: #333;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    z-index: 1001;
}

.menu-toggle .menu-text {
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
}

.menu-toggle .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
}

.menu-toggle .hamburger span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

nav {
    background-color: #333;
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 1em 1.5em;
    display: block;
    transition: background 0.3s;
    font-weight: bold;
}

nav a:hover,
nav a:focus-visible {
    background-color: #555;
    outline: none;
}

main {
    margin: 0.5em;
}

section {
    padding: 1.5em;
    max-width: 960px;
    margin: 0.75em auto;
    flex-grow: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

section h2.title {
    margin-bottom: 1em;
    color: #222;
    font-family: 'Essays1743', serif;
    text-transform: uppercase;
    font-weight: 700;
}

section h3 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: #333;
    font-size: 1.3em;
}

section p {
    margin: 0;
}

ol,
ul {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

li {
    margin-bottom: 0.5em;
}

/* Gallery Section */
#gallery img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* Contact Section */
.icon {
    display: block;
    line-height: 0;
    border-width: 0px;
}

.icon-rounded,
.icon-rounded img {
    border-radius: 10px;
}

.icon-1 {
    height: 64px;
    width: 64px;
    background-image: none;
}

[class*="border-"],
.link[class*="border-"] {
    border-style: solid;
}

.white,
.body.white,
.container-style.white::before,
.table-alt-white tr:nth-child(2n) {
    color: #111111;
    background-color: #ffffff;
}

.spacing-10.icon,
.spacing-10.search-icon,
.spacing-10.gallery-nav,
.spacing-10.carousel-control {
    padding: 10px;
}

[class*="border-"]:not(.shape-svg) {
    stroke: none;
}

.svg-link {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.svg-content {
    width: 0;
    height: 0;
}

svg:not(:root) {
    overflow: hidden;
}

#contact a {
    text-decoration: none;
}

#contact a:hover,
#contact a:focus,
#contact a:active {
    text-decoration: underline;
}

a.facebook span {
    background-color: #3B5998;
}

a.twitter span {
    background-color: #00ACED;
}

a.facebook svg {
    fill: white;
}

a.twitter svg {
    fill: white;
}

#contact a b {
    font-weight: 700;
    margin-right: 0.2em;
}

.wide {
    max-width: fit-content
}

/* Footer */
footer {
    text-align: center;
    padding: 1em;
    background-color: #eee;
    font-size: 0.9em;
    flex-shrink: 0;
}

#oscr-badge {
    max-height: 80px;
    padding: 0.5em;
}

#template-badge {
    text-align: right;
    font-size: xx-small;
    color: gray;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 1em;
    right: 1em;
    display: flex;
    gap: 0.5em;
    z-index: 1000;
}

.language-switcher a {
    display: block;
    width: 54px;
    height: 38px;
    border: 2px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.language-switcher a:hover {
    transform: scale(1.1);
    border-color: #333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.language-switcher a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Separator */
.section-divider {
    margin: 2em 0;
    border: none;
    border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    .header-logo {
        margin-bottom: 1em;
    }

    .title {
        font-size: 1.4rem;
    }

    /* Show menu toggle button on mobile */
    .menu-toggle {
        display: flex;
    }

    /* Hide nav by default on mobile */
    nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* Show nav when active */
    nav.active {
        display: flex;
    }

    nav a {
        border-bottom: 1px solid #444;
    }

    nav a:last-child {
        border-bottom: none;
    }

    #contact .container-style {
        flex-direction: column;
        gap: 1.5em;
    }

    #contact a.facebook,
    #contact a.twitter {
        max-width: 100%;
        justify-content: center;
    }

    #contact a.facebook span,
    #contact a.twitter span {
        margin-right: 0.5em;
    }

    .language-switcher {
        top: 0.5em;
        right: 0.5em;
    }
}
