/* CYAD Blog - Custom Styles */

:root {
    /* Professional Color Palette */
    --primary-color: #1e3a8a;        /* Navy Blue */
    --primary-dark: #1e40af;         /* Darker Navy */
    --primary-light: #3b82f6;        /* Light Blue */
    --secondary-color: #64748b;      /* Slate Gray */
    --accent-color: #0f766e;         /* Teal */
    --accent-light: #14b8a6;         /* Light Teal */
    --success-color: #059669;        /* Green */
    --danger-color: #dc2626;         /* Red */
    --warning-color: #d97706;        /* Orange */
    --info-color: #0284c7;           /* Sky Blue */
    --light-color: #f8fafc;          /* Very Light Gray */
    --dark-color: #1e293b;           /* Dark Slate */
    --text-primary: #0f172a;         /* Almost Black */
    --text-secondary: #475569;       /* Medium Gray */
    --text-muted: #94a3b8;           /* Light Gray */
    --border-color: #e2e8f0;         /* Light Border */
    
    /* Professional Gradients */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #64748b 0%, #475569 100%);
    --gradient-accent: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-info: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
    
    /* Professional Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
}

/* Typography */
.display-4, .display-5 {
    font-weight: 700;
    line-height: 1.2;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand span {
    transform: translateY(2px);
}

/* Logo scaling - control SVG size independently */
.navbar-brand img {
    height: 40px !important;
    width: auto !important;
    max-width: none !important;
    transform: scale(3.5);
    transform-origin: center;
    filter: brightness(0) invert(1);
}

/* Admin panel logo scaling */
.sidebar-header img {
    height: 30px !important;
    width: auto !important;
    max-width: none !important;
    transform: scale(3.5);
    transform-origin: center;
    filter: brightness(0) invert(1);
}

/* Login/Register page logo scaling */
.login-header img,
.register-header img {
    height: 60px !important;
    width: auto !important;
    max-width: none !important;
    transform: scale(3.5);
    transform-origin: center;
    filter: brightness(0) invert(1);
}

/* Footer logo scaling */
.footer-logo {
    height: 50px !important;
    width: auto !important;
    max-width: none !important;
    transform: scale(2.2);
    transform-origin: center;
    filter: brightness(0) invert(1);
}

.footer h5 span {
    transform: translateY(2px);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-stats .stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Category Cards */
.category-card .card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.category-card .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Post Cards */
.post-card .card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.post-card .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card .card-img-top {
    transition: all 0.3s ease;
}

.post-card:hover .card-img-top {
    transform: scale(1.05);
}

.post-meta .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.post-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    border: none;
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    border: none;
    color: white;
}

.btn-info {
    background: var(--gradient-info);
    border: none;
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--dark-color);
    position: relative;
}

.newsletter-form .form-control {
    border-radius: 8px 0 0 8px;
    border: none;
    padding: 0.75rem 1rem;
}

.newsletter-form .btn {
    border-radius: 0 8px 8px 0;
}

/* Footer Newsletter Form */
.footer-newsletter-form .form-control {
    border-radius: 8px 0 0 8px;
    border: 1px solid #495057;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-newsletter-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 0.15);
}

.footer-newsletter-form .btn {
    border-radius: 0 8px 8px 0;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.footer-newsletter-form .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    border-top: 1px solid var(--border-color);
}

.footer a {
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-light) !important;
    text-decoration: underline;
}

.footer h5, .footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer p, .footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.6;
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 0.75rem;
    text-decoration: none;
}

.social-links a:last-child {
    margin-right: 0;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white !important;
}

/* Utility Classes */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .category-card .card,
    .post-card .card {
        margin-bottom: 1rem;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.15);
    background: white;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.15);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.badge-success {
    background: var(--gradient-success);
    color: white;
}

.badge-danger {
    background: var(--gradient-danger);
    color: white;
}

.badge-warning {
    background: var(--gradient-warning);
    color: white;
}

.badge-info {
    background: var(--gradient-info);
    color: white;
}

/* Card Styles */
.card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-header {
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px !important;
}

/* Text Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Breadcrumb Styles */
.breadcrumb-section {
    border-bottom: 1px solid var(--border-color);
    margin-top: 76px !important;
    background: var(--light-color);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
    font-weight: bold;
    margin: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Professional Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-secondary {
    background: var(--gradient-secondary) !important;
}

.bg-light {
    background: var(--light-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-light {
    border-color: var(--border-color) !important;
}

/* Professional Spacing */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.py-7 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Professional Typography */
.fw-semibold {
    font-weight: 600 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.text-sm {
    font-size: 0.875rem !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

/* Hide TinyMCE promotion badge (fallback) */
.tox-statusbar__right-container .tox-statusbar__branding,
.tox-promotion,
.tox-statusbar__branding {
	display: none !important;
}
