/* VienBaoTon v4 Theme - Modern Heritage Design */

/* Base Styles */
:root {
    --brand-red: #7d1f1f;
    --bg-light: #F5F2ED;
    --text-dark: #3E2723;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #F5F2ED;
    position: relative;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('../images/bg3.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 70%;
    opacity: 0.08;
    pointer-events: none;
}

.serif-text {
    font-family: 'Crimson Pro', serif;
}

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

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

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

.nav-link:hover {
    color: var(--brand-red);
}

/* Desktop Dropdown Menu */
.group:hover > ul,
.group/sub:hover > ul {
    display: block !important;
}

.group/sub:hover > ul {
    margin-top: -2.5rem;
}

header nav ul ul {
    display: none;
    animation: fadeIn 0.15s ease-out;
}

header nav ul ul ul {
    margin-top: 0;
}

header nav > ul > li:hover > ul {
    display: block;
}

/* Mobile Nav */
.mobile-nav-overlay {
    backdrop-filter: blur(2px);
}

/* Cards & Shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Prose Content Styling */
.prose {
    font-size: 1.1875rem;
    line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-family: 'Crimson Pro', serif;
    font-weight: 700;
    color: var(--brand-red);
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose p {
    margin-bottom: 1.5em;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose a {
    color: var(--brand-red);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #5a1616;
}

.prose img {
    margin: 2em auto;
    border-radius: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid var(--brand-red);
    padding-left: 1em;
    font-style: italic;
    color: #666;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.pagination .active {
    background-color: var(--brand-red);
    color: white;
    border-color: var(--brand-red);
}

/* Tags */
.tags-list a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
}

.tags-list a:hover {
    background-color: var(--brand-red);
    color: white;
}

/* Search Page */
.search-item:hover .search-item-title {
    color: var(--brand-red);
}

/* Training Page */
.course-card:hover .course-title {
    color: #5a1616;
}

/* Album Page */
.photo-item:hover .photo-caption {
    color: var(--brand-red);
}

/* Timeline */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 2.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

/* Focus States */
input:focus,
button:focus,
a:focus {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-nav-overlay,
    .mobile-nav-panel {
        display: none !important;
    }

    .site-main {
        padding: 0 !important;
    }

    a {
        text-decoration: none !important;
    }
}

/* Ghost Content Classes (kg-classes) */
.kg-width-wide {
    max-width: 1200px;
    margin: 2rem auto;
}

.kg-width-full {
    max-width: 100%;
    margin: 2rem 0;
}

.kg-width-full img {
    width: 100%;
    height: auto;
}

.kg-align-center {
    text-align: center;
}

.kg-image {
    max-width: 100%;
    height: auto;
}

.kg-image-card {
    margin: 2rem 0;
}

.kg-image-card img {
    border-radius: 0.5rem;
}

.kg-blockquote {
    border-left: 4px solid var(--brand-red);
    padding-left: 1.5rem;
    font-style: italic;
    color: #555;
    margin: 2rem 0;
}

.kg-bookmark-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.kg-bookmark-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kg-bookmark-title {
    font-weight: 600;
    color: var(--brand-red);
}

.kg-bookmark-description {
    color: #666;
    font-size: 0.875rem;
}

.kg-bookmark-thumbnail img {
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.kg-gallery-card {
    margin: 2rem 0;
}

.kg-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-card-figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.kg-header-card {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f9f5f0 0%, #fff 100%);
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.kg-header-card h2 {
    font-size: 2rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
}

.kg-header-card p {
    color: #666;
    font-size: 1.125rem;
}

.kg-button-card {
    text-align: center;
    margin: 2rem 0;
}

.kg-button-card a {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--brand-red);
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.kg-button-card a:hover {
    background-color: #5a1616;
}

.kg-file-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kg-file-card a {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 500;
}

.kg-file-card-figcaption {
    font-size: 0.875rem;
    color: #666;
}

.kg-toggle-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.kg-toggle-card[data-is-closed="true"] .kg-toggle-content {
    display: none;
}

.kg-toggle-heading {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kg-toggle-content {
    padding: 0 1rem 1rem;
}

.kg-product-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.kg-product-card-image {
    margin-bottom: 1rem;
}

.kg-product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-red);
}

.kg-product-card-description {
    color: #666;
    margin: 0.5rem 0;
}

.kg-product-card-price {
    font-weight: 600;
    color: var(--brand-red);
    margin: 0.5rem 0;
}

.kg-product-card-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--brand-red);
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    margin-top: 1rem;
}
