/* Header Styles - 3E Makina */

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: all 0.4s ease;
    padding: 20px 0;
    box-sizing: border-box;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
    min-width: 0;
}

.logo-img {
    height: 120px; /* Varsayılan boyut */
    width: auto;
    transition: var(--transition);
    object-fit: contain;
    display: block;
    /* Prevent excessive width */
    max-width: 300px;
    max-height: 120px;
}

/* Sadece index sayfasında logo büyük olsun */
body.index-page .logo-img {
    height: 180px;
    max-width: 400px;
    max-height: 180px;
}

/* Responsive görünümde ana sayfa logosunu küçült */
@media (max-width: 768px) {
    body.index-page .logo-img {
        height: 90px; /* %50 küçültme (180px * 0.5 = 90px) */
    }
}


/* Navigation */
nav {
    flex-shrink: 0;
    position: relative;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
    letter-spacing: 0.01em;
}

header.scrolled nav ul li a {
    color: var(--text-dark);
}

/* White background pages - header with dark text from start */
body.page-white-bg header nav ul li a {
    color: var(--text-dark);
}

body.page-white-bg header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--primary-color);
}

header.scrolled nav ul li a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Button - Modern Design */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    background: rgba(33, 45, 85, 0.1);
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background-color: #212121; /* Siyah renk */
    transition: all 0.3s ease;
    border-radius: 3px;
}

header.scrolled .mobile-menu-btn span,
body.page-white-bg .mobile-menu-btn span {
    background-color: #212121; /* Siyah renk */
}

/* Sayfa beyaz arka planlıysa siyah olsun */
header .mobile-menu-btn span {
    background-color: white; /* Index sayfası için beyaz */
}

body.page-white-bg header .mobile-menu-btn span {
    background-color: #212121; /* Diğer sayfalar için siyah */
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
    background-color: var(--gold-color);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background-color: var(--gold-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 30px;
    }
    
    .logo-img {
        height: 120px; /* Tablet için normale dönsün */
        max-width: 250px;
        max-height: 120px;
    }
    
    nav ul {
        gap: 25px; /* Tablet'te gap'i azalt */
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 0;
    }
    
    .header-container {
        padding: 0 20px;
    }
    
    .logo-img {
        height: 80px; /* Mobile için daha küçük */
        max-width: 200px;
        max-height: 80px;
    }
    
    body.index-page .logo-img {
        height: 90px;
        max-width: 220px;
        max-height: 90px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Modern Mobile Menu Design */
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        padding: 80px 30px 40px 30px;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0);
        z-index: 1000;
        overflow-y: auto;
    }
    
    nav.active {
        left: 0;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav ul li {
        border-bottom: 1px solid rgba(33, 45, 85, 0.1);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        display: block;
        color: var(--text-dark);
        font-size: 1.1rem;
        font-weight: 600;
        padding: 18px 15px;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
    }
    
    nav ul li a:hover,
    nav ul li a.active {
        background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
        border-left-color: var(--gold-color);
        color: var(--primary-color);
        padding-left: 25px;
    }
    
    nav ul li a::after {
        display: none;
    }
    
    /* Overlay for mobile menu - KALDIRILDI */
    /* nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    } */
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo-img {
        height: 65px; /* Çok küçük ekranlar için daha da küçük */
        max-width: 150px;
        max-height: 65px;
    }
    
    nav {
        width: 90%;
    }
    
    nav ul li a {
        font-size: 1rem;
        padding: 15px 12px;
    }
}

/* Catalog Modal Styles */
.catalog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-modal.active {
    display: flex;
    opacity: 1;
}

.catalog-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.catalog-modal.active .catalog-modal-content {
    transform: scale(1);
}

.catalog-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.catalog-modal-close:hover {
    color: var(--primary-color);
}

.catalog-modal-content h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.catalog-modal-content p {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 1rem;
}

.catalog-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.catalog-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.catalog-option-btn:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.25);
}

.catalog-option-btn .flag {
    width: 60px;
    height: 45px;
    margin-right: 20px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.catalog-option-btn .flag.flag-tr {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Crect fill='%23E30A17' width='900' height='600'/%3E%3Ccircle fill='%23FFFFFF' cx='450' cy='300' r='150'/%3E%3Ccircle fill='%23E30A17' cx='450' cy='300' r='100'/%3E%3Cpath fill='%23FFFFFF' d='M450 200l50 100-50 50-50-50z'/%3E%3Cpath fill='%23FFFFFF' d='M350 300l100-50 50 50-50 50z'/%3E%3Cpath fill='%23FFFFFF' d='M550 300l-50-50 50-50 50 50z'/%3E%3Cpath fill='%23FFFFFF' d='M450 400l-50-50 50-50 50 50z'/%3E%3C/svg%3E");
}

.catalog-option-btn .flag.flag-gb {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Crect fill='%23012169' width='900' height='600'/%3E%3Cpath fill='%23FFFFFF' d='M0 0l900 600M900 0L0 600' stroke='%23FFFFFF' stroke-width='120'/%3E%3Cpath fill='%23C8102E' d='M0 0l900 600M900 0L0 600' stroke='%23C8102E' stroke-width='80'/%3E%3Cpath fill='%23FFFFFF' d='M450 0v600M0 300h900' stroke='%23FFFFFF' stroke-width='200'/%3E%3Cpath fill='%23C8102E' d='M450 0v600M0 300h900' stroke='%23C8102E' stroke-width='120'/%3E%3C/svg%3E");
}

.catalog-option-btn .lang-name {
    flex: 1;
    font-size: 1.2rem;
}

.catalog-option-btn .download-icon {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.catalog-option-btn:hover .download-icon {
    opacity: 1;
}

@media (max-width: 768px) {
    .catalog-modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .catalog-modal-content h2 {
        font-size: 1.5rem;
    }
    
    .catalog-option-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .catalog-option-btn .flag {
        width: 50px;
        height: 37px;
        margin-right: 15px;
    }
    
    .catalog-option-btn .lang-name {
        font-size: 1.1rem;
    }
}

