:root {
    --navy: #04263b;
    --blue: #0a6c8f;
    --aqua: #2bc0e4;
    --gold: #d4a73a;
    --red: #ce1126;

    --bg: #f6f3ec;
    --bg-alt: #ffffff;
    --card: #ffffff;
    --text: #0d2232;
    --text-light: #55697a;
    --border: #e3ddd0;
    --nav-bg: rgba(255, 255, 255, 0.25);
    --nav-text: #0d2232;

    --font-main: "Inter", sans-serif;
    --font-hand: "Caveat", cursive;

    --size-small: 0.9rem;
    --size-normal: 1rem;
    --size-big: 1.2rem;
    --size-title: clamp(2rem, 4vw, 3rem);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(4, 38, 59, 0.1);
    --section-space: 100px;
}

body.dark {
    --bg: #031a2b;
    --bg-alt: #06233a;
    --card: #0a2c45;
    --text: #e8f3f8;
    --text-light: #9db4c4;
    --border: #123a57;
    --nav-bg: rgba(3, 26, 43, 0.35);
    --nav-text: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: var(--size-normal);
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    transition: background 0.4s, color 0.4s;
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-space) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title span {
    font-family: var(--font-hand);
    font-size: 1.8rem;
    color: var(--gold);
}

.section-title h2 {
    font-size: var(--size-title);
    line-height: 1.2;
}

.section-title p {
    color: var(--text-light);
    margin-top: 10px;
}

.divider {
    height: 12px;
    background:
        linear-gradient(135deg, var(--gold) 25%, transparent 25%) -6px 0 / 12px 12px,
        linear-gradient(225deg, var(--gold) 25%, transparent 25%) -6px 0 / 12px 12px;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    padding: 0 9%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--nav-text);
    z-index: 10;
    transition: background 0.4s, height 0.4s;
}

.nav.scrolled {
    height: 70px;
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav-links a {
    font-size: var(--size-big);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-btn,
.menu-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-btn:hover {
    transform: rotate(30deg);
}

.menu-btn {
    display: none;
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 550px;
    background: url("Hero.jpg") center / cover no-repeat;
    overflow: hidden;
}

.hero-diver {
    position: absolute;
    inset: 0;
    background: url("diver.png") center / cover no-repeat;
    z-index: 2;
    pointer-events: none;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50.5%;
    transform: translate(-50%, -50%);
    font-family: var(--font-hand);
    font-weight: 500;
    font-size: 14vw;
    color: #ffffff;
    white-space: nowrap;
    z-index: 1;
    animation: fadeUp 1.2s ease both;
}

.frame {
    position: absolute;
    top: 22.5%;
    bottom: 15%;
    left: 9%;
    right: 9%;
    z-index: 1;
}

.frame span {
    position: absolute;
    background: #ffffff;
    animation: grow 1.2s ease both;
}

.line-top     { top: 0; left: 2.5%; right: 0; height: 2px; }
.line-left1   { left: 0; top: 0; height: 12%; width: 2px; }
.line-left2   { left: 0; top: 34%; bottom: 0; width: 2px; }
.line-right1  { right: 0; top: 9%; height: 58%; width: 2px; }
.line-right2  { right: 0; top: 77%; bottom: 0; width: 2px; }
.line-bottom1 { bottom: 0; left: 2.5%; width: 24.7%; height: 2px; }
.line-bottom2 { bottom: 0; left: 47.2%; right: 0; height: 2px; }

.scroll-down {
    position: absolute;
    bottom: 3%;
    left: calc(9% + 82% * 0.372);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    font-family: var(--font-hand);
    font-size: 1.6rem;
    z-index: 3;
}

.scroll-down svg {
    width: 34px;
    height: 60px;
    animation: bounce 2s infinite;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 25px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.about-text strong {
    color: var(--text);
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.stat:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
}

.stat h3 {
    font-size: 2.6rem;
    color: var(--blue);
    line-height: 1.1;
}

body.dark .stat h3 {
    color: var(--aqua);
}

.stat p {
    color: var(--text-light);
    font-size: var(--size-small);
}

.mission {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #ffffff;
    text-align: center;
}

.mission .section-title p {
    color: #b9d6e3;
}

.mission-quote {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 1.5;
    position: relative;
}

.mission-quote::before {
    content: "\201C";
    display: block;
    font-family: var(--font-hand);
    font-size: 6rem;
    line-height: 0.5;
    color: var(--gold);
}

.mission-author {
    margin-top: 25px;
    font-family: var(--font-hand);
    font-size: 1.6rem;
    color: var(--gold);
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.goal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.goal::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 5px;
    background: var(--gold);
    transition: width 0.4s;
}

.goal:hover {
    transform: translateY(-10px);
}

.goal:hover::after {
    width: 100%;
}

.goal-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    transition: color 0.3s;
}

.goal:hover .goal-number {
    color: var(--gold);
}

.goal h3 {
    margin: 15px 0 10px;
    font-size: 1.3rem;
}

.goal p {
    color: var(--text-light);
}

.sports {
    background: var(--bg-alt);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.sport-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.sport-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--aqua);
}

.sport-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    background: linear-gradient(135deg, var(--blue), var(--aqua));
    transition: transform 0.4s;
}

.sport-card:hover .sport-icon {
    transform: rotate(-15deg) scale(1.1);
}

.sport-card h3 {
    margin: 20px 0 5px;
    font-size: 1.3rem;
}

.sport-card p {
    color: var(--text-light);
    font-size: var(--size-small);
}

.tag {
    display: inline-block;
    margin-top: 15px;
    margin-right: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--text-light);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 30px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover {
    border-color: var(--blue);
}

.filter-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.team-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    border-top: 5px solid var(--blue);
    animation: cardIn 0.5s ease both;
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.team-card.National   { border-top-color: var(--red); }
.team-card.Youth      { border-top-color: var(--gold); }
.team-card.Club       { border-top-color: var(--blue); }
.team-card.University { border-top-color: var(--aqua); }

.team-type {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
}

.team-card h3 {
    margin: 8px 0;
    font-size: 1.15rem;
    line-height: 1.4;
}

.team-info {
    color: var(--text-light);
    font-size: var(--size-small);
}

.medals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
    color: var(--gold);
}

.gallery {
    background: var(--bg-alt);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item p {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 20px 15px;
    background: linear-gradient(transparent, rgba(4, 38, 59, 0.9));
    color: #ffffff;
    font-family: var(--font-hand);
    font-size: 1.6rem;
    transform: translateY(100%);
    transition: transform 0.4s;
}

.gallery-item:hover p {
    transform: translateY(0);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 15, 25, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius);
    animation: zoomIn 0.3s ease;
}

.footer {
    background: var(--navy);
    color: #b9d6e3;
}

.flag {
    display: flex;
    height: 5px;
}

.flag span {
    flex: 1;
}

.flag span:nth-child(1) { background: var(--red); }
.flag span:nth-child(2) { background: #ffffff; }
.flag span:nth-child(3) { background: #000000; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    padding: 60px 20px;
}

.footer h3 {
    color: #ffffff;
    margin-bottom: 15px;
}

.footer .logo {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer li {
    margin-bottom: 8px;
}

.footer a:hover {
    color: var(--gold);
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--size-small);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s, transform 0.8s;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translate(-50%, -30%); }
}

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

@keyframes grow {
    from { transform: scale(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
}