/**
 * Index Page Specific Styles
 * Antalya Tüccarlar Derneği
 */

/* Background optimization - GPU hızlandırma (style.css'deki global ayarlar kullanılıyor) */
body, html {
    /* Performans için GPU hızlandırma */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Container fixes - Bootstrap override */
body section.container,
body div.container,
body .container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure all sections are properly contained */
.featured-news-section.container,
.fiyatlar-section.container,
.uye-ol.container,
.baskan.container {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Featured News Carousel */
.featured-news-section {
    margin: 2rem 0;
}

.featured-news-carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-news-card {
    display: flex;
    background: #fff;
    min-height: 300px;
}

.featured-news-image {
    flex: 0 0 40%;
    position: relative;
    overflow: hidden;
}

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

.featured-news-body {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.featured-news-body h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.featured-news-body h3 a {
    color: #2f3540;
    text-decoration: none;
    transition: color 0.3s;
}

.featured-news-body h3 a:hover {
    color: #ff5a00;
}

.featured-news-body p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-featured-news {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #ff5a00;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
    align-self: flex-start;
}

.btn-featured-news:hover {
    background: #e04a00;
    color: #fff;
}

/* Fiyatlar Section */
.fiyatlar-section {
    margin: 3rem 0;
}

.fiyatlar-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fiyatlar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.fiyatlar-heading h2 {
    margin: 0 0 0.5rem 0;
    color: #2f3540;
}

.fiyatlar-heading p {
    margin: 0;
    color: #666;
}

.fiyatlar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.fiyatlar-date-form {
    display: inline-block;
}

.fiyatlar-select {
    min-width: 200px;
}

.fiyatlar-excel-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #28a745;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.fiyatlar-excel-btn:hover {
    background: #218838;
    color: #fff;
}

/* Fiyatlar Table */
.fiyatlar-table {
    margin-bottom: 2rem;
}

.fiyatlar-table-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #2f3540;
}

.fiyatlar-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

.fiyatlar-row:last-child {
    border-bottom: none;
}

.fiyatlar-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fiyatlar-product-image-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fiyatlar-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: opacity 0.4s ease, transform 0.3s ease;
    background: #f8f9fa;
    will-change: opacity;
}

.fiyatlar-product-image-wrapper:hover .fiyatlar-product-image {
    transform: scale(1.05);
}

.fiyatlar-product-image-wrapper picture,
.fiyatlar-product-image-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
}

.fiyatlar-product-image-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    color: #adb5bd;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Lazy loading animasyonu */
.fiyatlar-product-image[loading="lazy"] {
    opacity: 0;
    animation: fadeInImage 0.4s ease forwards;
}

.fiyatlar-product-image.loaded {
    opacity: 1;
}

/* Skeleton loader efekti */
@keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.fiyatlar-product-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    opacity: 0;
    pointer-events: none;
}

.fiyatlar-product-image-wrapper:has(img[loading="lazy"]:not(.loaded))::before {
    opacity: 1;
}

.fiyatlar-price {
    font-weight: 600;
    color: #2f3540;
}

.fiyat-diff {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.fiyat-diff--up {
    color: #28a745;
}

.fiyat-diff--down {
    color: #dc3545;
}

.fiyatlar-unit {
    color: #666;
    font-size: 0.9rem;
}

.fiyatlar-trend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.fiyatlar-trend-card {
    padding: 1.5rem;
    border-radius: 8px;
}

.fiyatlar-trend-card--up {
    background: linear-gradient(135deg, #28a745, #34ce57);
    border: 1px solid #1e7e34;
}

.fiyatlar-trend-card--down {
    background: linear-gradient(135deg, #dc3545, #e4606d);
    border: 1px solid #c82333;
}

.fiyatlar-trend-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.fiyatlar-trend-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fiyatlar-trend-item:last-child {
    border-bottom: none;
}

.fiyatlar-trend-title {
    color: #fff;
    font-weight: 600;
}

.fiyatlar-trend-value {
    font-weight: 700;
    color: #fff;
}

.fiyatlar-trend-value em {
    font-style: normal;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 0.5rem;
}

/* Üyelik Section */
.uye-ol {
    margin: 3rem 0;
}

.uye-ol .uyelikler {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.uye-ol .uyelik {
    text-align: center !important;
    padding: 2rem !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
    border: 1px solid #ece9e9 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.uye-ol .uyelik:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.uye-ol .uyelik a {
    display: block !important;
    color: #2f3540 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.uye-ol .uyelik i {
    font-size: 3rem !important;
    color: #ff5a00 !important;
    margin-bottom: 1rem !important;
    display: block !important;
    float: none !important;
    margin-right: 0 !important;
}

.uye-ol .uye-duyuru {
    background: #fff !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    text-align: center !important;
    color: #666 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Yönetim Section */
.yonetim {
    margin: 3rem 0;
    padding: 0;
    clear: both;
    display: block;
    width: 100%;
}

section.container .yonetim {
    margin: 3rem 0;
}

section.container .yonetim:first-of-type {
    margin-top: 0;
}

.yonetim-baslik {
    text-align: left !important;
    margin-bottom: 50px !important;
    position: relative;
    padding-left: 0;
}

.yonetim-baslik h2 {
    color: #2f3540;
    font-size: 2rem;
    font-weight: 700 !important;
    margin: 0;
    display: block;
    position: relative;
    text-align: left !important;
}

/* Yeşil çizgi style.css'deki h2:before ile zaten var, sadece text-align düzeltiyoruz */

.yonetim-ic {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: #fff;
    transition: transform 0.3s;
}

.yonetim-ic:hover {
    transform: translateY(-5px);
}

.yonetim-photo {
    margin-bottom: 1rem;
}

.yonetim-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ff5a00;
}

.yonetim-ic h2 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem 0;
    color: #2f3540;
}

.yonetim-ic p {
    color: #666;
    margin: 0;
}

/* Gündem Section */
.gundem {
    background: transparent;
    padding: 3rem 0;
    margin: 3rem 0;
}

.gundem .container {
    padding-left: 15px;
    padding-right: 15px;
}

.gundem-baslik {
    text-align: left !important;
    margin-bottom: 20px !important;
    color: #666;
    position: relative;
}

.gundem-baslik b {
    color: #2f3540;
    font-size: 2rem !important;
    font-weight: 700 !important;
    display: block;
    position: relative;
    margin-bottom: 0.5rem;
}

/* Yeşil çizgi - yönetim başlıkları gibi */
.gundem-baslik b::before {
    position: absolute;
    content: "";
    left: 0;
    bottom: -5px;
    height: 3px;
    width: 135px;
    background: #2a7802;
}

.gundem-baslik p {
    margin: 0;
}

.news-grid {
    margin-top: 0.5rem;
}

.news-grid-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.news-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-grid-image {
    position: relative;
    display: block;
    overflow: hidden;
    height: 200px;
}

.news-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-grid-card:hover .news-grid-image img {
    transform: scale(1.1);
}

.news-grid-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff5a00;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-grid-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-grid-title {
    margin: 0 0 1rem 0;
}

.news-grid-title a {
    color: #2f3540;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.news-grid-title a:hover {
    color: #ff5a00;
}

.news-grid-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.news-grid-date {
    color: #999;
    font-size: 0.9rem;
    margin-top: auto;
}

.news-grid-more {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #ff5a00;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.news-grid-more:hover {
    background: #e04a00;
    color: #fff;
}

/* Başkan Section */
.baskan {
    margin: 3rem 0;
}

.baskan-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.baskan-figure {
    position: relative;
    overflow: hidden;
}

.baskan-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.baskan-info-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.baskan-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.baskan-stat-card {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.baskan-stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.baskan-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ff5a00;
}

.baskan-message-block {
    flex: 1;
}

.baskan-message {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.imzasi {
    text-align: right;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.imzasi p {
    margin: 0;
    color: #2f3540;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-news-card {
        flex-direction: column;
    }
    
    .featured-news-image {
        flex: 0 0 200px;
    }
    
    .fiyatlar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fiyatlar-table-head,
    .fiyatlar-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .fiyatlar-trend {
        grid-template-columns: 1fr;
    }
    
    .baskan-stats-grid {
        grid-template-columns: 1fr;
    }
}

