/* ===========================================================
   FIRSATLAR / ÇEKİLİŞLER SAYFASI
   - ders notları sayfasıyla aynı altyapı:
     • üstte blur renkli blob bg
     • footer arc geçişi
   - kart tasarımları ekran görüntüsündeki gibi
   - responsive mobil grid ortalama
   =========================================================== */

/* ------------ GENEL RESET / TAŞMA KONTROLÜ ------------ */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    max-inline-size: 100%;
    min-width: 0;
}

/* ------------ THEME TOKENS LIGHT ------------ */
:root {
    --glass-bg: rgba(255, 255, 255, 0.42);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-shadow: 0 12px 28px rgba(31, 38, 135, 0.12);

    --placeholder-color: rgba(0, 0, 0, 0.45);

    --text: #0f172a;
    --muted: #6b7280;
    --bg-page: #f8fafc;
    --surface: #ffffff;

    --brand-cta: #ffa631;
    --brand-cta-hover: #ff8a00;

    --border-color: #e6e9ef;

    /* kart gölgeleri */
    --card-bg: #ffffff;
    --shadow: 0 16px 32px rgba(15, 23, 42, 0.07);
    --shadow-soft: 0 24px 44px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 32px 64px rgba(15, 23, 42, 0.12);

    /* gradient alan yüksekliği */
    --hero-bg-h: clamp(420px, 48vw, 640px);

    /* footer geçiş renkleri */
    --f1: #eaf4ff;
    --f2: #ffffff;
}

/* ------------ THEME TOKENS DARK ------------ */
body.dark {
    --glass-bg: rgba(16, 16, 16, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);

    --placeholder-color: rgba(255, 255, 255, 0.45);

    --text: #f8fafc;
    --muted: #94a3b8;
    --bg-page: #1a1a1a;
    --surface: #2a2a2a;

    --brand-cta: #ffa631;
    --brand-cta-hover: #ff8a00;

    --border-color: #3a3a3a;

    --card-bg: #2a2a2a;
    --shadow: 0 16px 32px rgba(0, 0, 0, 0.8);
    --shadow-soft: 0 24px 44px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 32px 64px rgba(0, 0, 0, 0.9);

    --f1: #0f1216;
    --f2: #0b0c0d;
}

/* ------------ SAYFA ARKA PLAN BLOBU ------------ */
body {
    background: var(--bg-page);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--hero-bg-h);
    z-index: 0;
    pointer-events: none;

    /* light gradient blob */
    background: radial-gradient(
            ellipse 55% 55% at 25% 20%,
            rgba(244, 164, 138, 0.56),
            transparent
        ),
        radial-gradient(
            ellipse 50% 50% at 66% 12%,
            rgba(194, 165, 247, 0.5),
            transparent
        ),
        radial-gradient(
            ellipse 50% 50% at 90% 38%,
            rgba(171, 235, 255, 0.5),
            transparent
        );

    opacity: 0.95;

    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

body.dark::before {
    /* dark blob versiyonu */
    background: radial-gradient(
            ellipse 55% 55% at 25% 20%,
            rgba(142, 68, 173, 0.5),
            transparent
        ),
        radial-gradient(
            ellipse 50% 50% at 66% 12%,
            rgba(41, 128, 185, 0.5),
            transparent
        ),
        radial-gradient(
            ellipse 50% 50% at 90% 38%,
            rgba(22, 160, 133, 0.5),
            transparent
        );
    opacity: 0.6;
}

/* z-index layered content */
.page-opportunities-index {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* container max width aynı */
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
}

/* ===========================================================
   HERO / SEARCH / TABS
   =========================================================== */

.opp-hero {
    padding-top: clamp(56px, 6vw, 72px);
    padding-bottom: 24px;
    position: relative;
    color: var(--text);
}

.opp-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    font-weight: 700;
    font-size: clamp(1.4rem, 2vw, 1.6rem);
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 16px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
}

.opp-headline .slash {
    margin: 0 6px;
    color: var(--text);
    font-weight: 400;
    opacity: 0.75;
}

/* Arama + Sekme bar bloğu */
.opp-search-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

/* Arama input kapsülü */
.opp-search-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    max-width: 600px;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 36px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text);
}

body.dark .opp-search-wrapper {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

/* Arama ikonu */
.opp-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.opp-search-icon svg {
    width: 18px;
    height: 18px;
}

/* Arama input */
.opp-search-input {
    background: transparent;
    border: 0;
    outline: 0;
    width: 100%;
    height: 100%;
    color: var(--text);
}
.opp-search-input::placeholder {
    color: var(--placeholder-color);
}

/* Sekmeler (pills gibi) */
.opp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.opp-tab-link {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text);
    border-radius: 8px;
    line-height: 1.2;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    background-clip: padding-box;
    transition: all 0.16s ease;
}

body.dark .opp-tab-link {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.opp-tab-link.active {
    background: var(--brand-cta);
    border-color: var(--brand-cta);
    color: #fff;
    box-shadow: 0 12px 24px rgba(255, 166, 49, 0.35);
}
.opp-tab-link:not(.active):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

/* ===========================================================
   GRID LAYOUT (çekiliş kartları + kampanya kartları)
   =========================================================== */

.opp-section-block {
    margin-top: 12px;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.opp-campaigns-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 24px;
    padding-bottom: 48px;
}

.opp-campaign-toprow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 16px;
}

/* şehir select */
.opp-city-form {
    max-width: 220px;
}
.opp-select {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 12px;
    outline: 0;
}
.opp-select:focus {
    border-color: var(--brand-cta);
    box-shadow: 0 0 0 0.2rem rgba(255, 166, 49, 0.25);
}

/* kartları taşıyan grid */
.opp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* ===========================================================
   KART GENEL STİL
   =========================================================== */

.opp-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    padding: 16px;
    min-height: 220px;
    transition: all 0.2s ease;
    position: relative;
}

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

/* kart üst satırı: logo & tarih bloğu */
.opp-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.opp-card-brand {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.opp-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
body.dark .opp-card-logo {
    background: #000;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
}

.opp-card-dates {
    text-align: right;
    font-size: 0.7rem;
    line-height: 1.2;
    color: var(--muted);
    flex-shrink: 0;
}
.opp-card-date {
    font-weight: 600;
    color: var(--text);
}
.opp-card-small {
    color: var(--muted);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* kart gövde (başlık, açıklama, meta) */
.opp-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.opp-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 6px;
    min-height: 2.4em; /* 2 satırı tut */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opp-card-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: default;
}
.opp-card--campaign .opp-card-desc {
    cursor: pointer; /* kampanyada modal açıyoruz */
    text-decoration: none;
}
.opp-card--campaign .opp-card-desc:hover {
    text-decoration: underline;
}

/* meta satırı (ikon + katılım sayısı vs) */
.opp-card-meta {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: auto;
    margin-bottom: 12px;
}

.opp-card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.opp-card-meta-icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.opp-card-meta-text {
    white-space: nowrap;
    font-weight: 500;
    color: var(--muted);
    font-size: 0.8rem;
}

.opp-card-meta-text.highlight {
    color: var(--brand-cta);
    font-weight: 600;
}

/* CTA alanı (alt buton / kod pill) */
.opp-card-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* çekiliş butonu */
.opp-btn-cta {
    background: var(--brand-cta);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    border: 0;
    padding: 10px 12px;
    box-shadow: 0 12px 24px rgba(255, 166, 49, 0.3);
    transition: all 0.16s ease;
    cursor: pointer;
}
.opp-btn-cta:hover {
    background: var(--brand-cta-hover);
}
.opp-btn-cta.is-disabled,
.opp-btn-cta[disabled],
.opp-btn-cta:disabled {
    background: var(--muted);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

/* kampanya kod alanı */
.opp-discount-pill {
    background: var(--brand-cta);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.2;
    border-radius: 8px;
    text-align: center;
    padding: 10px 12px;
    box-shadow: 0 12px 24px rgba(255, 166, 49, 0.3);
}
.opp-discount-pill a {
    color: #fff;
    text-decoration: none;
}
.opp-discount-pill a:hover {
    text-decoration: underline;
}

/* ===========================================================
   MODAL STİLLERİ
   =========================================================== */
.opp-modal {
    background-color: var(--surface);
    border-radius: 1rem;
    border: none;
    color: var(--text);
}
.opp-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    color: var(--text);
}
.opp-modal .modal-footer {
    border-top: 1px solid var(--border-color);
}
.list-group-item {
    background-color: transparent;
    color: var(--text);
    border-color: var(--border-color);
    font-size: 0.9rem;
}
.list-group-item.winner {
    color: #198754;
    font-weight: bold;
    background-color: rgba(25, 135, 84, 0.07);
}

/* ===========================================================
   FOOTER GEÇİŞİ (ders notlarındakiyle aynı mantık)
   =========================================================== */
.footer-arc-bg {
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--f1) 100%);
    height: clamp(80px, 12vw, 150px);
    width: 100%;
    position: relative;
    z-index: 1;
    clip-path: ellipse(100% 100% at 50% 100%);
}

.site-footer {
    background: linear-gradient(180deg, var(--f1) 0%, var(--f2) 100%);
    color: var(--text);
    padding: 26px 0 8px;
    position: relative;
    z-index: 0;
    margin-top: -1px;
    border-top: 0;
}

.sf-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 28px;
    width: 100%;
}

.sf-logo {
    height: 46px;
    max-width: 100%;
}

.sf-col h4 {
    margin: 0 0 10px;
    font-weight: 800;
    color: var(--text);
}

.sf-col p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    color: var(--text);
    word-break: break-word;
}

.sf-links a {
    display: block;
    font-size: 14px;
    margin: 6px 0;
    color: var(--text);
    opacity: 0.9;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.16s ease;
}
.sf-links a:hover {
    color: var(--brand-cta);
    opacity: 1;
}

.sf-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.sf-social img {
    width: 22px;
    height: 22px;
    transition: transform 0.2s;
}
.sf-social img:hover {
    transform: scale(1.08);
}

.sf-bottom {
    max-width: 1140px;
    margin: 14px auto 0;
    padding: 10px 16px 0;
    text-align: center;
    opacity: 0.75;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text);
    font-size: 13px;
    word-break: break-word;
}
body.dark .sf-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */

@media (max-width: 900px) {
    .sf-wrap {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .sf-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .sf-social {
        justify-content: center;
    }
    .sf-bottom {
        font-size: 12px;
    }
}

/* hero responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .opp-headline {
        font-size: 1.3rem;
        line-height: 1.3;
        text-align: left;
    }

    .opp-search-tabs {
        width: 100%;
    }

    .opp-search-wrapper {
        max-width: 100%;
        height: 42px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .opp-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .opp-tabs::-webkit-scrollbar {
        display: none;
    }

    .opp-tab-link {
        font-size: 0.8rem;
        padding: 10px 12px;
        white-space: nowrap;
    }
}

/* grid responsive */
@media (max-width: 480px) {
    .opp-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .opp-card {
        border-radius: 12px;
        padding: 16px;
        min-height: 200px;
    }

    .opp-card-logo {
        width: 56px;
        height: 56px;
    }

    .opp-card-title {
        font-size: 0.95rem;
        min-height: 2.6em;
    }

    .opp-card-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 4;
    }

    .opp-card-meta-text {
        font-size: 0.75rem;
    }

    .opp-btn-cta,
    .opp-discount-pill {
        font-size: 0.8rem;
        padding: 10px 10px;
    }
}
