/* Legal/Agreements Page Styles */

.legal-page {
    background: #f8f9fa;
    min-height: 100vh;
    position: relative;
}

.legal-page .main {
    background: transparent;
}

/* Sidebar */
.legal-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 100px;
}

.legal-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #253D4E;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.legal-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-menu li {
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.legal-menu li.active {
    background: linear-gradient(135deg, #3BB77E 0%, #2A9B63 100%);
}

.legal-menu-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #7E7E7E;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.legal-menu li.active .legal-menu-link {
    color: white;
}

.legal-menu li:not(.active):hover {
    background: #f8f9fa;
}

.legal-menu-link i {
    font-size: 18px;
    margin-right: 12px;
    min-width: 20px;
}

/* Content Area */
.legal-content-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 600px;
}

.legal-content-area {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-content-title {
    font-size: 28px;
    font-weight: 700;
    color: #253D4E;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #3BB77E;
}

.legal-content-body {
    color: #555;
    line-height: 1.8;
}

.legal-intro {
    font-size: 16px;
    color: #7E7E7E;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #3BB77E;
    border-radius: 4px;
}

.legal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #253D4E;
    margin-top: 32px;
    margin-bottom: 16px;
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-content strong {
    color: #253D4E;
    font-weight: 600;
}

.legal-footer-note {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.legal-footer-note p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legal-footer-note i {
    color: #3BB77E;
    font-size: 16px;
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Tablet Responsive */
@media (max-width: 991px) {
    .legal-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    
    .legal-content-wrapper {
        padding: 24px;
    }
    .page-content.pt-50 {
        padding-top: 10px !important;
    }
    .legal-content-title {
        font-size: 24px;
    }
    
    .legal-menu-link span {
        font-size: 14px;
    }
    .page-content {
        padding-top: 5px;
    }
}

/* Mobile Bottom Navigation - Hidden by default (Desktop) */
.legal-page .mobile-bottom-nav {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 0.5rem 0;
}

.legal-page .mobile-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.legal-page .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.legal-page .mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.legal-page .mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.legal-page .mobile-nav-item.active {
    color: #3BB77E;
}

.legal-page .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #3BB77E;
    border-radius: 0 0 3px 3px;
}

/* Desktop - Mobile nav kesinlikle gizli */
@media (min-width: 768px) {
    .legal-page .mobile-bottom-nav,
    .legal-mobile-nav,
    .mobile-bottom-nav, .mobile-bottom-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* Tablet Responsive - Continue showing sidebar */
@media (max-width: 991px) and (min-width: 768px) {
    .legal-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    
    .legal-content-wrapper {
        padding: 24px;
    }
}

/* Mobile Responsive - Switch to bottom nav */
@media (max-width: 767px) {
    /* Hide desktop sidebar */
    .legal-sidebar {
        display: none !important;
    }
    
    .legal-page .col-lg-3 {
        display: none !important;
    }
    
    /* Show mobile bottom navigation - STICKY AT BOTTOM */
    .legal-page .mobile-bottom-nav {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: #ffffff !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
        padding: 0.5rem 0 !important;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
        margin: 0 !important;
        transform: translateZ(0) !important; /* GPU acceleration for better sticky performance */
        -webkit-transform: translateZ(0) !important;
    }
    
    /* Full width content on mobile */
    .legal-page .col-lg-9,
    .legal-page .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Add padding at bottom for fixed nav */
    .legal-page .page-content {
        padding-bottom: 6rem !important;
    }
    
    /* Ensure main content doesn't overlap with fixed nav */
    .legal-page {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
    }
    
    /* Content adjustments */
    .legal-content-wrapper {
        padding: 20px 16px;
        margin-bottom: 1rem;
    }
    
    .legal-content-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .legal-intro {
        font-size: 14px;
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .legal-content h3 {
        font-size: 18px;
        margin-top: 24px;
        margin-bottom: 12px;
    }
    
    .legal-content p {
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* Breadcrumb mobile fix */
    .page-header.breadcrumb-wrap {
        padding: 15px 0;
    }
    
    .breadcrumb h1 {
        font-size: 16px !important;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .legal-page .mobile-nav-item i {
        font-size: 1.15rem;
    }
    
    .legal-page .mobile-nav-item span {
        font-size: 0.65rem;
    }
    
    .legal-page .mobile-bottom-nav {
        padding: 0.35rem 0;
    }
    
    .legal-content-wrapper {
        padding: 1rem 0.75rem;
    }
}

