/**
 * Kazanç Treni - Main Stylesheet
 * Modern, premium design following the architectural style
 */

/* ==========================================
   CSS Variables / Design Tokens
   ========================================== */
:root {
    /* Colors */
    --color-primary-green: #22c55e;
    --color-premium-white: #fcfcfc;
    --color-deep-text: #0f172a;
    --color-architect-gray: #94a3b8;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-red-200: #fecaca;
    --color-red-300: #fca5a5;
    --color-green-50: #f0fdf4;
    --color-green-700: #15803d;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;

    /* Sizes */
    --max-width: 1400px;
    --nav-height: 48px;
    --min-touch-target: 44px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-full: 9999px;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-premium-white);
    color: var(--color-deep-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   Glass Navigation
   ========================================== */
.glass-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 95%;
    max-width: 1200px;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    min-width: var(--min-touch-target);
    min-height: var(--min-touch-target);
    justify-content: center;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary-green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-slate-500);
    transition: color var(--transition-fast);
    min-height: var(--min-touch-target);
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-deep-text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-btn {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-deep-text);
    min-height: var(--min-touch-target);
    padding: 0 12px;
    display: flex;
    align-items: center;
}

.nav-social {
    color: var(--color-slate-400);
    transition: color var(--transition-fast);
    min-width: var(--min-touch-target);
    min-height: var(--min-touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-social:hover {
    color: #0088cc;
}

.nav-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==========================================
   Decorative Grid Lines
   ========================================== */
.status-panel-divider {
    position: fixed;
    top: 0;
    width: 1px;
    height: 100vh;
    background-color: var(--color-slate-100);
    z-index: -1;
    pointer-events: none;
}

.status-panel-divider:nth-child(1) {
    left: 10%;
}

.status-panel-divider:nth-child(2) {
    left: 50%;
}

.status-panel-divider:nth-child(3) {
    left: 90%;
}

/* ==========================================
   Main Container
   ========================================== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 20px;
    }
}

/* ==========================================
   Header - Index Page
   ========================================== */
.page-header {
    padding: var(--spacing-3xl) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    border-bottom: 1px solid var(--color-slate-200);
}

@media (max-width: 1024px) {
    .page-header {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    margin-bottom: 16px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.header-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-slate-700);
    line-height: 1.4;
    margin-bottom: 12px;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--color-slate-500);
    line-height: 1.5;
}

.header-subtitle strong {
    color: var(--color-primary-green);
    font-weight: 600;
}

.header-highlight {
    font-weight: 600;
    color: var(--color-deep-text);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-green);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.header-stats {
    display: flex;
    justify-content: flex-end;
    gap: 48px;
    border-left: 1px solid var(--color-slate-100);
    padding-left: 80px;
}

@media (max-width: 1024px) {
    .header-stats {
        justify-content: flex-start;
        border-left: none;
        padding-left: 0;
        padding-top: 24px;
        border-top: 1px solid var(--color-slate-100);
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-slate-400);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--color-deep-text);
}

/* ==========================================
   Search Section
   ========================================== */
.search-section {
    padding: var(--spacing-xl) 0;
}

.search-container {
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 0;
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--color-deep-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-slate-200);
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-input::placeholder {
    color: var(--color-slate-300);
}

.search-input:focus {
    border-bottom-color: var(--color-deep-text);
}

/* ==========================================
   Events Table (Desktop)
   ========================================== */
.events-section {
    margin: var(--spacing-2xl) 0 var(--spacing-4xl);
}

.events-table {
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.events-table-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 120px 40px;
    background-color: var(--color-slate-50);
    border-bottom: 1px solid var(--color-slate-200);
}

.table-header-cell {
    padding: 12px 24px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    border-right: 1px solid var(--color-slate-200);
}

.table-header-cell:last-child {
    border-right: none;
}

.table-header-cell.text-center {
    text-align: center;
}

/* Event Row */
.event-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 120px 40px;
    border-bottom: 1px solid var(--color-slate-100);
    transition: background-color var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
}

.event-row:last-child {
    border-bottom: none;
}

.event-row:hover {
    background-color: var(--color-slate-50);
}

.event-row.event-expired {
    opacity: 0.6;
}

.event-cell {
    padding: 24px;
    border-right: 1px solid var(--color-slate-100);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-cell:last-child {
    border-right: none;
}

.event-cell-title {
    gap: 4px;
}

.event-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-deep-text);
}

.event-subtitle {
    font-size: 11px;
    color: var(--color-slate-400);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-cell-date {
    font-size: 12px;
    color: var(--color-slate-600);
    text-align: center;
    align-items: center;
}

.event-cell-status {
    align-items: center;
}

.event-cell-arrow {
    align-items: center;
    justify-content: center;
}

.arrow-hover {
    color: var(--color-slate-300);
    font-size: 14px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-normal);
}

.event-row:hover .arrow-hover {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   Events Cards (Mobile)
   ========================================== */
.events-cards {
    display: none;
}

@media (max-width: 768px) {
    .events-table {
        display: none;
    }

    .events-cards {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

.event-card {
    background: white;
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.event-card.event-expired {
    opacity: 0.6;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.event-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-deep-text);
    line-height: 1.3;
}

.event-card-description {
    font-size: 13px;
    color: var(--color-slate-500);
    line-height: 1.5;
    margin-bottom: 16px;
}

.event-card-meta {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--color-slate-100);
    border-bottom: 1px solid var(--color-slate-100);
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-slate-400);
}

.meta-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-deep-text);
}

.event-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-deep-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: var(--min-touch-target);
}

.event-card-cta .arrow-icon {
    transition: transform var(--transition-fast);
}

.event-card-cta:hover .arrow-icon {
    transform: translateX(4px);
}

/* ==========================================
   Status Badges
   ========================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background-color: var(--color-green-50);
    color: var(--color-green-700);
}

.status-active .status-dot {
    background-color: var(--color-primary-green);
}

.status-passive {
    background-color: var(--color-slate-100);
    color: var(--color-slate-500);
}

.status-passive .status-dot {
    background-color: var(--color-slate-300);
}

.status-expired {
    background-color: #fef2f2;
    color: #b91c1c;
}

.status-expired .status-dot {
    background-color: var(--color-red-200);
}

/* ==========================================
   Event Detail Page
   ========================================== */
#event-detail-container {
    min-height: 60vh;
}

.detail-header {
    padding: var(--spacing-3xl) 0;
    border-bottom: 1px solid var(--color-slate-200);
}

.detail-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.back-button {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    transition: color var(--transition-fast);
    min-height: var(--min-touch-target);
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.back-button:hover {
    color: var(--color-deep-text);
}

.nav-divider {
    color: var(--color-slate-200);
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-slate-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 800px;
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.75rem;
    }
}

/* Detail Content Layout */
.detail-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 80px;
    padding: var(--spacing-3xl) 0 var(--spacing-4xl);
}

@media (max-width: 1024px) {
    .detail-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Sidebar */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

@media (max-width: 1024px) {
    .detail-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 32px;
    }

    .sidebar-meta,
    .sidebar-analysis {
        flex: 1;
        min-width: 250px;
    }
}

.sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.meta-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-block .meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
}

.meta-block .meta-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-deep-text);
}

.sidebar-analysis {
    padding-top: 24px;
    border-top: 1px solid var(--color-slate-100);
}

@media (max-width: 1024px) {
    .sidebar-analysis {
        padding-top: 0;
        border-top: none;
        padding-left: 32px;
        border-left: 1px solid var(--color-slate-100);
    }
}

.sidebar-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    margin-bottom: 24px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-slate-50);
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-label {
    font-size: 12px;
    color: var(--color-slate-500);
}

.analysis-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-deep-text);
}

.analysis-value.text-success {
    color: var(--color-primary-green);
}

/* Main Content */
.detail-main {
    max-width: 720px;
}

.detail-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    margin-bottom: 24px;
}

.detail-paragraph {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-slate-600);
    margin-bottom: 24px;
}

.detail-paragraph:last-child {
    margin-bottom: 0;
}

/* Agenda List */
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agenda-item {
    display: flex;
    gap: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-slate-600);
}

.agenda-step {
    font-weight: 600;
    color: var(--color-primary-green);
    flex-shrink: 0;
}

/* CTA Section */
.detail-cta {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--color-slate-200);
}

.cta-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background-color: var(--color-deep-text);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    transition: background-color var(--transition-fast);
    min-height: var(--min-touch-target);
}

.cta-button:hover {
    background-color: var(--color-slate-700);
}

.cta-disclaimer {
    margin-top: 16px;
    font-size: 10px;
    font-style: italic;
    color: var(--color-slate-400);
    line-height: 1.6;
}

/* ==========================================
   Not Found Page
   ========================================== */
.not-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: var(--spacing-3xl);
}

.not-found-content {
    text-align: center;
    max-width: 400px;
}

.not-found-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: block;
}

.not-found-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-deep-text);
    margin-bottom: 12px;
}

.not-found-text {
    font-size: 14px;
    color: var(--color-slate-500);
    line-height: 1.6;
    margin-bottom: 32px;
}

.not-found-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-deep-text);
    padding: 12px 24px;
    border: 1px solid var(--color-deep-text);
    transition: all var(--transition-fast);
    min-height: var(--min-touch-target);
}

.not-found-link:hover {
    background-color: var(--color-deep-text);
    color: white;
}

/* ==========================================
   No Results
   ========================================== */
.no-results {
    padding: 80px 24px;
    text-align: center;
}

.no-results p {
    font-size: 14px;
    color: var(--color-slate-500);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-slate-100);
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        padding: 32px 20px;
    }
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-link {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
    transition: color var(--transition-fast);
    min-height: var(--min-touch-target);
    display: flex;
    align-items: center;
}

.footer-link:hover {
    color: var(--color-deep-text);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-slate-400);
}

.footer-brand-name {
    font-weight: 700;
    color: var(--color-deep-text);
}

.footer-divider {
    color: var(--color-slate-200);
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-muted {
    color: var(--color-slate-400) !important;
}

.text-muted-light {
    color: var(--color-slate-300) !important;
}

.line-through {
    text-decoration: line-through;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {

    .glass-nav,
    .status-panel-divider,
    .search-section {
        display: none;
    }

    body {
        padding-top: 0;
    }

    .event-row {
        break-inside: avoid;
    }
}