/* ========================================
   Public Layout Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2ECC71;
    --primary-dark: #27AE60;
    --primary-light: #58D68D;
    --dark-color: #1a1a2e;
    --gradient-start: #1a1a2e;
    --gradient-mid: #16213e;
    --gradient-end: #0f3460;
}

/* Base Styles */
body {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    background-attachment: fixed;
    color: white;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Navbar Styles */
.navbar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    transition: all 0.3s;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-brand i {
    color: var(--primary-color);
    margin-right: 10px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: white !important;
}

.btn-login {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-login:hover {
    background: white;
    color: var(--dark-color);
}

.btn-signup {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-signup:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 100px;
    padding-bottom: 50px;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 60px 0 30px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-brand i {
    color: var(--primary-color);
}

.footer-text {
    opacity: 0.7;
    font-size: 0.95rem;
}

.footer-links h5 {
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 30px;
    text-align: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Install PWA Button */
.install-pwa {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 10px 40px rgba(46, 204, 113, 0.6); }
}

/* Page Content Styling */
.page-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-content h1, .page-content h2, .page-content h3,
.page-content h4, .page-content h5, .page-content h6 {
    color: white;
    margin-bottom: 1rem;
}

.page-content .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.page-content .form-control,
.page-content .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.page-content .form-control:focus,
.page-content .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(46, 204, 113, 0.25);
}

.page-content .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.page-content .form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.page-content .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.page-content .alert {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.page-content .alert-success {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.5);
}

.page-content .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Prose/Content Styling for CMS Pages */
.prose {
    line-height: 1.8;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: white;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose h1 { font-size: 2.5rem; }
.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.75rem; }
.prose h4 { font-size: 1.5rem; }
.prose h5 { font-size: 1.25rem; }
.prose h6 { font-size: 1rem; }

.prose p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.prose strong, .prose b {
    color: white;
    font-weight: 600;
}

.prose a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.prose a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* Override any inline button styles in CMS content */
.prose a[href*="register"],
.prose a[href*="login"],
.prose .btn,
.prose button {
    display: inline-block;
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid var(--primary-color) !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    margin: 10px 5px !important;
}

.prose a[href*="register"]:hover,
.prose a[href*="login"]:hover,
.prose .btn:hover,
.prose button:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4) !important;
}

/* Fix any light backgrounds in CMS content */
.prose div[style*="background"],
.prose section[style*="background"],
.prose .bg-light,
.prose .bg-white {
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ensure all text in prose is visible */
.prose * {
    color: rgba(255, 255, 255, 0.9);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: white !important;
}

.prose blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(46, 204, 113, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.prose code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-light);
}

.prose pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

.prose hr {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.prose table th,
.prose table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prose table th {
    background: rgba(46, 204, 113, 0.2);
    font-weight: 600;
    color: white;
}

.prose table tr:last-child td {
    border-bottom: none;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Responsive */
@media (max-width: 991px) {
    .main-content {
        padding-top: 80px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 20px;
    }
}

/* ========================================
   Dark Page — Bootstrap Utility Overrides
   ======================================== */
.dark-page .text-primary { color: var(--primary-color) !important; }
.dark-page .text-muted { color: rgba(255, 255, 255, 0.6) !important; }
.dark-page .bg-light,
.dark-page .bg-white { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255,255,255,0.1); }
.dark-page .table:not(.table-dark) {
    --bs-table-bg: rgba(255, 255, 255, 0.05);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.07);
    --bs-table-border-color: rgba(255, 255, 255, 0.15);
    color: white;
}
.dark-page .alert-info {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.3);
    color: rgba(255, 255, 255, 0.9);
}
.dark-page .alert-info a { color: var(--primary-color); }
.dark-page .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.dark-page .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.dark-page .badge.bg-danger { background: rgba(220,53,69,0.8) !important; }
.dark-page .badge.bg-success { background: rgba(46,204,113,0.8) !important; }
