/* Article Page Styles */

/* Article Header */
.article-header {
    position: relative;
    min-height: 50vh;
    margin-top: 76px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, var(--sfe-dark) 0%, var(--sfe-dark-gray) 50%, var(--sfe-dark) 100%);
    overflow: hidden;
}

.article-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.article-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    z-index: 2;
}

.article-header-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 3rem 0;
}

/* Breadcrumb */
.article-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.article-breadcrumb .breadcrumb-item a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb .breadcrumb-item a:hover {
    color: var(--sfe-orange);
}

.article-breadcrumb .breadcrumb-item.active {
    color: #ffffff;
}

.article-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-category {
    background: var(--sfe-orange);
    color: #ffffff;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.article-date,
.article-read-time {
    color: #adb5bd;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Article Title */
.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    max-width: 800px;
}

/* Article Author */
.article-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Article Body */
.article-body {
    background-color: var(--sfe-dark-gray);
}

.article-featured-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Article Content */
.article-content {
    color: #d1d5db;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.05));
    border-left: 4px solid var(--sfe-orange);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #ffffff;
}

.article-content a {
    color: var(--sfe-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: #e55a2b;
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--sfe-light-gray);
}

.article-tags .tag {
    background: var(--sfe-gray);
    color: #adb5bd;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: var(--sfe-orange);
    color: #ffffff;
}

/* Share Section */
.article-share {
    padding-top: 1.5rem;
    border-top: 1px solid var(--sfe-light-gray);
}

.share-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0a66c2; }
.share-whatsapp { background: #25d366; }
.share-copy { background: var(--sfe-gray); }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #ffffff;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: linear-gradient(135deg, var(--sfe-gray) 0%, var(--sfe-dark) 100%);
    border: 1px solid var(--sfe-light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--sfe-orange);
}

/* Author Card */
.author-card {
    text-align: center;
}

.author-card-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.author-card-name {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-card-bio {
    color: #adb5bd;
    font-size: 0.9rem;
    line-height: 1.6;
}

.author-card-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.author-card-social a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--sfe-dark-gray);
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-card-social a:hover {
    background: var(--sfe-orange);
    color: #ffffff;
}

/* Related Articles */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-item:hover .related-title {
    color: var(--sfe-orange);
}

.related-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    flex: 1;
}

.related-title {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.related-date {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Categories */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--sfe-dark-gray);
    border-radius: 8px;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: var(--sfe-orange);
    color: #ffffff;
}

.category-count {
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* CTA Card */
.cta-card {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.1));
    border-color: rgba(255, 107, 53, 0.3);
}

.cta-icon {
    font-size: 2.5rem;
    color: var(--sfe-orange);
    margin-bottom: 1rem;
}

.cta-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cta-text {
    color: #adb5bd;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cta-card .btn-block {
    width: 100%;
}

/* Article Navigation */
.article-navigation {
    background: var(--sfe-dark);
    border-top: 1px solid var(--sfe-light-gray);
}

.nav-article {
    display: block;
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-article:hover {
    background: var(--sfe-gray);
}

.nav-label {
    display: block;
    color: var(--sfe-orange);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.nav-next {
    text-align: right;
}

/* Responsive */
@media (max-width: 992px) {
    .article-sidebar {
        position: static;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.75rem;
    }

    .article-header {
        min-height: 40vh;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.4rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .article-title {
        font-size: 1.5rem;
    }

    .article-meta {
        gap: 0.5rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .nav-title {
        font-size: 0.9rem;
    }
}

/* =================================== */
/* THEME TOGGLE BUTTON */
/* =================================== */

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--sfe-orange);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: rgba(255, 107, 53, 0.15);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn .theme-icon-light,
.theme-toggle-btn .theme-icon-dark {
  position: absolute;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark mode: show sun icon (to switch to light) */
.dark-mode .theme-toggle-btn .theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--sfe-orange);
}

.dark-mode .theme-toggle-btn .theme-icon-dark {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Light mode: show moon icon (to switch to dark) */
.light-mode .theme-toggle-btn .theme-icon-light {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

.light-mode .theme-toggle-btn .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--sfe-orange);
}

/* =================================== */
/* LIGHT MODE STYLES */
/* =================================== */

/* Light mode variables */
.light-mode {
  --lm-bg-primary: #ffffff;
  --lm-bg-secondary: #f8f9fa;
  --lm-bg-tertiary: #e9ecef;
  --lm-bg-card: #ffffff;
  --lm-text-primary: #1a1a1a;
  --lm-text-secondary: #4a4a4a;
  --lm-text-muted: #6c757d;
  --lm-border: #dee2e6;
}

/* Body styles for light mode */
.light-mode {
  background-color: var(--lm-bg-primary);
  color: var(--lm-text-primary);
}

/* NAVBAR - Light Mode */
.light-mode .navbar {
  background-color: var(--lm-bg-primary) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-mode .navbar-nav .nav-link {
  color: var(--lm-text-primary) !important;
}

.light-mode .navbar-nav .nav-link:hover,
.light-mode .navbar-nav .nav-link.active {
  color: var(--sfe-orange) !important;
}

.light-mode .brand-text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .navbar-toggler {
  border-color: var(--lm-text-secondary);
}

.light-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 26, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dark mode navbar brand text */
.dark-mode .brand-text-white {
  color: #ffffff !important;
}

/* ARTICLE HEADER - Keep dark for visual impact */
.light-mode .article-header {
  /* Keep header dark for visual impact with the gradient */
}

.light-mode .article-header .article-title {
  color: #ffffff !important;
}

/* ARTICLE BODY - Light Mode */
.light-mode .article-body {
  background-color: var(--lm-bg-secondary) !important;
}

.light-mode .article-content {
  color: var(--lm-text-secondary) !important;
}

.light-mode .article-content h2 {
  color: var(--lm-text-primary) !important;
}

.light-mode .article-content h3 {
  color: var(--lm-text-primary) !important;
}

.light-mode .article-content blockquote {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.05));
  color: var(--lm-text-primary) !important;
}

/* ARTICLE FEATURED IMAGE - Light Mode */
.light-mode .article-featured-image {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ARTICLE TAGS - Light Mode */
.light-mode .article-tags {
  border-top-color: var(--lm-border);
}

.light-mode .article-tags .tag {
  background: var(--lm-bg-tertiary);
  color: var(--lm-text-secondary);
}

.light-mode .article-tags .tag:hover {
  background: var(--sfe-orange);
  color: #ffffff;
}

/* SHARE SECTION - Light Mode */
.light-mode .article-share {
  border-top-color: var(--lm-border);
}

.light-mode .share-title {
  color: var(--lm-text-primary) !important;
}

/* SIDEBAR CARDS - Light Mode */
.light-mode .sidebar-card {
  background: linear-gradient(135deg, var(--lm-bg-card) 0%, var(--lm-bg-secondary) 100%) !important;
  border-color: var(--lm-border) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.light-mode .sidebar-title {
  color: var(--lm-text-primary) !important;
}

/* AUTHOR CARD - Light Mode */
.light-mode .author-card-name {
  color: var(--lm-text-primary) !important;
}

.light-mode .author-card-bio {
  color: var(--lm-text-secondary) !important;
}

.light-mode .author-card-social a {
  background: var(--lm-bg-tertiary);
  color: var(--lm-text-secondary);
}

.light-mode .author-card-social a:hover {
  background: var(--sfe-orange);
  color: #ffffff;
}

/* RELATED ARTICLES - Light Mode */
.light-mode .related-title {
  color: var(--lm-text-primary) !important;
}

.light-mode .related-date {
  color: var(--lm-text-muted);
}

/* CATEGORIES - Light Mode */
.light-mode .category-item {
  background: var(--lm-bg-tertiary);
  color: var(--lm-text-secondary);
}

.light-mode .category-item:hover {
  background: var(--sfe-orange);
  color: #ffffff;
}

.light-mode .category-count {
  background: rgba(0, 0, 0, 0.1);
}

/* CTA CARD - Light Mode */
.light-mode .cta-card {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 107, 53, 0.08));
  border-color: rgba(255, 107, 53, 0.25);
}

.light-mode .cta-title {
  color: var(--lm-text-primary) !important;
}

.light-mode .cta-text {
  color: var(--lm-text-secondary) !important;
}

/* ARTICLE NAVIGATION - Light Mode */
.light-mode .article-navigation {
  background: var(--lm-bg-primary) !important;
  border-top-color: var(--lm-border);
}

.light-mode .nav-article:hover {
  background: var(--lm-bg-secondary);
}

.light-mode .nav-title {
  color: var(--lm-text-primary) !important;
}

/* NEWSLETTER SECTION - Light Mode */
.light-mode .blog-newsletter,
.light-mode .blog-newsletter.bg-dark {
  background-color: var(--lm-bg-primary) !important;
}

.light-mode .newsletter-card {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 107, 53, 0.04));
  border-color: rgba(255, 107, 53, 0.15);
}

.light-mode .newsletter-title {
  color: var(--lm-text-primary) !important;
}

.light-mode .newsletter-text {
  color: var(--lm-text-secondary) !important;
}

.light-mode .newsletter-form .form-control {
  background: var(--lm-bg-card) !important;
  border-color: var(--lm-border) !important;
  color: var(--lm-text-primary) !important;
}

.light-mode .newsletter-form .form-control:focus {
  background: var(--lm-bg-card) !important;
  border-color: var(--sfe-orange) !important;
}

.light-mode .newsletter-form .form-control::placeholder {
  color: var(--lm-text-muted) !important;
}

/* FOOTER - Light Mode */
.light-mode footer,
.light-mode footer.bg-black {
  background-color: var(--lm-bg-tertiary) !important;
}

.light-mode footer .text-white,
.light-mode footer .text-light {
  color: var(--lm-text-primary) !important;
}

.light-mode footer .text-muted {
  color: var(--lm-text-muted) !important;
}

.light-mode footer h5.text-warning,
.light-mode footer h6.text-warning {
  color: var(--sfe-orange) !important;
}

.light-mode footer a.text-light {
  color: var(--lm-text-primary) !important;
}

.light-mode footer a.text-light:hover,
.light-mode footer a.text-muted:hover {
  color: var(--sfe-orange) !important;
}

.light-mode footer hr {
  border-color: var(--lm-border) !important;
}

.light-mode footer .social-section a {
  color: var(--lm-text-primary) !important;
}

.light-mode footer .social-section a:hover {
  color: var(--sfe-orange) !important;
}

/* Responsive adjustments for theme toggle */
@media (max-width: 991px) {
  .theme-toggle-btn {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    width: 40px;
    height: 40px;
  }
  
  .theme-toggle-btn .theme-icon-light,
  .theme-toggle-btn .theme-icon-dark {
    font-size: 1rem;
  }
}

/* Smooth transitions for theme change */
body,
.navbar,
.article-body,
.sidebar-card,
.article-navigation,
.blog-newsletter,
footer,
.category-item,
.article-tags .tag {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
