/* ============================================
   ANASAYFA MODERN CSS - SEO & PERFORMANCE OPTIMIZED
   ============================================ */

/* === TEMEL YAPILAR === */
.main {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.main-inner {
    padding: 20px 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === HERO HEADER === */
.hero-header {
    padding: 30px;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-radius: 16px;
    border: 1px solid rgba(230, 126, 34, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.hero-content h1 {
    color: #e67e22;
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.hero-content p {
    color: #bdc3c7;
    font-size: 16px;
    margin: 0 auto;
    line-height: 1.6;
    max-width: 900px;
    text-align: center;
}

/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    align-items: start;
}

/* === RATES CONTAINER === */
.rates-container {
    background: linear-gradient(135deg, #1e2738 0%, #273449 100%);
    border-radius: 16px;
    border: 1px solid rgba(230, 126, 34, 0.1);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rates-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    padding: 20px;
    color: white;
    text-align: center;
}

.rates-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* === GRID LAYOUTS === */
.rates-grid,
.forex-grid,
.commodity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    background: #0f1419;
}

.commodity-grid {
    margin-top: 0;
}

/* === RATE & COMMODITY BOXES === */
.rate-box,
.commodity-box {
    background: linear-gradient(145deg, #1e2738 0%, #273449 100%);
    border: 2px solid rgba(230, 126, 34, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    will-change: transform;
    backface-visibility: hidden;
}

.rate-box::before,
.commodity-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e67e22 0%, #d35400 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.rate-box:hover,
.commodity-box:hover {
    text-decoration: none;
    border-color: #e67e22;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(230, 126, 34, 0.25);
}

.rate-box:hover::before,
.commodity-box:hover::before {
    transform: scaleX(1);
}

/* === CARD TOP === */
.card-top,
.commodity-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.currency-name,
.commodity-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
}

/* === CHANGE INDICATORS === */
.change-indicator,
.commodity-change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.change-indicator.negative,
.commodity-change-indicator.negative {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.change-indicator.positive,
.commodity-change-indicator.positive {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 2px solid #2ecc71;
}

.rate-box:hover .change-indicator,
.commodity-box:hover .commodity-change-indicator {
    transform: scale(1.05);
}

/* === MAIN RATE === */
.main-rate,
.commodity-rate {
    text-align: center;
    margin: 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rate-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    font-family: 'Courier New', monospace;
}

.commodity-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    font-family: 'Courier New', monospace;
}

.rate-box:hover .rate-value,
.commodity-box:hover .commodity-value {
    color: #e67e22;
}

.rate-label {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.commodity-label {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}
/* === RATE DETAILS === */
.rate-details,
.commodity-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-item,
.commodity-item {
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    background: rgba(230, 126, 34, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.detail-item.low,
.commodity-item.low {
    border-color: rgba(231, 76, 60, 0.3);
}

.detail-item.high,
.commodity-item.high {
    border-color: rgba(46, 204, 113, 0.3);
}

.detail-item:hover,
.commodity-item:hover {
    transform: translateY(-2px);
    background: rgba(230, 126, 34, 0.1);
}

.detail-label {
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
    font-weight: 600;
}

.detail-item.low .detail-label {
    color: #e74c3c;
}

.detail-item.high .detail-label {
    color: #2ecc71;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
}

/* === FACTORS BOX === */
.factors-box {
    grid-column: span 3;
    background: linear-gradient(145deg, #1e2738 0%, #273449 100%);
    border: 2px solid rgba(230, 126, 34, 0.2);
    border-radius: 16px;
    padding: 25px;
    color: #ffffff;
}

.factors-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: #e67e22;
    margin: 0 0 15px 0;
}

.factors-box p {
    font-size: 15px;
    line-height: 1.7;
    color: #bdc3c7;
    margin: 0 0 15px 0;
}

.factors-box a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.factors-box a:hover {
    color: #d35400;
    text-decoration: underline;
}

/* === SIDEBAR === */
.sidebar {
    display: grid;
    gap: 25px;
}

.widget {
    background: linear-gradient(135deg, #1e2738 0%, #273449 100%);
    border-radius: 16px;
    border: 1px solid rgba(230, 126, 34, 0.1);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.widget-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #e67e22;
}

.widget-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #e67e22;
}

.widget-content {
    padding: 20px;
}

/* === COMMENTS IFRAME === */
.comments-frame {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
    background: #0f1419;
}

/* === ARTICLES GRID === */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 5px;
}

.articles-grid::-webkit-scrollbar {
    width: 5px;
}

.articles-grid::-webkit-scrollbar-track {
    background: rgba(230, 126, 34, 0.1);
    border-radius: 3px;
}

.articles-grid::-webkit-scrollbar-thumb {
    background: #e67e22;
    border-radius: 3px;
}

.article-card {
    background: #1e2738;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(230, 126, 34, 0.1);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.2);
    color: white;
    text-decoration: none;
    border-color: #e67e22;
}

.article-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 15px;
}

.article-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    color: #fff;
}

/* === VIEW ALL BUTTON === */
.view-all-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border: none;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #d35400, #c44d00);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
    color: white;
    text-decoration: none;
}

/* === SIDEBAR CALC BUTTONS === */
.sidebar-calc-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.sidebar-calc-card {
    background: linear-gradient(145deg, #1e2738 0%, #273449 100%);
    border: 2px solid rgba(230, 126, 34, 0.2);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sidebar-calc-card:hover {
    text-decoration: none;
    color: white;
    transform: translateY(-4px);
    border-color: #e67e22;
    box-shadow: 0 12px 25px rgba(230, 126, 34, 0.2);
}

.sidebar-calc-icon {
    font-size: 28px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.sidebar-calc-card:hover .sidebar-calc-icon {
    transform: scale(1.1);
}

.sidebar-calc-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === ANIMASYONLAR === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rate-box.updating .rate-value,
.commodity-box.updating .commodity-value {
    animation: pulse 1s ease-in-out;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .rates-grid,
    .forex-grid,
    .commodity-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .factors-box {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .main-inner {
        padding: 20px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero-header {
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .rates-grid,
    .forex-grid,
    .commodity-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    
    .factors-box {
        grid-column: span 1;
        padding: 20px;
    }
    
    .rate-box,
    .commodity-box {
        padding: 15px;
        min-height: 190px;
    }
    
    .rate-value,
    .commodity-value {
        font-size: 28px;
    }
    
    .currency-name,
    .commodity-name {
        font-size: 16px;
    }
    
    .sidebar-calc-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .articles-grid {
        max-height: 500px;
    }
    
    .comments-frame {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .main-inner {
        padding: 15px 0;
    }
    
    .hero-header {
        padding: 15px;
    }
    
    .hero-content h1 {
        font-size: 20px;
    }
    
    .hero-content p {
        font-size: 13px;
    }
    
    .rate-box,
    .commodity-box {
        padding: 12px;
        min-height: 180px;
    }
    
    .rate-value,
    .commodity-value {
        font-size: 24px;
    }
    
    .currency-name,
    .commodity-name {
        font-size: 15px;
    }
    
    .detail-value {
        font-size: 14px;
    }
    
    .sidebar-calc-card {
        min-height: 80px;
        padding: 12px 8px;
    }
    
    .sidebar-calc-icon {
        font-size: 24px;
    }
    
    .sidebar-calc-title {
        font-size: 12px;
    }
    
    .articles-grid {
        max-height: 400px;
    }
}

/* === PERFORMANS OPTİMİZASYONU === */
* {
    -webkit-tap-highlight-color: transparent;
}

.rate-box,
.commodity-box,
.article-card,
.sidebar-calc-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* === SEO: HIDDEN TEXT === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* === LOADING SKELETON === */
.loading-skeleton {
    background: linear-gradient(90deg, #1e2738 25%, #273449 50%, #1e2738 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
/* === EMTIA DETAY TAŞMA DÜZELTMESİ (Döviz ile Eşitleme) === */
.commodity-details {
    gap: 8px; /* Gap'i biraz daha daralt, yer kazan */
    padding-top: 12px; /* Üst boşluğu azalt */
}

.commodity-item {
    padding: 8px 5px; /* Padding'i döviz'den (10px 8px) küçült – sığsın */
    min-height: 32px; /* Sabit yükseklik ver, grid bozulmasın */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.commodity-item .commodity-label { /* Etiket (Düşük/Yüksek) */
    font-size: 10px; /* 11px'ten küçült */
    letter-spacing: 0.5px; /* Spacing daralt */
    margin-bottom: 2px; /* Alt boşluğu sıkıştır */
}

.commodity-item .commodity-value { /* Fiyat değeri ($71,67 gibi) */
    font-size: 14px; /* 16px'ten 14px'e düşür – sığar, okunaklı kalır */
    line-height: 1.1; /* Satır sıkılaştır */
    overflow: hidden;
    text-overflow: ellipsis; /* Taşanı kes, ... ekle (nadiren lazım olur) */
    white-space: nowrap; /* Tek satıra zorla */
    max-width: 100%; /* Genişlik sınırı */
}

/* Mobile'da ekstra optimize (eğer zoom'da sorun olursa) */
@media (max-width: 768px) {
    .commodity-item .commodity-value {
        font-size: 13px;
    }
    
    .commodity-item {
        padding: 6px 4px;
    }
}

/* Döviz detaylarını koru (değişiklik yok) */
.detail-item .detail-value {
    font-size: 16px; /* Eski hali, dokunma */
}
.news-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(230, 126, 34, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #1a2b4a 0%, #0f1a2e 100%);
    border-radius: 10px;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-item:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #1f3252 0%, #132038 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content h4 {
    color: #e8eaed;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item:hover .news-content h4 {
    color: #e67e22;
}

.news-time {
    color: #8b95a5;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}