/* Ottoman Frontend Styles */

/* Jannah temasının buton/link rengini doğrudan kullan */
:root {
    --ottoman-primary-color: var(--tie-primary-color, var(--jannah-primary-color, var(--primary-color, #2271b1)));
}

.ottoman-details-section {
    margin: 30px 0;
    padding: 20px 0;
}

.ottoman-details-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.ottoman-details-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-row-top {
    grid-template-columns: repeat(2, 1fr);
}

.detail-row-parents {
    grid-template-columns: repeat(2, 1fr);
}

/* Eğer sadece bir item varsa, tam genişlik */
.detail-row:has(.detail-item:only-child) {
    grid-template-columns: 1fr;
}

.detail-item {
    padding: 20px 30px 20px 25px;
    border-radius: 10px;
    border: 1px solid #d0d7e2;
    background: #f7f8fb !important;
    position: relative;
    z-index: 3;
    margin-top: 0;
    overflow: hidden;
}

.detail-label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
}

.detail-value {
    display: block;
    color: #333;
    font-size: 15px;
}

.detail-link {
    color: var(--ottoman-primary-color, #2271b1) !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    font-weight: 600 !important;
}

.detail-link:hover,
.detail-link:visited,
.detail-link:active,
.detail-link:focus {
    color: var(--ottoman-primary-color, #2271b1) !important;
    text-decoration: underline !important;
    border: none !important;
    border-bottom: none !important;
}

/* Period-specific detail link colors */
.ottoman-details-section[data-period="kurulus"] .detail-link {
    color: var(--ottoman-period-kurulus, var(--ottoman-primary-color, #2271b1)) !important;
}

.ottoman-details-section[data-period="yukselme"] .detail-link {
    color: var(--ottoman-period-yukselme, var(--ottoman-primary-color, #2271b1)) !important;
}

.ottoman-details-section[data-period="duraklama"] .detail-link {
    color: var(--ottoman-period-duraklama, var(--ottoman-primary-color, #2271b1)) !important;
}

.ottoman-details-section[data-period="gerileme"] .detail-link {
    color: var(--ottoman-period-gerileme, var(--ottoman-primary-color, #2271b1)) !important;
}

.ottoman-details-section[data-period="dagilma"] .detail-link {
    color: var(--ottoman-period-dagilma, var(--ottoman-primary-color, #2271b1)) !important;
}

/* Period Page Styles */
.ottoman-period-category-section {
    margin: 50px 0;
    padding: 30px 0;
}

.ottoman-period-category-section h2 {
    margin-bottom: 35px;
    color: #1a1a1a;
    font-size: 32px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.ottoman-period-category-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--ottoman-primary-color, #2271b1);
    border-radius: 2px;
}

/* Period-specific colors */
.ottoman-period-category-section[data-period="kurulus"] h2::after {
    background: var(--ottoman-period-kurulus, var(--ottoman-primary-color, #2271b1));
}

.ottoman-period-category-section[data-period="yukselme"] h2::after {
    background: var(--ottoman-period-yukselme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-period-category-section[data-period="duraklama"] h2::after {
    background: var(--ottoman-period-duraklama, var(--ottoman-primary-color, #2271b1));
}

.ottoman-period-category-section[data-period="gerileme"] h2::after {
    background: var(--ottoman-period-gerileme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-period-category-section[data-period="dagilma"] h2::after {
    background: var(--ottoman-period-dagilma, var(--ottoman-primary-color, #2271b1));
}

/* Padişah Grid Tasarımı - WOW! */
.ottoman-padisah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.ottoman-padisah-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0d7e2;
    background: #f7f8fb;
    position: relative;
}

.ottoman-padisah-card::before {
    display: none;
}

.padisah-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    padding: 0;
}

.padisah-card-header {
    padding: 20px 20px 12px 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.padisah-card-title {
    margin: 0;
}

.padisah-card-nickname {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    margin-top: 4px;
}

.padisah-card-reign {
    padding: 14px 20px;
    border-bottom: 2px solid rgba(34, 113, 177, 0.12);
}

.reign-text {
}

.padisah-card-excerpt {
    padding: 16px 20px;
    color: #555;
    line-height: 1.7;
    font-size: 14px;
    margin: 0;
    min-height: 60px;
}

/* Diğer içerik kartları (Valide Sultanlar, Devlet Adamları, vs.) */
.ottoman-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.ottoman-content-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0d7e2;
    background: #f7f8fb;
    position: relative;
}

.ottoman-content-card::before {
    display: none;
}

.content-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    padding: 0;
}

.content-card-header {
    padding: 20px 20px 12px 20px;
    border-bottom: 2px solid rgba(34, 113, 177, 0.12);
}

.content-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ottoman-primary-color, #2271b1);
    margin: 0;
    line-height: 1.3;
}

/* Period-specific content card title colors */
.ottoman-content-grid[data-period="kurulus"] .content-card-title {
    color: var(--ottoman-period-kurulus, var(--ottoman-primary-color, #2271b1));
}

.ottoman-content-grid[data-period="yukselme"] .content-card-title {
    color: var(--ottoman-period-yukselme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-content-grid[data-period="duraklama"] .content-card-title {
    color: var(--ottoman-period-duraklama, var(--ottoman-primary-color, #2271b1));
}

.ottoman-content-grid[data-period="gerileme"] .content-card-title {
    color: var(--ottoman-period-gerileme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-content-grid[data-period="dagilma"] .content-card-title {
    color: var(--ottoman-period-dagilma, var(--ottoman-primary-color, #2271b1));
}

.content-card-excerpt {
    padding: 16px 20px;
    color: #555;
    line-height: 1.7;
    font-size: 14px;
    margin: 0;
    min-height: 60px;
}

/* Diğer kategoriler için normal liste */
.ottoman-period-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ottoman-period-item:last-child {
    border-bottom: none;
}

.ottoman-period-item h3 {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.ottoman-period-link {
    color: #2271b1 !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    font-weight: 600 !important;
}

.ottoman-period-link:hover,
.ottoman-period-link:visited,
.ottoman-period-link:active,
.ottoman-period-link:focus {
    color: #1a5a8a !important;
    text-decoration: underline !important;
    border: none !important;
    border-bottom: none !important;
}

.ottoman-period-item p {
    color: #666;
    line-height: 1.6;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .ottoman-padisah-grid,
    .ottoman-content-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .ottoman-padisah-card,
    .ottoman-content-card {
        border-radius: 10px;
    }
    
    .padisah-card-header,
    .padisah-card-reign,
    .padisah-card-excerpt,
    .content-card-header,
    .content-card-excerpt {
        padding-left: 18px;
        padding-right: 18px;
    }
}


/* Timeline Styles */
.ottoman-timeline-section {
    margin: 50px 0;
    padding: 30px 0;
}

.ottoman-timeline-section h2 {
    margin-bottom: 40px;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    text-align: left !important;
}

.ottoman-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 20px 0;
    min-height: 200px;
}

.ottoman-timeline::before {
    display: none;
}

/* Period-specific timeline colors */
.ottoman-timeline-section[data-period="kurulus"] .ottoman-timeline::before,
.ottoman-timeline-section[data-period="kurulus"] .ottoman-timeline-item::after {
    background: var(--ottoman-period-kurulus, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="yukselme"] .ottoman-timeline::before,
.ottoman-timeline-section[data-period="yukselme"] .ottoman-timeline-item::after {
    background: var(--ottoman-period-yukselme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="duraklama"] .ottoman-timeline::before,
.ottoman-timeline-section[data-period="duraklama"] .ottoman-timeline-item::after {
    background: var(--ottoman-period-duraklama, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="gerileme"] .ottoman-timeline::before,
.ottoman-timeline-section[data-period="gerileme"] .ottoman-timeline-item::after {
    background: var(--ottoman-period-gerileme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="dagilma"] .ottoman-timeline::before,
.ottoman-timeline-section[data-period="dagilma"] .ottoman-timeline-item::after {
    background: var(--ottoman-period-dagilma, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: 80px;
}

.ottoman-timeline-item:nth-child(odd) {
    flex-direction: row;
}

.ottoman-timeline-item:nth-child(odd) .timeline-date {
    order: 1;
    margin-right: 20px;
    margin-left: 0;
}

.ottoman-timeline-item:nth-child(odd) .timeline-content {
    order: 2;
    margin-left: 20px;
    margin-right: 0;
    padding-left: 25px;
}

.ottoman-timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.ottoman-timeline-item:nth-child(even) .timeline-date {
    order: 1;
    margin-left: 20px;
    margin-right: 0;
}

.ottoman-timeline-item:nth-child(even) .timeline-content {
    order: 2;
    margin-right: 20px;
    margin-left: 0;
    padding-right: 30px;
    padding-left: 25px;
}

.ottoman-timeline-item::after {
    display: none;
}

.timeline-date {
    flex: 0 0 200px;
    font-weight: 700;
    color: #fff;
    font-size: 18px;
    padding: 12px 20px;
    background: var(--ottoman-primary-color, #2271b1);
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-top: 9px;
}

/* Period-specific timeline date colors */
.ottoman-timeline-section[data-period="kurulus"] .timeline-date {
    background: var(--ottoman-period-kurulus, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="yukselme"] .timeline-date {
    background: var(--ottoman-period-yukselme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="duraklama"] .timeline-date {
    background: var(--ottoman-period-duraklama, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="gerileme"] .timeline-date {
    background: var(--ottoman-period-gerileme, var(--ottoman-primary-color, #2271b1));
}

.ottoman-timeline-section[data-period="dagilma"] .timeline-date {
    background: var(--ottoman-period-dagilma, var(--ottoman-primary-color, #2271b1));
}

.timeline-content {
    flex: 1;
    padding: 20px 30px 20px 25px;
    border-radius: 10px;
    border: 1px solid #d0d7e2;
    position: relative;
    z-index: 3;
    margin-top: 9px;
    background: #f7f8fb;
    overflow: hidden;
}



.timeline-content h3 {
    margin: 0 0 10px 0;
    padding-left: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    position: relative;
    z-index: 10;
}

.timeline-link {
    color: #2271b1 !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    font-weight: 600 !important;
}

.timeline-link:visited,
.timeline-link:active,
.timeline-link:focus {
    color: #2271b1 !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
}

.timeline-content p {
    color: #666;
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .ottoman-timeline::before {
        left: 30px;
    }
    
    .ottoman-timeline-item {
        flex-direction: column !important;
        padding-left: 60px;
    }
    
    .ottoman-timeline-item::before {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-date {
        flex: none;
        width: 100%;
        margin: 0 0 15px 0;
        order: 1 !important;
    }
    
    .timeline-content {
        order: 2 !important;
        width: 100%;
    }
}

/* Padisah Navigation Widget */
.ottoman-padishah-nav-widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.ottoman-padishah-nav-widget .padishah-nav-item {
    display: block;
}

.ottoman-padishah-nav-widget .padishah-nav-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(120, 140, 170, 0.2);
    text-decoration: none;
    color: #1f2d4a;
    transition: color 0.2s ease;
}

.ottoman-padishah-nav-widget .padishah-nav-row:last-child {
    border-bottom: none;
}

.ottoman-padishah-nav-widget .padishah-nav-meta {
    width: 130px;
    flex-shrink: 0;
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #5a6880;
}

.ottoman-padishah-nav-widget .padishah-nav-text {
    font-size: 16px;
    font-weight: 600;
}

