/* ===========================================
   COOKIE CONSENT BANNER
   =========================================== */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #4CAF50;
}

.cookie-consent-banner.cookie-consent-visible {
    bottom: 0;
}

.cookie-consent-banner.cookie-consent-hidden {
    bottom: -100%;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-consent-text i.bi-cookie {
    font-size: 2.5rem;
    color: #4CAF50;
    flex-shrink: 0;
}

.cookie-consent-text p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-policy-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cookie-policy-link:hover {
    color: #81C784;
    text-decoration: underline;
}

.cookie-consent-actions {
    flex-shrink: 0;
}

#cookie-accept-btn {
    background: #4CAF50;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#cookie-accept-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* ===========================================
   MOBILE RESPONSIVENESS
   =========================================== */

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

.container, .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* Hero Section - Better mobile readability */
    .hero-section {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Paper/Content Cards */
    .card {
        margin-bottom: 1rem;
    }

    /* Tables - Horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }

    /* Footer */
    footer .row > div {
        margin-bottom: 1.5rem;
    }

    /* Paper detail page */
    .paper-header h1 {
        font-size: 1.5rem !important;
        word-wrap: break-word;
    }

    .paper-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .paper-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .paper-actions .btn {
        flex: 1 1 auto;
        text-align: center;
        min-width: 120px;
    }

    /* Stats cards */
    .stats-card .stat-value {
        font-size: 1.5rem !important;
    }

    .stats-card .stat-label {
        font-size: 0.75rem !important;
    }

    /* Category badges */
    .category-badge {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Search filters */
    .search-filters .form-control,
    .search-filters .form-select {
        margin-bottom: 0.75rem;
    }

    /* Blog post content */
    .blog-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    /* User profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto 1rem !important;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }
}

/* Extra small devices (phones) */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Cookie banner mobile */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1rem;
        border-top-width: 2px;
    }

    .cookie-consent-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cookie-consent-text {
        flex-direction: column;
        text-align: center;
        min-width: unset;
    }

    .cookie-consent-text i.bi-cookie {
        font-size: 2rem;
    }

    .cookie-consent-text p {
        font-size: 0.875rem;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    #cookie-accept-btn {
        width: 100%;
        padding: 0.875rem 2rem;
    }
}
