/* 
 * Global İstihdam - Main StyleSheet 
 * Modern, Sade, Kurumsal ve Mobil Uyumlu Vanilla CSS
 */

:root {
    /* Deep Navy Blue Theme Colors */
    --primary: #1e3a8a;
    /* Deep Navy Blue */
    --secondary: #1d4ed8;
    /* Rich Royal Blue */
    --accent: #dbeafe;
    /* Very pale blue background */
    --danger: #ef4444;
    /* Red */

    --bg-main: #f8fafc;
    /* Clean, soft off-white background */
    --bg-card: #ffffff;
    /* Pure White for Cards */
    --text-main: #0f172a;
    /* Slate very dark blue */
    --text-muted: #64748b;
    /* Medium slate for muted text */
    --border: #e2e8f0;
    /* Soft border grey */

    /* Elegant, soft drop shadows */
    --shadow-sm: 0 4px 15px rgba(30, 58, 138, 0.08);
    --shadow-md: 0 10px 30px rgba(30, 58, 138, 0.12);
    --shadow-lg: 0 20px 40px rgba(30, 58, 138, 0.15);

    --radius: 12px;
    /* Softened, elegant corners */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
    -webkit-font-smoothing: antialiased;
}

/* Card Improvements */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.alert {
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-card);
}

.bg-blue {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--secondary);
}

.bg-green {
    background-color: rgba(32, 201, 151, 0.1);
    color: var(--accent);
}

.bg-yellow {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.btn-xs {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    gap: 0.25rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-white {
    background-color: white;
    color: var(--primary);
    border: 1px solid white;
}

.btn-white:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #991b1b;
    /* Darker Red */
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Header */
.main-header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
    padding: 15px 1rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo a img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-top: -15px;
    margin-bottom: -15px;
}

.logo i {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: flex-start;
    gap: 1.5rem;
    margin: 0 0 0 0.5rem;
    align-items: center;
}

.nav-item {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    /* Prevent wrapping text like 'İşveren Başvurusu' */
    font-size: 0.95rem;
    /* Slightly smaller font to fit everything */
}

.nav-item:hover {
    color: var(--secondary);
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    z-index: 1001;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--accent);
    color: var(--primary);
    padding-left: 20px;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    margin-left: auto; /* Pushesh auth-buttons to the far right inside nav-links */
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.85)), url('../img/hero.png') center/cover no-repeat;
    color: white;
    padding: 7rem 0 8rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: white;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Search Box */
.search-box {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-box:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.search-box form {
    display: flex;
    gap: 0;
    align-items: center;
}

.search-input,
.search-location {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    color: var(--secondary);
}

.search-input i,
.search-location i {
    font-size: 1.2rem;
}

.search-input {
    border-right: 1px solid var(--border);
}

.search-input input {
    width: 100%;
    border: none;
    outline: none;
    padding: 1.2rem 0;
    font-size: 1.05rem;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    background: transparent;
}

/* Global Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-card);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: none;
    /* No glowing shadow for high-end feel, only crisp darkness */
}

/* Custom Minimalist Checkboxes & Radios */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    /* Softened checkbox */
    background-color: var(--bg-card);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="radio"]:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.custom-dropdown-selected {
    padding: 1.2rem 0;
    font-size: 1.05rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.custom-dropdown-selected i {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.custom-dropdown-selected.active i {
    transform: rotate(180deg);
}

.custom-dropdown-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-height: 250px;
    overflow-y: auto;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border: 1px solid var(--border);
    padding: 0.5rem 0;
}

.custom-dropdown-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
    color: var(--text-main);
}

.custom-dropdown-item:hover {
    background-color: var(--bg-main);
    color: var(--secondary);
}

/* Scrollbar Styles for the dropdown */
.custom-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.btn-search {
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Recent Jobs */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.job-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.job-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.job-details {
    flex: 1;
}

.job-details h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.job-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* CTA Section */
.cta-flex {
    display: flex;
    gap: 2rem;
}

.cta-box {
    flex: 1;
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.candidate-cta {
    background-color: var(--primary);
    color: white;
}

.candidate-cta h2 {
    color: white;
}

.candidate-cta p {
    color: rgba(255, 255, 255, 0.8);
    margin: 1rem 0 2rem;
}

.employer-cta {
    border: 1px solid var(--border);
}

.employer-cta h2 {
    color: var(--primary);
}

.employer-cta p {
    color: var(--text-muted);
    margin: 1rem 0 2rem;
}

/* Footer */
.main-footer {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo:hover {
    color: white;
    opacity: 0.9;
}

.footer-brand p {
    margin-top: 1rem;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1100px) {

    .navbar {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 0;
        margin: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid var(--border);
        align-items: stretch;

        /* Animation System */
        display: flex;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        pointer-events: none;
    }

    .nav-links.mobile-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links .nav-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
        width: 100%;
        display: block;
    }

    .nav-links .nav-dropdown {
        width: 100%;
        display: block;
    }

    .nav-links .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,0.02);
        margin: 0;
        padding-left: 1rem;
        /* Replace display toggle with max-height/opacity animation */
        display: block;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }

    .nav-links .dropdown-content.show {
        max-height: 300px; /* Safe upper limit for mobile submenu */
        opacity: 1;
    }

    .auth-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin: 0;
        padding: 1rem 1.5rem;
        background: var(--bg-main);
        gap: 0.5rem;
        border-top: 1px solid var(--border);
        align-items: center;
        justify-content: center;
    }

    .auth-buttons .iskur-logo-container {
        width: 100%;
        justify-content: center;
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .search-box {
        border-radius: 16px;
        padding: 1rem;
    }

    .search-box form {
        flex-direction: column;
        gap: 1rem;
    }

    .search-input,
    .search-location {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 0;
        width: 100%;
    }

    .search-input input,
    .search-location select {
        padding: 0.75rem 0;
    }

    .btn-search {
        border-radius: 12px;
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .job-card {
        flex-direction: column;
        text-align: center;
    }

    .job-icon {
        margin: 0 auto 1rem;
    }

    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin-bottom: 1rem;
    }

    .cta-flex {
        flex-direction: column;
    }

    .footer-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Tablolar İçin Yatay Kaydırma (Scroll) */
    .table-container,
    .table-responsive,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Genel Grid Layout Çözümleri (Inline style'dan yakalama) */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Profil Menüsü Genişlik İptali */
    [style*="width: 250px"],
    .sidebar-layout {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    /* Profil / Panel Sayfaları Yan Yana Duran Kutuları Alt Alta Al */
    [style*="display: flex; gap: 2rem"],
    [style*="display: flex; gap: 3rem"],
    [style*="display: flex; gap: 4rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    /* İletişim, Hakkımızda vs form alanları padding düzeltmesi */
    .contact-card,
    .content-card,
    .profile-card,
    .auth-card {
        padding: 1.5rem !important;
    }
}