/* ===========================================
   Grafik Sayfası - Nurol Portföy Düzeni
   Anatolia Portföy
   =========================================== */

:root {
    --grafik-success: #10b981;
    --grafik-warning: #f59e0b;
    --grafik-danger: #ef4444;
    --grafik-info: #3b82f6;
    --anatolia-portföy-black: #1f2937;
    --anatalia-portföy-blue: #2563eb;
}

/* ⚠️ ÖNEMLİ: Ana şablondan gelen 100px boşluğu eziyoruz */
section.moreport-main-section {
    padding-top: 30px !important; /* 100px yerine 30px */
    padding-bottom: 30px !important; /* 100px yerine 30px */
}

/* Eğer hero'dan sonraki ilk bölümse biraz daha az boşluk bırakabiliriz */
section.moreport-main-section:first-of-type {
    padding-top: 10px !important;
}

/* ===========================
   HERO SECTION
   =========================== */

.grafik-hero-video {
    filter: saturate(1.05) contrast(1.05);
}

.grafik-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, .55) 100%);
    pointer-events: none;
}

.grafik-fund-code {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.grafik-hero-title {
    font-size: 36px !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
}

.grafik-hero-subtitle {
    font-size: 16px !important;
    opacity: 0.85;
    font-weight: 400 !important;
}

@media (max-width: 767px) {
    .grafik-hero-title {
        font-size: 28px !important;
    }

    .grafik-hero-subtitle {
        font-size: 14px !important;
    }
}

/* ===========================
   MAIN INFO CARD (Fon Kodu, Fiyat vb.)
   =========================== */

.grafik-main-info-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.grafik-main-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 991px) {
    .grafik-main-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .grafik-main-info-grid {
        grid-template-columns: 1fr;
    }
}

.grafik-main-info-item {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.grafik-main-info-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: arpona, sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
}

.grafik-main-info-value-big {
    font-size: 20px;
    font-weight: 700;
    color: var(--anatalia-portföy-blue);
    font-family: arpona, sans-serif;
}

.grafik-main-info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
}

/* ===========================
   TWO COLUMN LAYOUT (Yan Yana Ayrı Kartlar)
   =========================== */

.grafik-two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* İki eşit sütun */
    gap: 32px; /* Kartlar arası boşluk */
    align-items: stretch; /* Kartların boyunu eşitle */
}

/* Tablet ve mobilde alt alta düşsün */
@media (max-width: 991px) {
    .grafik-two-column-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Kartların Genel Yapısı - Büyütüldü */
.grafik-info-card {
    background: white;
    border-radius: 16px;
    padding: 40px; /* İç ferahlık artırıldı */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    height: 100%; /* Boyu eşitlemek için */
    display: flex;
    flex-direction: column;
}

.h-full {
    height: 100%;
}

.grafik-info-card h3 {
    margin-bottom: 24px;
    font-size: 18px; /* Başlık biraz belirginleşti */
    font-weight: 700;
}

/* Info Grid (Sol Kart İçeriği) */
.grafik-info-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grafik-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.grafik-info-item:last-child {
    border-bottom: none;
}

.grafik-info-item-full {
    flex-direction: column;
    gap: 8px;
}

.grafik-info-item-label {
    font-size: 13px;
    color: #6b7280;
    font-family: arpona, sans-serif;
    font-weight: 500;
}

.grafik-info-item-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
    text-align: right;
}

.grafik-info-item-full .grafik-info-item-value {
    text-align: left;
}

/* Distribution Layout (Sağ Kart İçeriği) */
.grafik-distribution-layout {
    display: flex;
    gap: 32px; /* Pasta grafik ile liste arası */
    align-items: center;
    flex: 1;
}

/* Pasta Grafiğin Boyutu */
.grafik-chart-pie {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

.grafik-distribution-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.grafik-distribution-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px; /* Yazı boyutu bir tık arttı */
}

.grafik-distribution-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.grafik-distribution-name {
    flex: 1;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
}

.grafik-distribution-value {
    font-weight: 700;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
}

/* Mobilde düzenlemeler */
@media (max-width: 767px) {
    .grafik-distribution-layout {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .grafik-info-card {
        padding: 24px; /* Mobilde padding'i normale döndür */
    }
}

/* Badges */
.grafik-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: arpona, sans-serif;
}

.grafik-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.grafik-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ===========================
   PERFORMANCE CARD
   =========================== */

.grafik-performance-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.grafik-performance-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 1200px) {
    .grafik-performance-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .grafik-performance-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grafik-perf-row-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.grafik-perf-row-header:hover {
    border-color: var(--anatalia-portföy-blue);
    box-shadow: 0 4px 12px rgba(47, 57, 216, 0.1);
}

.grafik-perf-label-main {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: arpona, sans-serif;
}

.grafik-perf-value-main {
    font-size: 24px;
    font-weight: 700;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
}

.grafik-perf-value-main.positive,
.grafik-perf-value-deposit.positive {
    color: var(--grafik-success);
}

.grafik-perf-value-main.negative,
.grafik-perf-value-deposit.negative {
    color: var(--grafik-danger);
}

.grafik-performance-card .moreport-h4 {
    margin-bottom: 24px;
    margin-left: 0;
    padding-left: 0;
}

.grafik-performance-divider {
    margin: 50px 0 24px 0;
    padding: 0;
    text-align: left;
    border: none;
}

.grafik-performance-divider span {
    font-size: 16px;
    font-weight: 700;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
    display: block;
}

.grafik-performance-row-deposit .grafik-perf-row-header {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #d1fae5;
}

.grafik-perf-value-deposit {
    font-size: 24px;
    font-weight: 700;
    color: var(--grafik-success);
    font-family: arpona, sans-serif;
}

.grafik-perf-unit {
    font-size: 11px;
    color: #9ca3af;
    font-family: arpona, sans-serif;
}

/* ===========================
   DOCUMENTS ACCORDION
   =========================== */

.grafik-documents-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grafik-accordion-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.grafik-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
    transition: all 0.2s ease;
}

.grafik-accordion-header:hover {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
}

.grafik-accordion-icon {
    transition: transform 0.3s ease;
    color: #6b7280;
}

.grafik-accordion-item.active .grafik-accordion-icon {
    transform: rotate(180deg);
}

.grafik-accordion-item.active .grafik-accordion-header {
    background: var(--anatalia-portföy-blue);
    color: white;
}

.grafik-accordion-item.active .grafik-accordion-icon {
    color: white;
}

.grafik-accordion-content {
    display: none;
    padding: 0;
}

.grafik-accordion-item.active .grafik-accordion-content {
    display: block;
}

.grafik-document-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.grafik-document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.grafik-document-item:hover {
    border-color: var(--anatalia-portföy-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.grafik-document-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grafik-document-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--anatolia-portföy-black);
    font-family: arpona, sans-serif;
}

.grafik-document-date {
    font-size: 12px;
    color: #6b7280;
    font-family: arpona, sans-serif;
}

.grafik-document-actions {
    display: flex;
    gap: 16px;
}

.grafik-document-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--anatalia-portföy-blue);
    text-decoration: none;
    font-family: arpona, sans-serif;
    transition: color 0.2s;
}

.grafik-document-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* ===========================
   CHART CARD & CALCULATOR
   =========================== */

.grafik-chart-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.grafik-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.grafik-period-tabs {
    display: flex;
    gap: 6px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 6px;
    border-radius: 24px;
}

.grafik-period-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: arpona, sans-serif;
    color: #6b7280;
    transition: all 0.25s ease;
}

.grafik-period-tab:hover {
    background: white;
    color: var(--anatalia-portföy-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grafik-period-tab.active {
    background: var(--anatalia-portföy-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(47, 57, 216, 0.3);
}

.grafik-chart-area {
    position: relative;
    height: 350px;
    margin-bottom: 20px;
}

.grafik-legend-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.grafik-legend-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-family: arpona, sans-serif;
    color: #6b7280;
    padding: 8px 14px;
    background: white;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.grafik-legend-checkbox:hover {
    border-color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.grafik-legend-checkbox input {
    display: none;
}

.grafik-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grafik-legend-checkbox input:not(:checked) + .grafik-legend-color {
    opacity: 0.3;
}

/* Benchmark Selector */
.grafik-benchmark-selector {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.grafik-benchmark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
}

.grafik-benchmark-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grafik-benchmark-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    font-family: arpona, sans-serif;
}

.grafik-benchmark-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--anatalia-portföy-blue);
    cursor: pointer;
}

/* Calculator */
.grafik-calculator-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid #e5e7eb;
}

.grafik-calculator-title {
    font-size: 16px;
    font-weight: 600;
    font-family: arpona, sans-serif;
    margin-bottom: 20px;
}

.grafik-calculator-form {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.grafik-calculator-input-group {
    flex: 1;
    min-width: 250px;
}

.grafik-calculator-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    display: block;
}

.grafik-calculator-inputs {
    display: flex;
    gap: 8px;
}

.grafik-input, .grafik-select {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: arpona, sans-serif;
    background: white;
}

.grafik-input {
    flex: 1;
}

.grafik-select {
    min-width: 100px;
}

.grafik-select-sm {
    min-width: 120px;
}

.grafik-calculator-result-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 10px;
    border: 2px solid #d1fae5;
}

.grafik-calculator-result-value {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: var(--grafik-success);
    font-family: arpona, sans-serif;
}

/* ERROR BOX */
.grafik-error-box {
    text-align: center;
    padding: 60px 20px;
    background: #fef2f2;
    border-radius: 12px;
}

.grafik-calculator-arrow {
    color: var(--anatalia-portföy-blue);
    flex-shrink: 0;
    margin-top: 28px;
}

@media (max-width: 767px) {
    .grafik-calculator-arrow {
        transform: rotate(90deg);
        align-self: center;
        margin-top: 0;
        margin-bottom: 12px;
    }
}

/* ===========================
   PEER COMPARISON TABLE
   =========================== */

.grafik-table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.grafik-peer-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.grafik-peer-table th {
    background: #f8fafc;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: arpona, sans-serif;
    border-bottom: 1px solid #e5e7eb;
}

.grafik-peer-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.grafik-peer-table tr:last-child td {
    border-bottom: none;
}

.grafik-peer-table tbody tr:hover {
    background-color: #f8fafc;
}

.grafik-peer-table tr.current-fund-row {
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
    border-left: 4px solid var(--anatalia-portföy-blue);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.grafik-peer-table tr.current-fund-row td {
    font-weight: 700;
    color: var(--anatalia-portföy-blue);
    background-color: transparent;
}

.peer-fund-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grafik-peer-table tr.current-fund-row .risk-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.peer-code {
    font-weight: 700;
    color: var(--anatalia-portföy-blue);
    font-size: 14px;
    font-family: arpona, sans-serif;
}

.peer-name {
    font-size: 12px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.font-numeric {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--grafik-success);
}

.text-danger {
    color: var(--grafik-danger);
}

.risk-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.risk-badge.risk-6, .risk-badge.risk-7 {
    background: #fee2e2;
    color: #b91c1c;
}

.risk-badge.risk-1, .risk-badge.risk-2 {
    background: #d1fae5;
    color: #065f46;
}