/* Google Fonts loaded via <link> in each HTML <head> for better performance */

/* ── Cookie consent banner ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: var(--primary-color-transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transform: translateY(100%);
    transition: transform 0.35s ease;
    font-size: 0.8rem;
    color: var(--footer-text-color);
}

#cookie-banner.visible {
    transform: translateY(0);
}

#cookie-banner p {
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

#cookie-accept-btn {
    background: var(--secondary-color);
    color: var(--background-color);
    border: none;
    padding: 8px 20px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

#cookie-accept-btn:hover {
    background: #9bb0ff;
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 20px;
    }
}

/* ── Scroll-to-top button ── */
#scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 28px;
    z-index: 900;
    width: 42px;
    height: 42px;
    background: var(--primary-color-transparent);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-top-btn:hover {
    background: rgba(124, 151, 255, 0.12);
}

/* ── Skip-to-content ── */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 9999;
    background: var(--secondary-color);
    color: var(--background-color);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 16px;
}

/* ── Keyboard focus styles ── */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ── FOUC prevention: reserve space before JS injects header/footer ── */
#header-placeholder:empty {
    height: 75px; /* matches body top padding so page doesn't jump */
}

#footer-placeholder:empty {
    min-height: 240px;
}

/* Dark mode only - these are the default styles */
:root {
    --primary-color-transparent: rgba(16, 17, 26, 0.96);
    --primary-color: #10111a;
    --secondary-color: #7c97ff;
    --background-color: #0d0d10;
    --text-color: #eef0f6;
    --hover-bg-color: rgba(124, 151, 255, 0.1);
    --hover-text-color: #7c97ff;
    --menu-bg-color: rgba(14, 14, 22, 0.98);
    --border-color: rgba(124, 151, 255, 0.2);
    --overlay-color: #0d0d10;
    --ituro-color: #D56828;
    --footer-text-color: #A9A9A9;
    --page-icon-color: rgb(247, 231, 51);
    --header-text-color: #eef0f6;
    --header-border-color: transparent;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* .dark-mode class no longer needed - dark is the only mode */

/* Genel sayfa stili */
body {
    font-family: 'Poppins', 'Segoe UI', 'Arial', sans-serif;
    margin: 0;
    padding: 65px 0 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 0.8rem;
}

main {
    flex: 1;
}

/* Sayfa arka planı */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-color);
    z-index: -1;
    pointer-events: none;
}

/* Header stili */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 20px;
    background-color: var(--primary-color-transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 60px;
    position: fixed;
    top: 15px;
    left: 80px;
    right: 80px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--header-border-color);
    box-sizing: border-box;
}

/* Scrolled state - full width header */
.header.scrolled {
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--glass-shadow);
    border: none;
    border-bottom: 2px solid var(--header-border-color);
}

/* Header logo stili */
.header-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* İTÜRO logo separator - always visible */
.logo-separator,
.ituro-header-logo-link {
    display: flex;
    align-items: center;
}

.logo-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    font-weight: 300;
    user-select: none;
}

.ituro-header-logo {
    height: 36px;
    filter: brightness(0) invert(1);
}

/* Make logos white for dark mode */
.header-logo {
    filter: brightness(0) invert(1);
}

.header-logo:hover {
    filter: brightness(0) invert(1) brightness(1.1);
}

/* Desktop menu always visible */
.desktop-menu {
    display: none;
    /* Hidden on mobile, shown via media query */
}

/* Submenu dropdown */
.submenu {
    position: fixed;
    background-color: var(--menu-bg-color);
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.submenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.submenu a:last-child {
    border-bottom: none;
}

.submenu a:hover {
    background-color: var(--hover-bg-color);
    color: var(--hover-text-color);
}

/* Hamburger — hidden by default, shown only at ≤600px */
.hamburger {
    display: none;
}

.submenu a {
    padding: 10px;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.submenu a:last-child {
    border-bottom: none;
}

.submenu a:hover {
    background-color: var(--hover-bg-color);
    color: var(--hover-text-color);
    border-bottom-color: var(--hover-text-color);
}

/* Header ikonları stili */
.header-icons {
    display: flex;
    align-items: center;
}

.header-icon {
    cursor: pointer;
    font-size: 20px;
    color: var(--header-text-color);
    margin-left: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

/* Header right buttons container */
.header-right-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* ITURO button in header */
.ituro-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    background-color: var(--ituro-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-left: 3px solid #ff8c42;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.03em;
}

.ituro-link:hover {
    background-color: #c45c1e;
    box-shadow: 4px 0 0 0 #ff8c42 inset;
}

/* Hide register button by default (main OTOKON site) */
.header-register-btn {
    display: none;
}

/* Hamburger button base style */
.hamburger {
    background: none;
    border: none;
    border-left: 2px solid transparent;
    color: var(--header-text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 12px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    line-height: 1;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

.hamburger.open {
    background: rgba(124, 151, 255, 0.1);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

/* Active nav link indicator */
.desktop-menu a.active {
    color: var(--secondary-color);
    background-color: var(--hover-bg-color);
    border-radius: 8px;
}

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: var(--primary-color-transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    flex-direction: column;
    padding-top: 70px; /* push links below the header */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
    max-height: calc(100svh - 62px);
    overflow-y: auto;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    color: var(--header-text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--hover-bg-color);
    color: var(--secondary-color);
}

.mobile-nav-ituro {
    color: var(--ituro-color) !important;
    font-weight: 600 !important;
}

.mobile-nav-ituro:hover {
    color: var(--ituro-color) !important;
    background: rgba(213, 104, 40, 0.1) !important;
}

/* Footer İTÜRO logo */
.footer-ituro-link {
    display: inline-block;
    margin: 4px 0 18px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-ituro-link:hover {
    opacity: 1;
}

.footer-ituro-logo-img {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background-color: var(--primary-color-transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: var(--glass-border);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    color: var(--header-text-color);
    box-sizing: border-box;
    width: 100%;
}

.footer-inner {
    display: flex;
    gap: 60px;
    padding: 50px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Brand column */
.footer-brand {
    flex: 1.5;
    min-width: 0;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-logo-img {
    height: 36px;
    filter: brightness(0) invert(1);
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--header-text-color);
    letter-spacing: 0.5px;
}

.footer-tagline {
    color: var(--footer-text-color);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

/* Social icons */
.footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1rem;
    color: var(--footer-text-color);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.footer-social:hover {
    transform: translateY(-3px);
    color: var(--secondary-color);
    background: rgba(124, 151, 255, 0.12);
    border-color: rgba(124, 151, 255, 0.35);
}

/* Links columns */
.footer-links-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-col-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.footer-links-col a {
    color: var(--footer-text-color);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links-col a:hover {
    color: var(--header-text-color);
    transform: translateX(4px);
}

/* Bottom copyright bar */
.footer-bottom {
    border-top: var(--glass-border);
    padding: 16px 80px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom span {
    font-size: 0.78rem;
    color: var(--footer-text-color);
    opacity: 0.65;
}

#otokon_svg_a {
    display: flex;
    justify-content: center;
    align-items: center;
}



/* Mobil cihazlar için medya sorgusu */
@media (max-width: 899px) {
    body {
        background-image: none;
    }

    body::before {
        background: var(--background-color);
    }

    .header {
        height: 60px;
        padding: 10px 15px;
        top: 10px;
        left: 40px;
        right: 40px;
    }

    .header.scrolled {
        top: 0;
        left: 0;
        right: 0;
    }

    .header-logo {
        height: 35px;
        margin: 0 auto;
    }

    .menu {
        top: 70px;
        /* Below floating header on tablet */
        left: 40px;
        height: calc(100vh - 70px);
        width: 260px;
    }

    .menu.scrolled {
        top: 60px;
        left: 0;
        height: calc(100vh - 60px);
    }

    .menu a {
        font-size: 1rem;
        padding: 18px 20px;
    }

    /* Mobile submenu parent link */
    .menu .has-submenu-mobile {
        position: relative;
    }

    .menu .has-submenu-mobile i {
        transition: transform 0.2s ease;
    }

    .menu .has-submenu-mobile.active i {
        transform: rotate(180deg);
    }

    /* Mobile submenu - slide down instead of side */
    .menu .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background: rgba(0, 0, 0, 0.15);
        padding: 0;
        display: none;
        border-bottom: 1px solid var(--border-color);
    }

    .menu .submenu.active {
        display: block;
    }

    .menu .submenu a {
        padding: 14px 20px 14px 35px;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .menu .submenu a:last-child {
        border-bottom: none;
    }

    /* Footer collapses to single column on tablet/mobile */
    .footer-inner {
        flex-direction: column;
        gap: 32px;
        padding: 40px 32px;
        align-items: flex-start;
    }

    .footer-bottom {
        padding: 14px 32px;
    }
}

/* ITURO link style - legacy, can be removed later */

/* Desktop menu styles - now always visible */
.desktop-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 5px;
}

.desktop-menu a {
    color: var(--header-text-color);
    text-decoration: none;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.desktop-menu a:hover {
    color: var(--hover-text-color);
    background-color: var(--hover-bg-color);
}

.desktop-menu .has-submenu {
    cursor: pointer;
}

.desktop-menu .has-submenu i {
    margin-left: 5px;
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.desktop-menu .has-submenu.active i {
    transform: rotate(180deg);
}

.desktop-menu a.ituro-link {
    background-color: var(--ituro-color);
    color: #fff;
    padding: 8px 16px;
}

.desktop-menu a.ituro-link:hover {
    background-color: #c45c1e;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 899px) {
    .desktop-menu {
        gap: 2px;
    }

    .desktop-menu a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .desktop-menu {
        display: none;
    }

    .header {
        justify-content: space-between;
    }

    /* Hide secondary İTÜRO logo + divider on phones — clean up left side */
    .logo-separator,
    .ituro-header-logo-link {
        display: none;
    }

    /* Show hamburger + mobile nav only on phones */
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav {
        display: flex;
    }

    /* Tighten header right area on phones */
    .ituro-link {
        display: none;
    }
}

@media (min-width: 900px) {
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 70px;
    }

    .header-logos {
        flex-shrink: 0;
    }

    .desktop-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .desktop-menu a {
        color: var(--header-text-color);
        text-decoration: none;
        padding: 20px 20px;
        margin: 0 10px;
        font-size: 1.1em;
        transition: background-color 0.3s ease, color 0.3s ease;
        border-bottom: 2px solid transparent;
    }

    .desktop-menu a:hover {
        background-color: var(--hover-bg-color);
        color: var(--hover-text-color);
        border-bottom-color: transparent;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }

    .desktop-menu .has-submenu {
        position: relative;
    }

    .desktop-menu .has-submenu i {
        margin-left: 5px;
        transition: transform 0.3s ease;
    }

    .desktop-menu .has-submenu.active i {
        transform: rotate(180deg);
    }

    /* ITURO link style for desktop */
    .desktop-menu a.ituro-link {
        background-color: var(--ituro-color);
        color: var(--header-text-color);
        padding: 10px 15px;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

    .desktop-menu a.ituro-link:hover {
        background-color: var(--secondary-color);
        color: var(--header-text-color);
        transform: scale(1.05);
    }

    .hamburger {
        display: none;
    }

    .menu {
        display: none;
    }

    .header-icons {
        margin-left: auto;
    }

}

/* Submenu styles for desktop */
@media (min-width: 900px) {
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 5px 5px;
        width: 200px;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        border: 1px solid var(--secondary-color);
        opacity: 0.6;
        border: 1px solid var(--secondary-color);
    }

    .submenu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .submenu a {
        color: var(--header-text-color);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .submenu a:hover {
        background-color: var(--hover-bg-color);
        color: var(--hover-text-color);
    }
}

/* Adjust header for desktop view */
@media (min-width: 900px) {
    .header {
        justify-content: flex-start;
    }

    .header-icons {
        margin-left: auto;
    }
}

/* Mobile header adjustments */
@media (max-width: 600px) {
    .header {
        height: 54px;
        padding: 8px 12px;
        top: 8px;
        left: 20px;
        right: 20px;
    }

    .header.scrolled {
        top: 0;
        left: 0;
        right: 0;
    }

    .header-logo {
        height: 36px;
    }

    .header-icons .header-icon {
        margin-left: 10px;
        font-size: 18px;
    }

    .menu {
        top: 62px;
        /* Below floating header on mobile */
        left: 20px;
        height: calc(100vh - 62px);
        width: 240px;
    }

    .menu.scrolled {
        top: 54px;
        left: 0;
        height: calc(100vh - 54px);
    }

    .menu a {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    /* Reduce top body padding to match the smaller header */
    body {
        padding: 54px 0 0;
    }

    /* Footer — centered single column on phones */
    .footer-inner {
        padding: 36px 20px;
        align-items: center;
        text-align: center;
    }

    .footer-logo-link {
        justify-content: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-links-col {
        align-items: center;
        width: 100%;
    }

    .footer-links-col a:hover {
        transform: none;
    }

    .footer-bottom {
        padding: 14px 20px;
    }
}