/* ==========================================
   QUẢN LÝ SỐ - Enhancement Styles
   Loading Screen, Back-to-Top, FAQ, 
   Testimonials, Timeline, Newsletter,
   Stagger Animations, Custom Cursor
   ========================================== */

/* ===== 1.1 LOADING SCREEN ===== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0c1445 0%, #1a1f3a 50%, #2d1b4e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    width: 80px;
    height: 80px;
    animation: loaderPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.5));
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.loader-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: loaderProgress 1.8s ease-in-out forwards, loaderShimmer 1s linear infinite;
}

.loader-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes loaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes loaderProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes loaderShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== 1.2 STAGGER ANIMATIONS ===== */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-stagger.active>*:nth-child(1) {
    transition-delay: 0s;
}

.reveal-stagger.active>*:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-stagger.active>*:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-stagger.active>*:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-stagger.active>*:nth-child(5) {
    transition-delay: 0.35s;
}

.reveal-stagger.active>*:nth-child(6) {
    transition-delay: 0.4s;
}

.reveal-stagger.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* Only apply stagger when parent has .active */
.reveal-stagger:not(.active)>* {
    opacity: 0;
    transform: translateY(30px);
}

/* ===== 1.3 BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}


/* ===== 2.1 SEARCH BAR (news.php) ===== */
.search-container {
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.15);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.search-result-item span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== 2.3 SOCIAL SHARE ===== */
.social-share {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.zalo {
    background: #0068FF;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.copy-link {
    background: rgba(255, 255, 255, 0.15);
}

.share-btn.copy-link:hover {
    background: #667eea;
}

.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-tooltip.show {
    opacity: 1;
}

/* ===== 2.5 NEWSLETTER ===== */
.newsletter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 450px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-form input:focus {
    outline: none;
    border-color: #667eea;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

@media (max-width: 500px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* ===== 3.1 TESTIMONIALS ===== */
.testimonials-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.03) 50%, transparent 100%);
}

.testimonials-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
}

.testimonials-carousel::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 350px;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.testimonial-quote {
    font-size: 3rem;
    line-height: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.testimonial-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.testimonial-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .testimonial-card {
        min-width: 280px;
    }
}

/* ===== 3.2 TIMELINE ===== */
.timeline-section {
    padding: 5rem 0;
}

.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2, rgba(118, 75, 162, 0.2));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -3rem;
    top: 0.3rem;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    border: 3px solid #0f172a;
    transform: translateX(calc(-50% + 1.5px));
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

.timeline-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* ===== 3.3 FAQ ===== */
.faq-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.03) 50%, transparent 100%);
}

.faq-list {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(102, 126, 234, 0.2);
}

.faq-item.active {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.faq-question {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    background: none;
    border: none;
    color: white;
    width: 100%;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #a3bffa;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #667eea;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* ===== 3.4 GOOGLE MAPS ===== */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
    width: 100%;
    height: 350px;
    border: none;
    filter: grayscale(0.3) contrast(1.1);
}

/* ===== 2.2 COMMENTS ===== */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(30, 41, 59, 0.5);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-form-row {
    display: flex;
    gap: 1rem;
}

.comment-form input,
.comment-form textarea {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.comment-form button {
    align-self: flex-end;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.comment-body {
    flex: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.comment-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.comment-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .comment-form-row {
        flex-direction: column;
    }
}