/* ============================================================
   PALMİYE KOLEJİ - COMPONENTS CSS
   Tüm sayfalarda kullanılan ortak bileşenler
   ============================================================ */

/* ============================================================
   SWIPER (Slider & Testimonials)
   ============================================================ */
.swiper { width: 100%; overflow: hidden; }
.swiper-wrapper { display: flex; }
.swiper-slide { flex-shrink: 0; width: 100%; }

/* ============================================================
   ALERT / BİLDİRİM KUTUSU
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    font-weight: 500;
}
.alert-success {
    background: rgba(16,185,129,.1);
    color: #065f46;
    border: 1px solid rgba(16,185,129,.3);
}
.alert-error, .alert-danger {
    background: rgba(239,68,68,.1);
    color: #991b1b;
    border: 1px solid rgba(239,68,68,.3);
}
.alert-warning {
    background: rgba(245,158,11,.1);
    color: #92400e;
    border: 1px solid rgba(245,158,11,.3);
}
.alert-info {
    background: rgba(59,130,246,.1);
    color: #1e40af;
    border: 1px solid rgba(59,130,246,.3);
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.badge-green, .badge-success {
    background: rgba(16,185,129,.12);
    color: #065f46;
}
.badge-orange, .badge-warning {
    background: rgba(245,158,11,.12);
    color: #92400e;
}
.badge-red, .badge-danger {
    background: rgba(239,68,68,.12);
    color: #991b1b;
}
.badge-blue, .badge-info {
    background: rgba(59,130,246,.12);
    color: #1e40af;
}
.badge-gray {
    background: rgba(100,116,139,.12);
    color: #475569;
}
.badge-primary {
    background: rgba(26,107,46,.12);
    color: var(--green);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .25s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    color: var(--gray-500);
    cursor: pointer;
    font-size: .9rem;
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--green); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   ACCORDION / SSS
   ============================================================ */
.accordion-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    background: var(--white);
    transition: background .2s;
    gap: 12px;
}
.accordion-header:hover { background: var(--gray-50); }
.accordion-header.active { background: rgba(26,107,46,.04); }
.accordion-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
}
.accordion-icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-500);
    font-size: .75rem;
    flex-shrink: 0;
    transition: transform .3s, background .2s;
}
.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
    background: var(--green);
    color: var(--white);
}
.accordion-body {
    display: none;
    padding: 0 20px 16px;
    font-size: .9rem;
    color: var(--gray-600);
    line-height: 1.7;
}
.accordion-body.active { display: block; }

/* ============================================================
   TOOLTIP
   ============================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 4px;
    transition: width .6s ease;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }
.avatar-placeholder {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    height: 1px;
    background: var(--gray-200);
    margin: 24px 0;
}
.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-400);
    font-size: .82rem;
    margin: 20px 0;
}
.divider-text::before, .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: .5;
}
.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: .9rem;
    color: var(--gray-400);
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 44px; height: 44px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 400;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--green-dark); transform: translateY(-3px); }

/* ============================================================
   SECTION TAG / BADGE
   ============================================================ */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26,107,46,.1);
    color: var(--green);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-tag i { color: var(--orange); font-size: .7rem; }

/* ============================================================
   CARD HOVER EFFECTS
   ============================================================ */
.hover-lift { transition: transform .3s ease, box-shadow .3s ease; }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }

/* ============================================================
   RESPONSIVE YARDIMCI
   ============================================================ */
.hide-mobile { display: block; }
.show-mobile { display: none; }

@media (max-width: 768px) {
    .hide-mobile { display: none; }
    .show-mobile { display: block; }
    .modal { max-width: 100%; margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
    .modal-overlay { align-items: flex-end; padding: 0; }
}