/* ============================================================
   PUBLIC STYLE - Fundamental Fund (KMUTNB)
   Modern, clean public-facing pages
   ============================================================ */

/* ---------- General ---------- */
html {
    scroll-behavior: smooth;
}

.public-body {
    font-family: 'Sarabun', sans-serif;
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

/* ---------- Navbar ---------- */
.public-navbar {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    z-index: 1030;
}

.public-navbar.navbar-scrolled {
    padding: 0.3rem 1rem;
    background: linear-gradient(135deg, #0d1257 0%, #1a237e 100%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.ff-badge {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #1a237e;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.public-navbar .ff-badge:hover {
    transform: scale(1.1);
}

.brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.public-navbar .navbar-brand:hover {
    text-decoration: none;
}

.public-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 15px;
    padding: 0.6rem 1rem !important;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link:focus {
    color: #fff !important;
}

.public-navbar .nav-link .nav-icon {
    font-size: 18px;
}

.public-navbar .navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.35rem 0.6rem;
}

.public-navbar .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}

.public-navbar .navbar-collapse {
    flex-grow: 0;
}

@media (max-width: 991.98px) {
    .public-navbar .navbar-collapse.show,
    .public-navbar .navbar-collapse.collapsing {
        background: rgba(13, 18, 87, 0.95);
        border-radius: 0 0 12px 12px;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
    }

    .public-navbar .navbar-nav {
        padding: 0.5rem 0;
    }

    .public-navbar .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .public-navbar .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
}

/* ---------- Banner / Carousel ---------- */
.banner-section {
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.banner-section .swiper {
    width: 100%;
    aspect-ratio: 1920 / 500;
}

.banner-section .swiper-slide {
    position: relative;
    overflow: hidden;
}

.banner-section .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 2;
}

.banner-content {
    max-width: 700px;
}

.banner-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.banner-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.banner-btn {
    display: inline-block;
    background: #fff;
    color: #1a237e;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.banner-btn:hover {
    background: #1a237e;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.banner-section .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.banner-section .swiper-pagination-bullet-active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

.banner-section .swiper-button-next,
.banner-section .swiper-button-prev {
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.banner-section .swiper-button-next:hover,
.banner-section .swiper-button-prev:hover {
    opacity: 1;
}

/* ---------- Section Common ---------- */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #5c6bc0);
    border: none;
    border-radius: 2px;
    margin: 15px auto 0;
}

/* ---------- About Section ---------- */
.about-section {
    padding: 60px 0;
    background: #fff;
}

.about-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.about-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a237e 0%, #5c6bc0 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.about-card .material-icons.about-icon {
    font-size: 36px !important;
    color: #fff !important;
}

.about-card h5 {
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 0.75rem;
}

.about-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- News Section ---------- */
.news-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.news-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 1;
}

.news-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    color: #1a237e;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-date .material-icons {
    font-size: 16px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-text {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    padding: 0 1.25rem 1.25rem;
}

.news-read-more {
    color: #1a237e;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s ease;
}

.news-read-more:hover {
    color: #283593;
    text-decoration: none;
    gap: 8px;
}

.news-read-more .material-icons {
    font-size: 18px;
}

.btn-view-all {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 2rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-view-all:hover {
    background: linear-gradient(135deg, #0d1257 0%, #1a237e 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

/* ---------- Stats / Counter Section ---------- */
.stats-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    color: #fff;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* ---------- Footer ---------- */
.public-footer {
    background: #1a237e;
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 20px;
}

.ff-badge-footer {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.footer-brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: #5c6bc0;
    border-radius: 2px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: none;
    padding-left: 5px;
}

.footer-link-icon {
    font-size: 16px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.7;
}

.footer-contact-icon {
    font-size: 20px;
    color: #5c6bc0;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Fade-In Animation ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up:nth-child(2) {
    transition-delay: 0.1s;
}

.fade-in-up:nth-child(3) {
    transition-delay: 0.2s;
}

.fade-in-up:nth-child(4) {
    transition-delay: 0.3s;
}

/* ---------- Utility ---------- */
.public-main {
    min-height: calc(100vh - 300px);
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 991.98px) {
    .public-navbar .navbar-collapse {
        background: rgba(26, 35, 126, 0.98);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 0.5rem;
    }

    .public-navbar .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .public-navbar .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    .banner-section .swiper {
        aspect-ratio: 1920 / 500;
    }

    .banner-title {
        font-size: 2rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .banner-section {
        margin-top: 60px;
    }

    .banner-section .swiper {
        aspect-ratio: auto;
    }

    .banner-section .swiper-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .banner-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .banner-subtitle {
        font-size: 0.85rem;
    }

    .banner-btn {
        padding: 0.5rem 1.2rem;
        font-size: 13px;
    }

    .banner-overlay {
        padding: 1rem;
    }

    .banner-section .swiper-button-next,
    .banner-section .swiper-button-prev {
        display: none;
    }

    .banner-section .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .banner-section .swiper-pagination-bullet-active {
        width: 20px;
    }

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

    .news-section,
    .about-section {
        padding: 40px 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .public-footer {
        padding: 40px 0 15px;
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-link {
        justify-content: center;
    }

    .footer-links li {
        text-align: center;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .banner-section .swiper {
        aspect-ratio: 1920 / 500;
    }

    .banner-title {
        font-size: 3rem;
    }
}
