/* Global Styles */
:root {
    --primary-color: #C7AE6A;
    --secondary-color: #d5c28f;
    --dark-color: #1a1a1a;
    --light-color: #e3d6b4;
    --accent-color: #b99a45;
    --black-color: #000000;
    --danger-color: #dc3545;
    --success-color: #28a745;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
}
.verify-button {
  width: 120px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

.language-switcher .dropdown-toggle {
    background: rgba(255, 255, 255, 0.05); /* Slight translucent bg */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Softer border */
    border-radius: 0.5rem; /* More modern look */
    padding: 0.4rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.language-switcher .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}
.language-switcher .dropdown-menu {
    background-color: #121212; /* Ultra dark tone */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.3rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); /* Elegant shadow */
    min-width: 160px;
}
.language-switcher .dropdown-item {
    color: #e0e0e0;
    padding: 0.45rem 1.2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background-color: transparent !important; /* Ensure background stays transparent */
    transition: color 0.2s ease;
}

.language-switcher .dropdown-item:hover,
.language-switcher .dropdown-item.active,
.language-switcher .dropdown-item:focus {
    color: var(--primary-color); /* Highlight TEXT ONLY */
    background-color: transparent !important;
    font-weight: 500;
}
/* Optional: change icon color too */
.language-switcher .dropdown-item i {
    color: #999;
    transition: color 0.2s ease;
}

.language-switcher .dropdown-item:hover i,
.language-switcher .dropdown-item.active i {
    color: var(--primary-color);
}

/* --- LOADING OVERLAY --- */
#loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* simple spinner */
#loading-overlay .spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--light-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* remove overlay when hidden */
#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

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

/* clean fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
a:hover {
    color: var(--dark-color);
    text-decoration: underline;
    text-decoration: none;
}

/* Comment-form radio icons */
.comment-form .form-check-input {
  margin-right: 0.25rem;       /* space between circle and icon */
}

.comment-form .form-check-label i {
  font-size: 1rem;             /* match text size */
  vertical-align: middle;      /* center-align */
}

/* Make textarea full width and taller and ensure label sits above */
.comment-form .form-label {
  display: block;
}
.comment-form textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 180px;
}
.comment-form .cke_chrome {
  width: 100% !important;
}
.comment-form .formatting-help {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure CKEditor 5 editing area has consistent height across browsers */
.comment-form .ck-editor__editable_inline {
  min-height: 180px;
}

/* Header & Navigation */
.navbar {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    background-color: var(--black-color) !important;
}

/* Ensure navbar items are properly centered */
.navbar-nav.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex;
    justify-content: center;
    width: 100%;
}

.card-header.card-header-primary {
    background-color: var(--primary-color) !important;
    color: var(--black-color) !important;
}

/* 1) Make category links black (instead of the global primary-color link rule) */
.card.mb-4.shadow-sm .list-group-item a {
    color: var(--black-color);
}

/* 2) On hover, you can give them a touch of your primary color */
.card.mb-4.shadow-sm .list-group-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 3) Force the badges from blue → primary-color, with black text */
.card.mb-4.shadow-sm .list-group-item .badge {
    background-color: var(--primary-color) !important;
    color: var(--black-color) !important;
}

.technologies .badge {
    background-color: var(--primary-color) !important;
    color: var(--black-color) !important;
}

/* Override Bootstrap’s .active on list-group-items in the sidebar card */
.card.mb-4.shadow-sm .list-group-item.active {
    background-color: var(--primary-color) !important;
    color: var(--black-color) !important;
}

/* Ensure the link inside the active item also uses black text */
.card.mb-4.shadow-sm .list-group-item.active a {
    color: var(--black-color) !important;
}

/* Restyle the badge in an active item to stand out */
.card.mb-4.shadow-sm .list-group-item.active .badge {
    background-color: var(--black-color) !important;
    color: var(--light-color) !important;
}

.badge-pill-hover {
    background-color: var(--primary-color);
    color: var(--black-color);
    padding: 0.35em 0.8em;
    border-radius: 9999px; /* fully rounded */
    font-size: 0.85em;
    transition: box-shadow 0.2s ease;
    text-decoration: none;
}

.badge-pill-hover:hover {
    box-shadow: 0 0 8px rgba(199, 174, 106, 0.6);
    text-decoration: none;
}

.badge-category {
    background-color: #bca86d;
    color: #f8f9fa;
    padding: 0.15em 0.45em;
    font-size: 0.75rem;
    border-radius: 0.35rem;
    font-weight: 600;
    line-height: 1;
    display: inline-block;
    text-decoration: none;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.badge-category:hover {
    background-color: #a8915a;
    color: var(--black-color);
    text-shadow: none;
    box-shadow: 0 0 8px rgba(199, 174, 106, 0.6);
    text-decoration: none;
}

/* shrink navbar logo */
.navbar-logo {
    max-height: 40px; /* adjust as needed */
    width: auto;
}

/* hero section styling */
.hero-logo {
    max-width: 200px; /* adjust so it’s big but not overwhelming */
    height: auto;
}

/* Home page hero logo is larger but still responsive */
.home-hero-logo {
    width: 100%;
    max-width: 450px;
}

/* Keep the hero logo proportional on tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .home-hero-logo {
        max-width: 400px;
    }
}

@media (min-width: 992px) {
    .home-hero-logo {
        max-width: 600px;
    }
}

.hero h1 {
    font-size: 2.5rem;
}

.hero p.lead {
    font-size: 1.25rem;
    color: #666;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--secondary-color);
    font-style: italic;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover:after, .nav-link.active:after {
    width: 100%;
    text-decoration: none;
}

.navbar .btn-outline-light {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.navbar .btn-outline-light:hover {
    background-color: var(--primary-color);
    color: var(--black-color);
    text-decoration: none;
}

/* Hero Section */
.hero {
    background-color: var(--dark-color);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-weight: 700;
}

/* Project & Blog */
.project-detail, .post-detail {
    margin: 3rem 0;
}

.project-image, .post-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.technologies {
    margin: 1rem 0;
}

.technologies span {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

/* About Page */
.profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.skill-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Contact Page */
.contact-info {
    margin-bottom: 2rem;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Comments */
.comment {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    background-color: var(--black-color) !important;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

footer h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}

footer h5:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
}

footer p, footer .text-white {
    color: #f8f9fa !important;
}

footer a.text-white {
    transition: color 0.3s ease;
}

footer a.text-white:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    margin-right: 0.5rem;
    font-size: 1.5rem;
    color: var(--light-color) !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
    text-decoration: none;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-logo {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-top: 1rem;
}

.company-logo {
    max-width: 150px !important;
    height: auto !important;
    margin-bottom: 1rem !important;
}

.institution-logo {
    max-width: 150px !important;
    height: auto !important;
    margin-bottom: 1rem !important;
}

/* Animations and Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-primary, .btn-outline-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--black-color);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-outline-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -10px;
    left: 0;
    background-color: var(--primary-color);
}

.post-body-wrapper {
    background-color: rgba(255, 255, 255, 0.97); /* subtle glassy white */
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    font-size: 1.05rem;
    line-height: 1.7;
    color: #212529;
    text-align: left;
}

.post-body-wrapper pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    /* Preserve line breaks inside code blocks */
}

.post-body-wrapper pre code {
    white-space: pre;
}

.post-body-wrapper {
    border-top: 4px solid var(--primary-color);
}

.post-language-switcher {
  display: inline-flex;
  background-color: rgba(199,174,106,0.1); /* very light primary */
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.875rem;
}

.post-language-switcher .language-link {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  color: var(--dark-color);
  transition: background-color 0.2s, color 0.2s;
}

.post-language-switcher .language-link + .language-link {
  border-left: 1px solid rgba(0,0,0,0.1);
}

.post-language-switcher .language-link img {
  width: 18px;
  height: auto;
  margin-right: 0.4rem;
}

.post-language-switcher .language-link:hover,
.post-language-switcher .language-link.active {
  background-color: var(--primary-color);
  color: var(--black-color);
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.card-img-top {
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
    text-decoration: none;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--black-color);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

/* Responsive */
/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .card-img-top {
        height: 180px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .navbar-nav.mx-auto {
        justify-content: flex-start;
    }

    .language-switcher {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .card-img-top {
        height: 160px;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .logo-tagline {
        display: none;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-logo {
        max-height: 35px;
    }

    .hero-logo {
        max-width: 150px;
    }

    /* Keep the home hero logo a bit larger on small screens */
    .home-hero-logo {
        max-width: 350px;
    }

    .card-img-top {
        height: 200px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    /* Improve spacing in footer on mobile */
    footer .col-md-4, 
    footer .col-md-3 {
        margin-bottom: 2rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .navbar-logo {
        max-height: 30px;
    }

    .hero-logo {
        max-width: 120px;
    }

    /* Keep the home hero logo a bit larger on very small screens */
    .home-hero-logo {
        max-width: 300px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-img-top {
        height: 180px;
    }

    /* Improve form layout on very small screens */
    .comment-form .form-check {
        display: flex;
        align-items: flex-start;
    }

    .comment-form .form-check-input {
        margin-top: 0.3rem;
    }

    /* Adjust comment type selection for better mobile display */
    .comment-form .d-flex.flex-wrap.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    /* Make buttons full width on mobile */
    .d-grid .btn {
        width: 100%;
    }
}

/* make the “no comments” alert sticky within the comments block */
#comments .alert {
  position: sticky;
  top: 0.5rem;        /* adjust to sit just under the card header */
  z-index: 2;
  background: #fff;   /* keep the white background */
}
