/* Component Styles */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8em 2em;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-black);
}

.btn-outline-white {
    border: 1px solid var(--color-white);
    color: var(--color-white);
}

.btn-outline-white:hover {
    background-color: var(--color-white);
    color: var(--color-text);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-white);
    color: var(--color-text);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: transform 0.6s ease, background-color 0.6s ease, border 0.6s ease, box-shadow 0.6s ease;
}

.dropdown-item a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    /* Match nav-link size */
    font-weight: 500;
    /* Match nearness to nav-link */
    color: var(--color-black);
    /* Explicit Black */
    transition: background-color 0.2s, color 0.2s;
    text-transform: none;
    /* Keep text normal for readability in lists */
}

.dropdown-item a:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-accent);
    padding-left: 1.8rem;
    /* Slide effect */
}

/* Home Page: Transparent at Top */

.home .navbar,
.transparent-nav .navbar {
    background-color: transparent !important;
    color: var(--color-white) !important;
    border-bottom: none !important;
    box-shadow: none;
}

.transparent-nav .nav-link {
    color: var(--color-white) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Improved legibility */
}

.transparent-nav .navbar.scrolled .nav-link {
    color: var(--color-black) !important;
    text-shadow: none;
}

.navbar.scrolled {
    background-color: var(--color-white) !important;
    color: var(--color-black) !important;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--color-border);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.navbar-container {
    display: flex;
    /* Desktop: keep logo left, push menu to the far right */
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    padding: 0 40px;
    width: 100%;
    /* Keep navbar full-width so the menu can sit flush to the right edge */
    max-width: none;
    margin: 0 auto;
}

/*
  This element is injected via JS for the mobile overlay menu.
  On desktop it should never be visible (it creates a duplicate logo).
*/
.mobile-menu-logo {
    display: none;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: inherit;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-right: auto;
    margin-left: 0;
    min-width: 250px;
    width: 250px;
    height: var(--header-height);
}

.logo img {
    height: 200px;
    width: auto;
    object-fit: contain;
}

/* Navbar logo - overflow dışarı taşsın */
.navbar .logo {
    overflow: visible;
}

.navbar .logo img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 200px !important;
    max-height: none !important;
    max-width: none !important;
    width: auto !important;
}

/* Footer logo - normal akış içinde */
.footer .logo {
    height: auto;
    margin: 0 0 var(--space-sm) 0;
    min-width: auto;
}

.footer .logo img {
    position: static;
    transform: none;
    height: 350px;
    margin-bottom: var(--space-sm);
    max-width: none !important;
}

.logo span {
    color: var(--color-accent);
}

/*
  JS injects `.mobile-menu-logo` into `.nav-menu` for the mobile full-screen menu.
  On desktop this must be hidden (otherwise it shows up as a second logo).
*/
.mobile-menu-logo {
    display: none;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 2.8rem;
    /* Reduced from 5rem to prevent overflow */
    margin: 0;
    /* margin-right removed */
    padding: 0;
    /* Desktop alignment */
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--header-height);
}

.nav-link {
    font-weight: 600;
    /* Increased weight */
    font-size: 0.95rem;
    color: inherit;
    position: relative;
    transition: color 0.3s;
    text-transform: uppercase;
    /* Match standard corporate style */
    letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    min-width: 260px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    border-top: 3px solid var(--color-accent);
    /* Thicker accent */
    border-radius: 0 0 4px 4px;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-toggle-btn {
    display: none;
}


/* Mobile Menu Button */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1100;
}

/* Base Cards */
.card {
    background: var(--color-card-bg);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    background: #252525;
}

.card-icon {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

/* Feature Block */
.feature-block {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.feature-content {
    flex: 1;
}

.feature-image {
    flex: 1;
}

.feature-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.feature-block.reversed {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .navbar {
        height: 90px !important;
        /* Increased height to fit bigger logo */
        padding: 0;
    }

    .navbar-container {
        display: flex;
        justify-content: center;
        /* Center the logo */
        align-items: center;
        height: 100%;
        width: 100%;
        padding: 0 20px;
        position: relative;
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.8rem;
        z-index: 1200;
        color: var(--color-black);
        background: rgba(255, 255, 255, 0.8);
        padding: 5px 10px;
        border-radius: 4px;
    }

    .transparent-nav .hamburger,
    .home .hamburger {
        background: rgba(0, 0, 0, 0.5);
        color: var(--color-white);
    }

    .scrolled .hamburger {
        background: transparent;
        color: var(--color-black);
    }

    .navbar .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        width: auto !important;
        flex: 0 0 auto;
    }

    .navbar .logo img {
        height: 170px !important;
        /* Increased size significantly */
        width: auto !important;
        margin: 0 !important;
        max-width: 250px !important;
        object-fit: contain;
    }

    /* Mobile Menu Logo */
    .mobile-menu-logo {
        display: none;
        /* Hide by default (desktop) */
    }

    @media (max-width: 768px) {
        .mobile-menu-logo {
            display: flex;
            /* Show only on mobile */
            justify-content: center;
            align-items: center;
            margin-bottom: 0;
            width: 100%;
        }
    }

    .mobile-menu-logo img {
        height: 180px;
        /* Increased from 120px */
        width: auto;
        object-fit: contain;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        /* Fallback */
        height: 100dvh;
        /* Mobile viewport height */
        background-color: var(--color-black) !important;
        flex-direction: column;
        justify-content: flex-start;
        /* Align to top */
        align-items: center;
        padding-top: 15vh;
        /* Push content down slightly but keep it high */
        padding-bottom: 5rem;
        /* Space for bottom scrolling */
        z-index: 1050;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        gap: var(--space-xs);
        margin-right: 0;
        overflow-y: auto;
        /* Allow internal scrolling manually */
        overscroll-behavior: contain;
        /* Prevent scrolling parent */
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-item {
        height: auto;
        width: 100%;
        flex-direction: column;
        align-items: center;
        border-bottom: none;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.2rem;
        color: var(--color-white) !important;
        /* Force White Text */
        padding: 0.8rem 0;
        display: block;
        text-align: center;
        width: 100%;
        position: relative;
        z-index: 1;
    }

    /* Mobile Dropdown with Animation */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        opacity: 0;
        visibility: visible;
        transform: none;
        display: block;
        /* Always block for animation */
        max-height: 0;
        overflow: hidden;
        /* Hide content when closed */
        padding: 0;
        margin: 0;
        background-color: rgba(255, 255, 255, 0.03);
        width: 100%;
        text-align: center;
        border-radius: var(--radius-md);
        border-radius: var(--radius-md);
        transition: max-height 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease, margin 0.3s ease, padding 0.3s ease;
    }

    .dropdown-item a {
        color: var(--color-text-light);
        padding: 0.6rem 0;
        font-size: 1rem;
    }

    .nav-item.active-dropdown .dropdown-menu {
        max-height: 500px;
        /* Allow expansion */
        opacity: 1;
        padding: 0.5rem 0;
        margin-top: 5px;
    }

    /* JS Injected Mobile Toggle Button */
    .mobile-toggle-btn {
        position: absolute;
        top: 0;
        right: 0;
        /* Flush with right edge */
        width: 80px;
        /* DOUBLE width for easier tapping */
        height: 100%;
        /* Full height of the link */
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: var(--color-accent);
        cursor: pointer;
        z-index: 10;
        transition: transform 0.3s ease;
        -webkit-tap-highlight-color: transparent;
        /* Remove blue flash on tap */
        user-select: none;
        /* Prevent text selection */
    }

    .nav-item.active-dropdown .mobile-toggle-btn {
        transform: rotate(180deg);
        color: var(--color-white);
    }

    /* Remove old CSS triggers */
    .dropdown-trigger::after {
        content: none !important;
    }

    .nav-item.active-dropdown .dropdown-trigger::after {
        content: none !important;
    }

    .feature-block {
        flex-direction: column !important;
    }

    /* Close button for full screen menu? 
       Usually hamburger turns into X. Script handles styling?
       Script sets internalHTML to X. We need to ensure it's visible. 
       Z-index of hamburger needs to be higher than menu. 
    */
    .hamburger {
        z-index: 1100;
    }
}

/* Footer */
.footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 20px 0 10px;
    font-size: 0.9rem;
}

.footer .container {
    padding: 0 40px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-grid .footer-col:first-child {
    margin-right: auto;
    padding-left: 20px;
}

.footer-grid .footer-col:not(:first-child) {
    text-align: left;
    display: flex;
    flex-direction: column;
    margin-top: 95px;
    /* Increased to center vertically relative to 350px logo */
}

.footer h4 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    margin-top: 0;
}

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

.footer ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.footer p {
    margin-top: 0;
    margin-bottom: 0.5rem;
    /* Reduced from default */
    line-height: 1.5;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
    .footer-grid {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .footer-grid .footer-col:first-child {
        width: 100%;
        margin-bottom: var(--space-md);
        text-align: center;
        padding-left: 0;
    }

    .footer .logo img {
        height: 250px;
        /* Smaller logo for tablet */
        margin: 0 auto;
    }

    .footer-grid .footer-col:not(:first-child) {
        margin-top: 0;
        /* Reset vertical centering margin */
        flex: 1;
        min-width: 200px;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-grid .footer-col:first-child {
        margin-right: 0;
        padding-left: 0;
    }

    .footer .logo {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .footer .logo img {
        height: 180px;
        /* Smaller logo for mobile */
        margin: 0 auto;
    }

    .footer-grid .footer-col:not(:first-child) {
        width: 100%;
        margin-top: 0;
        align-items: center;
        text-align: center;
    }

    .footer h4 {
        margin-bottom: 10px;
    }

    /* Adjust container padding for mobile */
    .footer .container {
        padding: 0 20px;
    }
}

/* Mobile Menu Close Button */
.mobile-menu-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1300;
    padding: 10px;
    line-height: 1;
    transition: color 0.3s ease;
}

.mobile-menu-close-btn:hover {
    color: var(--color-accent);
}

/* Ensure Mobile Menu has correct padding to not overlap with close button */
@media (max-width: 768px) {
    .nav-menu.active {
        padding-top: 6rem;
        /* Space for close button */
    }
}