/**
 * Müşteri Portal Stilleri
 * KVKK Portal Sistemi
 * Referans: kvkk.dolphinmed.com.tr
 */

:root {
    --primary-color: #1a3c5a;
    --primary-dark: #0f2438;
    --primary-light: #2d5a87;
    --accent-color: #4a90d9;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.portal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.portal-header .container {
    max-width: 100%;
    padding: 0 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.company-logo {
    max-height: 55px;
    max-width: 160px;
    object-fit: contain;
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
}

.company-info h1 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.company-info .tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-selector .btn {
    padding: 6px 14px;
    font-size: 13px;
}

.language-selector .dropdown-menu {
    min-width: 120px;
}

/* Main Content - Full Width Layout */
.portal-main {
    flex: 1 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.portal-main > .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.portal-main .row {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    flex: 1;
    align-items: stretch;
}

.portal-main .container-fluid {
    padding: 0;
    flex: 1;
}

.portal-main .col-lg-3 {
    flex: 0 0 var(--sidebar-width);
    max-width: var(--sidebar-width);
    padding: 0;
    margin-left: 0;
}

.portal-main .col-lg-9 {
    flex: 1;
    max-width: calc(100% - var(--sidebar-width));
    width: calc(100% - var(--sidebar-width));
    padding: 0;
}

/* Sidebar - Fixed Left - Koyu mavi tema */
.portal-sidebar {
    position: sticky;
    top: 0;
    min-height: 400px;
    max-height: calc(100vh - 85px);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-right: none;
    padding-top: 0;
    align-self: flex-start;
}

.sidebar-section {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-title {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav li.active a {
    background: var(--accent-color);
    color: white;
}

.sidebar-nav a i {
    width: 16px;
    min-width: 16px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.sidebar-nav li.active a i,
.sidebar-nav a:hover i {
    color: white;
}

.sidebar-nav.files a i {
    color: #ff6b6b;
}

/* Collapsible Sidebar Section */
.sidebar-section.collapsible .sidebar-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.sidebar-section.collapsible .sidebar-title:hover {
    background: rgba(255,255,255,0.15);
}

.sidebar-section.collapsible .toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.sidebar-section.collapsible.expanded .toggle-icon {
    transform: rotate(180deg);
}

.sidebar-nav a span {
    flex: 1;
    word-break: break-word;
}

/* Company Card */
.company-card {
    padding: 16px;
    text-align: center;
}

.company-card-logo {
    max-height: 45px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 8px;
}

.company-card .company-name {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Content Area - Wide */
.portal-content {
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: none;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    flex: 1;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-header h2 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.content-header .btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 6px 14px;
    font-size: 13px;
}

.content-header .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.content-body {
    padding: 30px 40px;
    line-height: 1.8;
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Büyük ekranlar için daha fazla padding */
@media (min-width: 1200px) {
    .content-body {
        padding: 40px 60px;
    }
}

@media (min-width: 1400px) {
    .content-body {
        padding: 50px 80px;
    }
}

.content-body h1, .content-body h2, .content-body h3, 
.content-body h4, .content-body h5, .content-body h6 {
    color: var(--primary-color);
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-body h1:first-child, .content-body h2:first-child {
    margin-top: 0;
}

.content-body p {
    margin-bottom: 16px;
    text-align: justify;
}

.content-body ul, .content-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-body li {
    margin-bottom: 6px;
}

.content-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    min-width: 500px;
}

.portal-content {
    overflow-x: auto;
}

/* İçerik alanının tam genişlik kullanması için */
.content-body img {
    max-width: 100%;
    height: auto;
}

.content-body iframe,
.content-body video {
    max-width: 100%;
    height: auto;
}

.content-body th, .content-body td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.content-body th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Homepage Hero Section */
.homepage-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px;
    color: white;
}

.hero-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: white;
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 12px;
    font-weight: 500;
}

.hero-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Homepage Content */
.homepage-content {
    padding: 30px 40px;
}

/* Info Card */
.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.info-card h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.info-card h4 i {
    color: var(--accent-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-item > i {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    flex-shrink: 0;
}

.info-item > div {
    flex: 1;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
    font-weight: 500;
}

.info-item span {
    font-size: 14px;
    color: var(--text-dark);
}

.info-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* KVKK Cards */
.kvkk-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.kvkk-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.kvkk-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.kvkk-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kvkk-card-icon.red {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.kvkk-card-icon.blue {
    background: linear-gradient(135deg, #0066cc, #004d99);
    color: white;
}

.kvkk-card-icon.purple {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
}

.kvkk-card-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.kvkk-card-icon i {
    font-size: 20px;
}

.kvkk-card-text {
    flex: 1;
}

.kvkk-card-text strong {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Responsive for homepage */
@media (max-width: 991px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item.full-width {
        grid-column: span 1;
    }
    
    .kvkk-cards {
        grid-template-columns: 1fr;
    }
    
    .homepage-content {
        padding: 20px;
    }
    
    .homepage-hero {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 20px;
    }
    
    .kvkk-card {
        padding: 15px;
    }
    
    .kvkk-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .kvkk-card-icon img {
        width: 25px;
        height: 25px;
    }
}

/* Footer - Sticky Bottom */
.portal-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 30px;
    margin-top: auto;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Sol taraf - Koçarslan Logo ve Powered By */
.footer-left {
    display: flex;
    align-items: center;
}

.kocarslan-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.kocarslan-logo-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.kocarslan-logo-wrapper {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kocarslan-logo-link:hover .kocarslan-logo-wrapper {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.kocarslan-logo {
    height: 35px;
    width: auto;
    display: block;
    filter: brightness(0);
}

.powered-by-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.kocarslan-logo-link:hover .powered-by-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Sağ taraf - Footer Text */
.footer-right {
    text-align: right;
}

.footer-text {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 10px;
}

.mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active i {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 991px) {
    .portal-main .row {
        flex-wrap: wrap;
    }
    
    .portal-main .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .portal-main .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .portal-sidebar {
        position: static;
        height: auto;
        border-right: none;
        display: none;
    }
    
    .portal-sidebar.show {
        display: block;
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
    
    .content-body {
        padding: 20px;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .portal-header .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
    }
    
    .company-info h1 {
        font-size: 16px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px 15px;
    }
    
    .content-header h2 {
        font-size: 16px;
    }
    
    .content-body {
        padding: 15px;
        max-width: 100%;
        width: 100%;
        overflow-x: auto;
    }
    
    .content-body table {
        font-size: 13px;
        min-width: 100%;
        display: block;
        overflow-x: auto;
    }
    
    .content-body th, .content-body td {
        padding: 8px 10px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-left {
        justify-content: center;
    }
    
    .footer-right {
        text-align: center;
    }
    
    .kocarslan-logo-link {
        flex-direction: column;
        gap: 8px;
    }
    
    .powered-by-text {
        font-size: 10px;
    }
    
    .portal-footer {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .portal-header,
    .portal-sidebar,
    .portal-footer,
    .content-header .btn {
        display: none !important;
    }
    
    .portal-main .col-lg-3 {
        display: none !important;
    }
    
    .portal-main .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .portal-main {
        padding: 0;
    }
    
    .portal-content {
        box-shadow: none;
    }
    
    .content-header {
        background: white;
        position: static;
    }
    
    .content-header h2 {
        color: var(--primary-color);
    }
    
    .content-body {
        max-width: 100%;
    }
}

/* Scrollbar Styling */
.portal-sidebar::-webkit-scrollbar {
    width: 6px;
}

.portal-sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.portal-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.portal-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}
