@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --primary-color: #0ea5e9;
    --border-color: #e2e8f0;

    /* Premium category colors based on screenshots */
    --color-teal: #14b8a6;
    --color-orange: #f97316;
    --color-magenta: #ec4899;
    --color-olive: #65a30d;
    --color-brown: #a16207;
    --color-mustard: #eab308;
    --color-purple: #8b5cf6;
    --color-gold: #ca8a04;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: white;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-blue-bar {
    background-color: #093a84;
    /* Screenshot'taki koyu mavi renk */
    height: 48px;
    width: 100%;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 1rem;
}

.logo-img {
    height: 76px;
    width: 76px;
    margin-top: -38px;
    /* Mavi barın üzerine yarı yarıya taşması için */
    border-radius: 50%;
    background-color: white;
    /* Resmin arkası şeffafsa beyaz zemin */
    padding: 3px;
    /* Etrafında beyaz bir halka (border) efekti için */
    object-fit: contain;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Hafif gölge ile belirginleştirme */
}

.logo-container h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-top: 5px;
}

.uni-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.uni-link:hover {
    color: #093a84;
    /* Screenshot'taki mavi renk (üst bar ile aynı) */
    text-decoration: underline;
}


/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.3rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

/* Search Bar */
.search-container {
    max-width: 800px;
    margin: -2rem auto 3rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid #bae6fd;
    border-radius: 50px;
    background: white;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    list-style: none;
    padding: 0;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
    display: block;
    text-decoration: none;
    font-size: 1rem;
    text-align: left;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: #f8f9fa;
    color: #d97706;
}

/* Grid layout for categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Category Cards */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--card-shadow);
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    z-index: 1;
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    z-index: 1;
    line-height: 1.4;
}

/* Specific Card Colors */
.card.teal {
    background-color: var(--color-teal);
}

.card.orange {
    background-color: var(--color-orange);
}

.card.magenta {
    background-color: var(--color-magenta);
}

.card.olive {
    background-color: var(--color-olive);
}

.card.brown {
    background-color: var(--color-brown);
}

.card.mustard {
    background-color: var(--color-mustard);
}

.card.purple {
    background-color: var(--color-purple);
}

.card.gold {
    background-color: var(--color-gold);
}

/* Detail Page Styles */
.detail-header {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 1.8rem;
    color: #c2410c;
    /* Rust/Orange color from screenshots */
    font-weight: 500;
    margin-bottom: 1rem;
}

.detail-instruction {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Step Images Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step-item {
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    width: fit-content;
    margin: 0 auto;
}

.step-item:hover {
    transform: scale(1.02);
}

.step-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    border: 2px dashed #cbd5e1;
}

.step-item img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

/* Related Pages */
.related-section {
    margin-top: 3rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 2rem;
}

.related-title {
    font-size: 1.3rem;
    color: #c2410c;
    font-weight: 500;
    margin-bottom: 1rem;
}

.related-links {
    list-style: none;
}

.related-links li {
    margin-bottom: 1rem;
}

.related-links a {
    color: #ea580c;
    text-decoration: none;
    transition: color 0.2s;
}

.related-links a:hover {
    color: #c2410c;
    text-decoration: underline;
}

/* FAQ Details (Accordion) Styles */
.faq-details {
    margin-bottom: 0.5rem;
}

.faq-details summary {
    color: #ea580c;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.faq-details summary:hover {
    color: #c2410c;
    text-decoration: underline;
}

.faq-content {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    padding-left: 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 2px solid #ea580c;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 2rem;
    transition: all 0.2s ease;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.75rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    position: absolute;
    bottom: -40px;
    font-size: 16px;
}

.step-item img {
    cursor: zoom-in;
}