:root {
    --primary-color: #121b7e;
    --secondary-color: #ffffff;
    --text-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Header Styles */
header {
    background-color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    padding: 0 2rem;
    margin: 0 auto;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    margin: 0.5rem 0;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    margin: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.auth-buttons button {
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login {
    background-color: transparent;
    color: var(--primary-color);
}

.login:hover {
    background-color: #f5f5f5;
}

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

.register:hover {
    background-color: #0d1757;
    transform: translateY(-2px);
}


/* Mentors Page düzenlemeleri */
.mentors-page {
    max-width: 1200px; /* Biraz daha dar */
    margin: 3rem auto; /* Üst ve alttan daha fazla boşluk */
    padding: 0 2rem;
}

.mentors-header {
    text-align: center;
    margin-bottom: 3rem;
}

.mentors-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.mentors-header p {
    color: #666;
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    position: relative;
}

.filter-btn.has-filters::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.filter-btn:hover {
    background: #0d1757;
}

.mentors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolon */
    gap: 2.5rem; /* Kartlar arası boşluk artırıldı */
    padding: 2rem 0;
    grid-auto-rows: 1fr; /* Her satırdaki öğelerin aynı yükseklikte olmasını sağlar */
}

.mentor-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out;
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    border: 2px solid transparent;
    position: relative;
    z-index: 1;
    height: 100%;
}

/* Kontenjan durumuna göre kart stilleri */
.mentor-card.has-quota {
    border-color: #2e7d32;
    background: linear-gradient(to bottom, white, #e8f5e9);
}

.mentor-card.no-quota {
    border-color: #c62828;
    background: linear-gradient(to bottom, white, #ffebee);
}

.mentor-card.has-quota .quota-status {
    color: #2e7d32;
}

.mentor-card.no-quota .quota-status {
    color: #c62828;
}

.quota-status {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quota-status::before {
    content: "•";
    font-size: 1.5rem;
}

.mentor-card:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: var(--primary-color);
    z-index: 10;
}

/* Kart içindeki tüm içeriğin de büyümesini sağlamak için */
.mentor-card > * {
    transition: all 0.3s ease-in-out;
}

.mentor-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    transition: transform 0.3s ease-in-out;
}

.mentor-card:hover .mentor-image {
    transform: scale(1.10); /* Fotoğraf da hafifçe büyüsün */
}

.mentor-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    min-height: 1.5em;
}

.mentor-info {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
}

.mentor-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.detail-btn:hover {
    background: #0d1757;
    transform: translateY(-2px);
}

/* Responsive düzenleme */
@media (max-width: 1200px) {
    .mentors-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr; /* Responsive görünümde de aynı yüksekliği korur */
    }
}

/* Menu Backdrop */
#menuBackdrop {
    display: none; /* Hide the backdrop completely */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem; /* Reduced from 1.8rem */
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem; /* Reduced from 0.7rem */
    z-index: 100;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #0d1757;
}

.mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

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

@media (max-width: 768px) {
    nav {
        position: relative;
        flex-wrap: wrap;
        padding: 1rem;
        justify-content: center;
        text-align: center;
    }
    
    .logo {
        margin: 0 auto 0.5rem;
        width: 100%;
        text-align: center;
        order: 1;
        font-size: 1.8rem;
        padding: 0.5rem 0;
    }
    
    header {
        position: relative;
        z-index: 1000;
        background-color: white;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1.2rem;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active {
        color: #0d1757;
    }
    
    .nav-links {
        display: block;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.4s ease-in-out;
        background-color: white;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 15px 15px;
        order: 3;
    }
    
    .nav-links.active {
        display: flex;
        padding: 1.5rem 0;
        max-height: 350px;
        opacity: 1;
    }
    
    .nav-links a {
        margin: 0.7rem 0;
        padding: 0.7rem;
        width: 100%;
        text-align: center;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s ease;
        transition-delay: calc(0.05s * var(--i, 0));
        font-size: 1.3rem;
        font-weight: 500;
    }
    
    .nav-links.active a {
        transform: translateY(0);
        opacity: 1;
    }
    
    .auth-buttons {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 1.5rem;
        order: 2;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        transition-delay: 0.3s;
        gap: 1rem;
    }
    
    .nav-links.active + .auth-buttons {
        opacity: 1;
        transform: translateY(0);
    }
    
    .auth-buttons button {
        margin: 0 0.7rem;
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 500;
        min-width: 120px;
    }
    
    .mentors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
        grid-auto-rows: 1fr; /* Mobil görünümde de aynı yüksekliği korur */
    }
    
    .mentor-card {
        padding: 0.8rem;
        max-width: 100%;
        width: 100%;
        justify-self: center;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .mentor-image {
        width: 80px;
        height: 80px;
    }
    
    .mentor-card h2 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        min-height: 1.3em;
    }
    
    .mentor-info {
        margin-bottom: 1rem;
        flex-grow: 1;
    }
    
    .mentor-info p {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .detail-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
        margin-top: auto;
    }
    
    .mentor-card:hover {
        transform: scale(1.03);
    }
    
    .mentor-card:hover .mentor-image {
        transform: scale(1.05);
    }
    
    .search-bar {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .search-bar input {
        width: 100%;
        min-width: 0;
    }
    
    .filter-btn, .clear-filters-btn {
        width: 100%;
        margin-left: 0;
        padding: 0.8rem 1rem;
    }
}

/* Filtre Overlay Stilleri - Animasyon eklendi */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.filter-container {
    background-color: white;
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.4s ease 0.1s forwards;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.filter-back {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.back-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    margin-right: 10px;
}

.filter-clear {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
}

.filter-clear:disabled {
    color: #999;
    cursor: not-allowed;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    background: white;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-option input:checked ~ .checkmark {
    background: linear-gradient(45deg, var(--primary-color), #4a5fd1);
    border-color: var(--primary-color);
}

.filter-option:hover {
    background: #d9d9d9;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15);
}

.filter-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.filter-option:hover input ~ .checkmark {
    background-color: #f5f5f5;
}

.filter-option input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-option input:checked ~ .checkmark:after {
    display: block;
}

.filter-option .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 8px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background-color: white;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cancel-filters-btn {
    flex: 1;
    padding: 15px;
    background: #f1f1f1;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-filters-btn:hover {
    background: #e1e1e1;
}

.apply-filters-btn {
    flex: 2;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-filters-btn:hover {
    background: #0d1757;
}

body.filter-active {
    overflow: hidden;
}

@media (max-width: 600px) {
    .filter-options {
        grid-template-columns: 1fr;
    }
}

/* Sonuç bulunamadı mesajı */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 2rem 0;
}

.clear-filters-btn {
    padding: 1rem 2rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    white-space: nowrap;
    min-width: 120px;
}

.clear-filters-btn:hover {
    background: #c82333;
}

/* Modal Improvements for Mobile */
@media (max-width: 576px) {
    .modal {
        padding-top: 20px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .close-modal {
        top: 5px;
        right: 10px;
        font-size: 28px;
    }
}

/* Additional Mobile Fixes */
@media (max-width: 576px) {
    .footer-content {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        align-items: center;
    }
    
    .social-links a {
        justify-content: center;
    }
    
    .footer-section p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mentors-grid {
        gap: 0.8rem;
        grid-auto-rows: 1fr; /* En küçük ekranlarda da aynı yüksekliği korur */
    }
    
    .mentor-card {
        padding: 0.6rem;
        height: 100%;
    }
    
    .mentor-image {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
    }
    
    .mentor-card h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        min-height: 1.2em;
    }
    
    .mentor-info {
        margin-bottom: 0.8rem;
    }
    
    .mentor-info p {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .detail-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .quota-status {
        font-size: 0.8rem;
        min-height: 1.2em;
    }
    
    .search-bar {
        gap: 0.6rem;
    }
    
    .search-bar input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .filter-btn, .clear-filters-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .filter-container {
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 15px;
    }
    
    .filter-options {
        grid-template-columns: 1fr;
    }
    
    .filter-header {
        padding-top: 10px;
    }
    
    .filter-actions {
        padding-bottom: 20px;
    }
    
    .search-bar {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .search-bar input {
        width: 100%;
        min-width: 0;
    }
    
    .filter-btn, .clear-filters-btn {
        width: 100%;
        margin-left: 0;
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .filter-container {
        padding: 12px;
    }
    
    .filter-header {
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
    
    .filter-section {
        margin-bottom: 15px;
    }
    
    .filter-section h3 {
        font-size: 14px;
    }
    
    .filter-option {
        padding: 10px;
    }
    
    .filter-actions {
        padding-top: 12px;
    }
    
    .cancel-filters-btn, .apply-filters-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .search-bar {
        gap: 0.6rem;
    }
    
    .search-bar input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .filter-btn, .clear-filters-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}
/* Debug panel stili */
#debug-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    font-family: monospace;
    padding: 10px;
    display: none;
}

/* Yükleme göstergesi */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #666;
}