/* ============================================================
   Javkhlant Holding - Porto Theme Custom Overrides
   Only styles that Porto doesn't cover or need customization.
   Porto theme handles all base styling, layout, and components.
   ============================================================ */

/* --- Font Override (Mongolian Cyrillic support) --- */
body,
h1, h2, h3, h4, h5, h6,
.font-weight-bold,
.font-weight-semibold,
.btn,
p, a, li, span, td, th, label, input, textarea, select {
    font-family: 'Nunito Sans', sans-serif !important;
}

/* --- Language Switcher --- */
.custom-lang-switcher .dropdown-toggle::after,
.custom-lang-switcher .dropdown-toggle::before {
    display: none !important;
}

.custom-lang-switcher .dropdown-toggle img {
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
    vertical-align: middle;
}

.custom-lang-switcher .dropdown-menu {
    border: 1px solid var(--grey-300);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
}

.custom-lang-switcher .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
}

.custom-lang-switcher .dropdown-item.active {
    background-color: var(--primary);
    color: #fff;
}

.custom-lang-switcher .dropdown-item img {
    border-radius: 2px;
}

/* --- Blog Post Content (CMS-generated HTML) --- */
.blog-post-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.blog-post-content table {
    width: 100%;
    margin-bottom: 1rem;
}

.blog-post-content table td,
.blog-post-content table th {
    padding: 8px 12px;
    border: 1px solid var(--grey-300);
}

/* --- Attachment Badge Colors --- */
.badge.bg-primary {
    background-color: var(--primary) !important;
}

/* --- Custom Font Size Utility --- */
.custom-font-size-1 {
    font-size: 13px;
}

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    display: none;
    position: relative;
}

.hero-slide.active {
    display: block;
    animation: heroFadeIn 0.6s ease;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-slide-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--quaternary) 0%, #1a1a2e 50%, #16213e 100%);
}

.hero-slide-img {
    max-height: 240px;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.hero-slide-title {
    color: #fff;
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-slide-desc {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 18px;
    line-height: 1.6;
}

.hero-slide-btn {
    display: inline-block;
    padding: 11px 30px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.hero-slide-btn:hover {
    background: var(--secondary);
    color: #fff;
    text-decoration: none;
}

.hero-slider-prev,
.hero-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-prev { left: 16px; }
.hero-slider-next { right: 16px; }

.hero-slider-prev:hover,
.hero-slider-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.hero-slider-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease;
}

.hero-dot.active {
    background: var(--primary);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.8);
}

@media (max-width: 767.98px) {
    .hero-slide-title { font-size: 1.4rem; }
    .hero-slide-img { max-height: 150px; }
    .hero-slider-prev,
    .hero-slider-next { width: 34px; height: 34px; font-size: 12px; }
    .hero-slider-prev { left: 8px; }
    .hero-slider-next { right: 8px; }
}

/* --- News Section --- */
.news-section {
    padding: 50px 0;
    background: #fff;
}

.news-section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 6px;
}

.news-section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--quaternary);
    margin-bottom: 0;
}

.news-section-line {
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.news-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-decoration: none;
}

.news-card-img {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: var(--tertiary);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.05);
}

.news-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--tertiary) 0%, #e8e8e8 100%);
}

.news-card-placeholder i {
    font-size: 2.5rem;
    color: #ccc;
}

.news-card-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.news-card-date i {
    margin-right: 4px;
    font-size: 10px;
}

.news-card-body {
    padding: 14px 16px 16px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--quaternary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.news-card:hover .news-card-title {
    color: var(--primary);
}

.news-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    margin-bottom: 10px;
}

.news-card-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    transition: letter-spacing 0.2s ease;
}

.news-card-link i {
    margin-left: 5px;
    transition: margin-left 0.2s ease;
}

.news-card:hover .news-card-link i {
    margin-left: 10px;
}

.news-view-all {
    display: inline-block;
    padding: 11px 32px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.news-view-all:hover {
    background: var(--secondary);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}


/* --- Page Header Compact --- */
.page-header.page-header-modern.page-header-md {
    padding: 30px 0;
}

/* --- Footer Compact --- */
#footer {
    font-size: 14px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .custom-lang-switcher .dropdown-toggle span {
        display: none;
    }

    #header .header-nav-main nav {
        max-height: 60vh;
        overflow-y: auto;
    }
}

@media (max-width: 575.98px) {
    .page-header h1 {
        font-size: 1.5rem !important;
    }
}
