@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700;800&display=swap');

/* Basic Styles */
body {
    font-family: 'Google Sans', 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.5s, color 0.5s;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open #main-content {
    /* This rule is now empty, effectively removing the blur */
}

h1, h2, h3 {
    line-height: 1;
}

img {
   -webkit-user-drag: none; /* For older WebKit browsers */
   -khtml-user-drag: none; /* For older Konqueror browsers */
   -moz-user-drag: none;   /* For Firefox */
   -o-user-drag: none;     /* For older Opera versions */
   user-drag: none;       /* Standard property */
   user-select: none;      /* Prevents text selection */
   pointer-events: none;  /* Disables all pointer events (hover, click, etc.) */
 }

/* Light Mode Variables */
:root {
    --background-color: #f8f9fa;
    --text-color: #1a1a1a;
    --navbar-background: rgba(255, 255, 255, 0.95);
    --primary-color: #a1c815;
    --secondary-color: #d4edda30;
    --section-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --background-color: #000000;
/*    --background-color: #121212;*/
    --text-color: #e6e1e5;
    --navbar-background: rgba(0, 0, 0, 0.5);
    --primary-color: #a1c815;
    --secondary-color: #4a6b4e30;
    --section-background: #0a0a0a;
    --shadow-color: rgba(0, 0, 0, 0.25);
}

::selection {
  background: var(--primary-color); /* background color of the selection */
  color: #1a1a1a;      /* text color of the selection */
}

/* Navbar */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1280px;
    background-color: var(--navbar-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInDown 0.5s ease-in-out;
    transition: transform 0.4s ease-in-out;
}

.navbar.navbar--hidden {
    transform: translate(-50%, -150%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
}

.nav-logo img {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

.nav-menu-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 12px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 5px;
    background-color: var(--primary-color);
    transition: transform 0.3s, opacity 0.3s;
}

.icon-button {
    background-color: var(--secondary-color);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s, filter 0.3s;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.icon-button:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px 3px rgb(197 200 21 / 20%);
    background-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .icon-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .icon-button:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

/* Featured Section */
.featured-section {
    margin-top: 3rem;
    padding: 128px 24px 80px; /* Adjusted padding based on golden ratio */
    text-align: center;
    overflow: hidden;
}

.featured-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin: 0 0 24px; /* Adjusted margin */
    line-height: 1.1;
}

.featured-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 48px; /* Adjusted margin */
    color: #6c757d;
}

[data-theme="dark"] .featured-content p {
    color: #adb5bd;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 16px 32px;
    border-radius: 99px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    transition: box-shadow 0.3s, filter 0.3s;
}

[data-theme="dark"] .cta-button {
    color: var(--background-color);
}

.cta-button:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px 3px rgb(197 200 21 / 20%);
}

/* Pinned News Section */
.pinned-news-section {
    padding: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    display: grid;
    place-content: center;
}

.news-card {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 16 / 9;
  box-shadow: 0 4px 16px var(--shadow-color);
}

.news-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.news-text {
  flex: 1 1 60%;
  min-width: 200px;
  text-align: left;
  max-width: 30ch;
}

.news-text h3 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.news-text p {
  margin: 0;
  font-size: 1rem;
  color: #eaeaea;
}

.news-overlay .cta-button {
  background-color: var(--primary-color);
  color: var(--background-color);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 24px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease, filter 0.3s, box-shadow 0.3s;
}

.news-overlay .cta-button:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 0 15px 3px rgb(197 200 21 / 20%);
}

@media (max-width: 600px) {
  .news-overlay {
    flex-direction: column;
    align-items: flex-start;
  }
}

.news-content {
    background-color: var(--section-background);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow-color);
    padding: 48px; /* Adjusted padding based on golden ratio */
    max-width: 800px;
    margin: 0 auto;
    background: url(images/news.jpg);
    background-size: cover;
}

.news-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    margin-bottom: 32px;
}

.news-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.news-content p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    color: #6c757d;
}

[data-theme="dark"] .news-content p {
    color: #adb5bd;
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 960px; /* Unified max-width for both carousels */
    margin: 1rem auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    cursor: grab;
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-item {
    flex: 0 0 100%; /* Each item takes the full container width */
    box-sizing: border-box;
/*    padding: 0 1rem; /* Spacing between container edges */*/
}

.news-card, .service-card {
    position: relative;
    background-color: var(--section-background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 8 / 5;
    width: 100%;
}

.carousel-controls {
    text-align: center;
    margin-top: 1rem;
}

.carousel-button {
    background-color: var(--section-background);
    color: var(--primary-color);
    border: 1px solid var(--shadow-color);
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease, filter 0.3s;
    margin: 0 0.5rem;
}

.carousel-button .material-icons {
    font-size: 2.5rem;
}

.carousel-button:hover {
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .carousel-container {
/*        top: 80px;*/
    }
}

/* Sections */
.about-section, .services-section, .centers-section, .community-section {
    padding: 2rem; /* Adjusted padding based on golden ratio */
    max-width: 70ch;
    margin: 0 auto;
    display: grid;
    place-content: center;
}

.about-section h2, .services-section h2, .centers-section h2, .community-section h2 {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem; /* Adjusted margin */
}

.about-section p {
    max-width: 70ch;
    text-align: center;
}

/* Service Cards */
.service-card .news-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Center Cards */
.center-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem; /* Adjusted gap based on golden ratio */
    grid-auto-rows: minmax(min-content, max-content);
    margin-top: 2rem;
    align-items: center;
}

.center-card {
    background-color: var(--section-background);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: box-shadow 0.4s, transform 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/*.center-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px var(--shadow-color);
}*/

.center-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.center-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.center-info h3 {
/*    margin: 0 0 16px;*/
    font-size: 1.5rem;
    font-weight: 700;
}

.center-info p {
    font-size: 1rem;
}

.pass-rates {
    display: flex;
    gap: 1rem;
    overflow-x: scroll;
    margin: 16px 0;
}

.pass-rates span {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    align-content: center;
    justify-content: space-around;
}

.pass-rates span.high {
    background-color: #e6ffe6; /* Light green */
    color: #008000; /* Dark green */
}

.pass-rates span.moderate {
    background-color: #fffacd; /* Light yellow */
    color: #daa520; /* Goldenrod */
}

.pass-rates span.low {
    background-color: #ffe6e6; /* Light red */
    color: #cc0000; /* Dark red */
}

[data-theme="dark"] .pass-rates span {
    color: #e6e1e5;
}

[data-theme="dark"] .pass-rates span.high {
    background-color: #134d13; /* Darker green */
    color: #90ee90; /* Light green */
}

[data-theme="dark"] .pass-rates span.moderate {
    background-color: #5c4d0f; /* Darker yellow */
    color: #e9c326; /* Gold */
}

[data-theme="dark"] .pass-rates span.low {
    background-color: #800000; /* Darker red */
    color: #ff6347; /* Tomato */
}

/* Community Section */
.community-section {
    text-align: center;
}

.community-links {
    text-align: center;
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.admin-note {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 3rem;
    border-radius: 16px;
    color: #cc0000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    background-color: #cc000020;
}

.community-link {
    display: block;
    align-items: center;
    gap: 1rem;
    padding: 14px 24px;
    border-radius: 1rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap;
    max-width: 5em;
    aspect-ratio: 1;
    img {
        max-width: 90%;
    }
}

.whatsapp {
    background-color: #25d366;
    color: white;
}

.telegram {
    background-color: #0088cc;
    color: white;
}

.community-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.community-card {
  position: relative;
  width: 100%;
  max-width: 390px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 4px 16px var(--shadow-color);
  display: block;
  text-decoration: none;
  aspect-ratio: 8 / 5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.community-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-card:hover {
  /* No hover effect */
}

.overlay-button {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.whatsapp .overlay-button {
  background-color: #25d366;
}

.telegram .overlay-button {
  background-color: #0088cc;
}

.overlay-button:hover {
  background-color: #000;
}

/* Footer */
.footer {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.german-phrase {
    font-style: italic;
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
/*        top: 0;*/
/*        border-radius: 0;*/
/*        width: 100%;*/
    }

    .nav-menu-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1001;
        justify-content: center;
        align-items: flex-start;
        padding-top: 10vh;
        margin-top: 1rem;
    }

    .nav-menu-container.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        background-color: var(--section-background);
        width: 90%;
        max-width: 500px;
        border-radius: 1rem;
        padding: 1rem;
        box-shadow: 0 8px 32px var(--shadow-color);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.5rem;
        font-weight: bold;
        border-radius: 0.5rem;
        transition: background-color 0.2s;
    }

    .nav-link:hover {
        background-color: var(--secondary-color);
        color: var(--primary-color);
    }

    .hamburger {
        display: block;
        z-index: 1002;
        background-color: var(--secondary-color);
        border: none;
        color: var(--primary-color);
        cursor: pointer;
        border-radius: 0.75rem;
        transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s, filter 0.3s;
        box-shadow: 0 2px 4px var(--shadow-color);
    }

    .hamburger.active span {
        background-color: var(--primary-color);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .featured-content h1 {
        font-size: 4rem;
    }

    .featured-content p {
        font-size: 1.125rem;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
    border: 3px solid var(--background-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #82a311;
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
}