/* CSS Variables */
:root {
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    height: 100%;
}

body {
    font-family: "Overpass", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 12pt;
    line-height: 2em;
    display: flex; 
    flex-direction: column;
    overflow-x: hidden;
}

p {
	margin-bottom: 10px;
}

.item p {
    margin-bottom: auto;
}

p:last-child {
	margin-bottom: auto;
}

b,
strong {
    color: #333;
}

i,
em {
    color: #333;
}

* > i { color: inherit; }

ul, li {
    list-style: none;
    list-style-position: inside;
}

/* Link styling */
a {
    text-decoration: none;
    color: #000;
}

a:hover {
    color: #3a536e;
}

/* Styling for input and textarea elements */
input,
textarea,
select {
    padding: 8px;
    border: 1px solid #ccc;
    background-color: #fff;
    width: 100%;
    font-family: inherit;
    resize: none;
}

textarea {
    min-height: 100px;
}

/* Button styling */
button {
    padding: 8px 16px;
    border: 1px solid #888;
    background-color: #555;
    color: #fff;
    cursor: pointer;
    text-align: center;
    display: block;
    width: 100%;
}

button:hover {
    background-color: #444;
}

/* LAYOUT CSS STARTS HERE */

#main {
    max-width: var(--container-width);
    margin: 0 auto;

    /* Makes sure the footer is always at the bottom */
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.full-width .container {
    width: var(--container-width);
    margin: 0 auto;
}

#header {
    position: relative;
    background: url('../images/header.png');
    background-size: cover;
    background-position: center;
    height: 600px;
    overflow: hidden;

    /* To center the logo vertically */
    display: flex;
    align-items: center;
}

#fireflies {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

#logo {
    line-height: 40px;
    text-align: center;
}

.container:has(#logo) {
    display: flex;
    justify-content: flex-end;
    width: var(--container-width);
    margin: 0 auto;
    padding-right: 100px;
}

#logo .sitename {
    font-family: "Nanum Pen Script", cursive;
    font-weight: 400;
    font-size: 7em;
    font-style: normal;
    text-shadow: 0 3px 0 #B3907C;
}

#logo .slogan {
    text-transform: uppercase;
    font-size: 13pt;
    text-shadow: 0 -1px 3px #B3907C;
}

#topbar {
    line-height: 20px;
}

#topmenu {
    background: #03121E;
    justify-content: center;
}

#topmenu i {
    color: inherit;
    padding-right: 30px;
}

/* Styles for top-level titles and links */
#topmenu .title,
#topmenu > a {
	display: block;
	cursor: pointer;
	color: #fff;
	padding: 15px;
    text-align: center;
}

/* Styles for dropdown link items */
#topmenu .links a {
	display: block;
	border-bottom: 1px solid rgba(255,255,255, 0.1);
	background: #0A0E15;
	color: #fff;
	padding: 15px;
}

/* Hover effect for dropdown items */
#topmenu .links a:hover {
	background: #111722;
}

/* Subcategory title styling */
#topmenu .sub > .title {
	border-bottom: 1px solid rgba(255,255,255, 0.1);
	background: #0A0E15;
    text-align: left;
}

/* Hover effect for titles */
#topmenu .category:hover > .title,
#topmenu .title:hover,
#topmenu > a:hover {
	background: #141b29;
	color: #fff;
}

/* Minimum width for non-subcategory titles */
#topmenu .title:not(.sub > .title)  {
	min-width: 190px;
}

#content {
    background: #f7f7f7;
    padding: 20px 10px;
    flex: 1;
}

h1 {
    display: flex;
    align-items: center;
    text-align: center;
    font-size: 25pt;
    color: #333;
    margin: 15px 0;
    font-family: "Indie Flower", cursive;
    font-weight: 700;
    font-style: normal;
    text-shadow: 0em 0em 0.3em rgba(0, 0, 0, 0.4);
}

h1:first-child {
    margin-top: 0;
}

h1::before,
h1::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #0A0E15;
}

h1::before {
    margin-right: 10px;
}

h1::after {
    margin-left: 10px;
}

h2 {
    text-align: left;
    font-size: 20pt;
    color: #333;
    font-family: "Indie Flower", cursive;
    font-weight: 700;
    font-style: normal;
    text-shadow: 0em 0em 0.3em rgba(0, 0, 0, 0.4);
}

h3 {
    font-family: "ABeeZee", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 12pt;
    text-shadow: 0em 0em 0.3em rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    margin-bottom: 10px;
}

h1 span,
h2 span,
h3 span {
    font-family: "ABeeZee", sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 12pt;
    display: block;
    margin-top: -10px;
    color: #647496;
}

#footer {
    background: #fff;
    padding: 15px 0;
}

#footer .column {
    flex: 1 1 300px; 
}

#footer .column a {
    color: #000;
    display: block;
}

#footer .column a:last-child {
    margin: 0;
}

#footer .copyright {
    font-size: 8pt;
    font-style: italic;
    text-transform: uppercase;
}

.full-width {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
}

/* Utility flex container */
.flex {
    display: flex;
    gap: 10px;
}

.boxes {
    display: grid;
    gap: 30px;
    grid-auto-flow: dense;
}

.cols-1 { grid-template-columns: repeat(1, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }
.cols-7 { grid-template-columns: repeat(7, 1fr); }
.cols-8 { grid-template-columns: repeat(8, 1fr); }
.cols-9 { grid-template-columns: repeat(9, 1fr); }
.cols-10 { grid-template-columns: repeat(10, 1fr); }

/* Span over multiple columns */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }

.row-span-1 { grid-row: span 1; }
.row-span-2 { grid-row: span 2; }
.row-span-3 { grid-row: span 3; }
.row-span-4 { grid-row: span 4; }
.row-span-5 { grid-row: span 5; }
.row-span-6 { grid-row: span 6; }
.row-span-7 { grid-row: span 7; }
.row-span-8 { grid-row: span 8; }
.row-span-9 { grid-row: span 9; }
.row-span-10 { grid-row: span 10; }

.boxes .icon {
    position: absolute;
    top: -33px;
    padding: 15px;
    font-size: 18pt;
    background: #fff;
    z-index: 0;
}

.boxes .item div {
    position: relative;
}

.boxes .item .links {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.boxes .item {
    position: relative;
    background: #fff;
    box-shadow: 0px 5px 5px rgba(0,0,0, 0.05);
    padding: 25px;
    z-index: 0;
}

.boxes .item img {
    max-width: 100%;
    display: block;
}

.boxes .item p {
    line-height: 1.7em;
}

.boxes .item.with-image {
    padding: 0px;
}

.boxes .item.with-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.boxes .item.with-image div {
    padding: 25px;
}

.boxes .item.transparent {
    background: transparent;
    box-shadow: none;
}

.boxes .item:has(.icon) {
    margin-top: 35px;
}

/* Shrink vertically to its content */
.boxes .item.shrink-height {
    align-self: start;
}

/* Forces full height for textarea */
.boxes .item.full-height-textarea {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.boxes .item.full-height-textarea textarea {
    flex: 1;
}

.icon.circle {
    border-radius: 50%;
}

.icon.rounded-tlr {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.icon.hexagon {
    aspect-ratio: cos(30deg);
    clip-path: polygon(-50% 50%,50% 100%,150% 50%,50% 0);
}

.icon.hexagon-alt {
    aspect-ratio: 1/cos(30deg);
    clip-path: polygon(50% -50%,100% 50%,50% 150%,0 50%);
}

.rounded {
    border-radius: 10px;
}

.centered {
    margin: 0 auto;
    width: max-content;
}

.smaller {
    width: 85%;
}

.small {
    width: 50%;
}

.form-layout {
    width: 100%;
    margin: 0 auto;
}

.form-group label,
label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.form-layout input[type="text"],
.form-layout input[type="password"],
.form-layout input[type="email"],
.form-layout input[type="tel"],
.form-layout input[type="url"],
.form-layout input[type="number"],
.form-layout input[type="date"],
.form-layout input[type="submit"],
.form-layout select {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
}

.form-layout .form-group {
    margin-bottom: 5px;
    flex: 1;
}

.latest-additions img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.message {
    background: #eee;
    padding: 10px;
}

.message.error {
    color: #9e4040;
}

.message.success {
    color: #489e40;
}

.styled_link {
    background: #eee;
    padding: 5px 10px;
    display: inline-block;
}

.image_gallery {
    --width: 200px;
    --height: 200px;
    --spacing: 10px;
    --max-width: 1fr;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--width), var(--max-width)));
    grid-auto-rows: var(--height);
    grid-gap: var(--spacing);
}

.image_gallery .image,
.image_gallery .image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.affiliates_overview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.affiliates_overview a {
    display: inline-block;
    padding: 10px;
    background: #fff;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05);
    line-height: 0; 
}

.affiliates_overview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

.aspect-ratio {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Ensure parent is positioned relative if it contains .overlay */
:has(> .overlay) {
  position: relative;
}

/* Overlay */
.overlay {
    width: 100%;
    height: 100%;
    position: absolute !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 200, 200, 0.2);
    backdrop-filter: blur(20px);
    top: 0;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* prevents blocking mouse clicks to underlying elements */
    z-index: 2;
}

/* Show overlay when parent is hovered */
:has(> .overlay):hover .overlay {
    opacity: 1;
}

/* Checkerboard pattern for transparent images */
.checkerboard {
    position: relative;
    background:
        linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
        linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-repeat: repeat;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.responsive-table thead {
    background-color: #f0f0f0;
    font-weight: bold;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 15px;
    border: 1px solid #ccc;
    vertical-align: middle;
    text-align: left;
    word-wrap: break-word;
}

.responsive-table tbody tr:hover {
    background-color: #fafafa;
}

.tox .tox-edit-area {
    padding: 10px;
}

/* Responsive CSS (phones and tablets) */
@media (max-width: 768px) {
    #topmenu {
        font-size: 10pt;
        box-shadow: 0 -30px 30px -10px rgba(0, 0, 0, 0.5);
    }

    label.topmenuToggle {
        border-radius: 20px;
        background: rgba(0,0,0, 0.3);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255, 0.1);
        color: #fff;
        padding: 10px;
        text-transform: uppercase;
        font-size: 9pt;
        margin: 10px;
    }

    #topmenu .title {
        text-transform: uppercase;
        color: rgba(255,255,255, 0.5);
        font-size: 9pt;
    }

    #topmenu .title,
    #topmenu > a {
        display: block;
        cursor: pointer;
        padding: 10px;
        font-weight: bold;
        text-align: left;
        background: transparent;
    }

    #topmenu .links a {
        padding: 10px;
        background: transparent;
    }

    #topmenu .sub > .title {
        text-align: center;
        border: 0;
        background: #141b29;
        border-radius: 20px;
        width: max-content;
        color: #fff;
        margin: 0 auto;
        font-size: 9pt;
        text-transform: uppercase;
        padding: 10px 20px;
    }

    .home span {
        display: none;
    }

    .home {
        display: inline-block;
        width: max-content;
        margin: 0 auto;
    }

    #topmenu .home i {
        padding-right: 0;
    }

    .container:has(#logo) {
        display: flex;
        justify-content: center;
        width: 100vw;
        padding: 0;
    }

    #logo {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
        width: 100vw;
        padding: 50px 0;
    }

    #logo .sitename {
        font-size: 5em;
    }

    #logo .slogan {
        font-size: 10pt;
    }

    .full-width {
        position: static;
        left: 0;
        right: 0;
        margin: 0;
    }

    #main, 
    .container,
    .full-width,
    .full-width .container {
        width: 100%;
    }

    #header {
        align-items: end;
        height: 400px;
    }

    #content {
        padding: 15px;
    }

    #footer {
        padding: 15px;
    }

    .boxes {
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    /* Reset row and column spans */
    .boxes [class*="row-span-"],
    .boxes [class*="col-span-"] {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .flex {
        flex-direction: column;
    }

    .smaller,
    .small {
        width: 100%;
    }

    img {
        max-width: 100%;
    }

    .responsive-table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }

    .responsive-table thead {
        display: none; 
    }

    .responsive-table tr {
        margin-bottom: 1.5em;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 10px;
        background-color: #fff;
    }

    .responsive-table td {
        border: none;
        padding: 10px;
        text-align: right;
        position: relative;
        border-bottom: 1px solid #eee;
    }

    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 10px;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }
}