:root {
    --primary-color: #00BFFF;
    --primary-light: #E0F7FA;
    --text-color: #000000;
    --bg-color: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-dark: #333333;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.9rem;
    color: var(--gray-dark);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
}

main {
    padding: 30px 20px 10px 20px;
    animation: fadeIn 0.5s ease-out;
}

/* Markdown rendered styles */
h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #444;
}

ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

li {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Softer shadow for white bg */
    transition: transform 0.2s, box-shadow 0.2s;
}

li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.15);
}

strong {
    color: var(--text-color);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

footer {
    background-color: var(--gray-light);
    padding: 40px 0;
    text-align: center;
    color: #666;
    margin-top: 50px;
}

.loading {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 50px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .header-container {
        justify-content: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    h1 {
        font-size: 2.2rem;
    }
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-drop-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.lang-drop-btn:hover {
    background-color: var(--primary-light);
}

.arrow {
    font-size: 0.7rem;
    margin-left: 5px;
}

.lang-drop-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid var(--primary-light);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

/* RTL support for dropdown position */
body[dir="rtl"] .lang-drop-content {
    right: auto;
    left: 0;
}

.lang-drop-content.show {
    display: block;
}

.lang-option {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    /* Use flexbox for alignment */
    align-items: center;
    /* Vertically center items */
    gap: 10px;
    /* Space between flag and text */
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.95rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    /* Default LTR alignment */
}

/* RTL alignment */
body[dir="rtl"] .lang-option {
    text-align: right;
}

.lang-option:hover {
    background-color: var(--primary-light);
}

.lang-option.active {
    background-color: var(--primary-light);
    font-weight: 600;
    color: var(--primary-color);
}

.flag-icon {
    font-size: 1.2rem;
    line-height: 1;
    /* Ensure line-height doesn't offset vert-align */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Button */
.cta-button {
    display: block;
    width: fit-content;
    margin: 15px auto;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
    border: none;
    /* Remove default border for button elements */
    cursor: pointer;
    /* Ensure pointer for button elements */
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
    color: white;
    /* Ensure text remains white */
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

/* Gallery */
.gallery-section {
    padding-bottom: 60px;
    margin-top: 50px;
    /* Add spacing between button and gallery */
}

.gallery-title {
    text-align: center;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
}

.gallery-item {
    width: 100%;
    max-width: 300px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 4px solid white;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 191, 255, 0.25);
}

/* Carousel */
.carousel {
    position: relative;
    height: 600px;
    width: 100%;
    margin: 0 auto;
    max-width: 1000px;
    /* Limit width on large screens */
}

.carousel-track-container {
    background: transparent;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 250ms ease-in;
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure images fit without cropping */
    background-color: #f8f9fa;
    /* Light background for transparent/varying aspect ratios */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: -25px;
}

.next-btn {
    right: -25px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.carousel-indicator {
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel {
        height: 400px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

/* Footer links */
.footer-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin-top: 0;
    color: var(--primary-color);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#contact-form input,
#contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #009ACD;
    /* Darker shade */
}

.email-direct {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
    color: #666;
}

.email-direct a {
    color: var(--primary-color);
    text-decoration: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}