/* =========================================================
   NGỌC SƠN IT GUIDE
   HOMEPAGE CSS
   ========================================================= */


/* =========================================================
   HOMEPAGE BACKGROUND
   ========================================================= */

.site-main {
    position: relative;
    overflow: visible;

    background: #ffffff;
}


/* =========================================================
   HOME HEADER OVERLAY
   ========================================================= */

.site-header {
    position: relative;
    z-index: 20;

    top: 10px;

    background: transparent;
    border-bottom: none;
    box-shadow: none;
}

.site-header .header-inner {
    width: 100%;
    max-width: 1500px;

    min-height: 60px;

    margin: 0 auto;

    padding-left: 28px;
    padding-right: 28px;

    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.site-header .brand-logo {
    height: 46px;
    width: auto;
    object-fit: contain;

    filter:
        drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.site-header .main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-header .nav-link {
    color: #ffffff;

    font-weight: 750;

    text-shadow:
        0 1px 5px rgba(0, 0, 0, 0.85),
        0 0 3px rgba(0, 0, 0, 0.45);

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.site-header .nav-link:hover {
    color: var(--yellow);

    text-shadow:
        0 1px 6px rgba(0, 0, 0, 0.75);
}

.site-main {
    position: relative;
    z-index: 1;

    margin-top: -68px;

    padding-top: 0;
}

/* =========================================================
   HERO
   ========================================================= */

/* =========================================================
   HERO
   ========================================================= */

.home-hero {
    position: relative;

    width: 100vw;
    aspect-ratio: 1920 / 500;
    height: auto;

    margin-left: calc(50% - 50vw);

    padding: 0;

    overflow: hidden;

    background: transparent;
}

.hero-slideshow {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0;

    overflow: hidden;

    background: var(--blue-dark);
}

.hero-slide {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;
    transform: scale(1);

    transition:
        opacity 1s ease-in-out;

    object-fit: cover;
    object-position: center center;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;

    inset: 0;

    z-index: 2;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(0, 0, 0, 0.58) 30%,
            rgba(0, 0, 0, 0.30) 60%,
            rgba(0, 0, 0, 0.10) 100%
        );

    pointer-events: none;
}

.hero-content {
    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 3;

    width: 100%;
    max-width: 1500px;

    padding-left: 28px;
    padding-right: 30px;

    transform: translate(-50%, -50%);
}


.home-hero h1 {
    margin: 0 0 14px;

    color: var(--white);

    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.3px;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.45);
}

.home-hero p {
    max-width: 650px;

    margin: 0;

    color: rgba(255, 255, 255, 0.95);

    font-size: 15px;
    line-height: 1.65;
    font-weight: 400;

    color: rgba(255, 255, 255, 0.90);

    text-shadow:
        0 1px 5px rgba(0, 0, 0, 0.50);
}

.hero-dots {
    position: absolute;

    left: 50%;
    bottom: 38px;

    z-index: 20;

    display: flex;
    gap: 7px;

    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.45);

    cursor: pointer;

    transition:
        width 0.2s ease,
        background 0.2s ease;
}

.hero-dot.active {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);
}


/* =========================================================
   HERO RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .home-hero {
        height: 380px;
    }

    .hero-content {
        width: 100%;

        padding-left: 24px;
        padding-right: 20px;
    }

    .home-hero h1 {
        font-size: 30px;
    }

    .home-hero p {
        font-size: 15px;
    }
}

/* =========================================================
   GUIDE SECTION
   ========================================================= */

.guide-section {
    position: relative;
    z-index: 10;

    width: 100%;
    max-width: 1120px;

    margin: -30px auto 0;
    padding-bottom: 20px;
}





.contact-section.contact-moving {
    transform: translateY(var(--contact-move-y, 0px));
}


.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   GUIDE CARD - MODULE STYLE
   ========================================================= */

.guide-card {
    position: relative;
    isolation: isolate;

    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 335px;

    padding: 32px 24px 30px;

    background: #e0e0e0;

    border: 1px solid transparent;
    border-radius: 30px;

    box-shadow:
        15px 15px 30px #bebebe;

    text-align: center;

    overflow: hidden;

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease;
}


/* =========================================================
   GUIDE CARD - LED BORDER
   ========================================================= */

.guide-card::before {
    content: "";

    position: absolute;
    inset: -3px;

    z-index: -2;

    border-radius: inherit;

    background:
        conic-gradient(
            from 0deg,
            transparent 0deg,
            transparent 250deg,
            #155eef 275deg,
            #35a7ff 292deg,
            #f2c94c 308deg,
            #ffffff 318deg,
            transparent 335deg,
            transparent 360deg
        );

    opacity: 0;

    filter:
        blur(1px)
        drop-shadow(0 0 7px rgba(21, 94, 239, 0.95))
        drop-shadow(0 0 12px rgba(242, 201, 76, 0.80));

    transition: opacity 0.25s ease;

    pointer-events: none;
}

.guide-card::after {
    content: "";

    position: absolute;
    inset: 2px;

    z-index: -1;

    border-radius: 28px;

    background: #e0e0e0;

    pointer-events: none;
}


/* =========================================================
   GUIDE CARD - HOVER
   ========================================================= */

.guide-card:hover {
    transform: translateY(-6px);

    box-shadow:
        20px 22px 40px rgba(190, 190, 190, 0.95),
        0 0 20px rgba(21, 94, 239, 0.30),
        0 0 36px rgba(242, 201, 76, 0.22);
}

.guide-card:hover::before {
    opacity: 1;

    animation: guideLedRotate 2.5s linear infinite;
}

@keyframes guideLedRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   GUIDE ICON
   ========================================================= */

.guide-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;

    margin-bottom: 22px;

    flex-shrink: 0;

    background: #e0e0e0;

    border: none;
    border-radius: 20px;

    font-size: 43px;
    line-height: 1;

    box-shadow:
        8px 8px 16px #bebebe,
        -8px -8px 16px #ffffff;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.guide-card:hover .guide-icon {
    transform: translateY(-3px);

    box-shadow:
        8px 8px 16px #bebebe,
        -8px -8px 16px #ffffff;
}


/* =========================================================
   GUIDE CONTENT
   ========================================================= */

.guide-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.guide-card h3 {
    margin: 0 0 11px;

    color: var(--blue-dark);

    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

.guide-card p {
    max-width: 250px;

    margin: 0;

    color: var(--text-light);

    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 1000px) {
    .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .guide-card {
        min-height: auto;
    }
}


/* =========================================================
   CONTACT SLIDE STAGE
   ========================================================= */

.guide-section,
.contact-section,
.site-footer {
    transition:
        transform 0.60s cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-section.contact-slide-active,
.contact-section.contact-slide-active,
.site-footer.contact-slide-active {
    transform: translateY(
        var(--contact-slide-y, 0px)
    );
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
    width: 100%;
    margin-top: 32px;
    padding-bottom: 32px;
}

.contact-content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
    text-align: center;
}

/* =========================================================
   NÚT LIÊN HỆ
   ========================================================= */

.contact-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 300px;
    min-height: 58px;
    padding: 14px 28px;

    border: 2px solid var(--yellow);
    border-radius: 14px;
    background: var(--blue);
    color: #ffffff;

    font-family: inherit;
    font-size: 17px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(21, 94, 239, 0.20);

    animation: contactHeartbeat 2.2s ease-in-out infinite;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-trigger:hover {
    background: var(--blue-dark);
    transform: scale(1.04);

    box-shadow:
        0 12px 26px rgba(21, 94, 239, 0.28);
}

.contact-trigger-icon {
    font-size: 21px;
    line-height: 1;
}

@keyframes contactHeartbeat {
    0%,
    100% {
        transform: scale(1);
    }

    8% {
        transform: scale(1.035);
    }

    16% {
        transform: scale(1);
    }

    24% {
        transform: scale(1.025);
    }

    32% {
        transform: scale(1);
    }
}

/* =========================================================
   PANEL
   ========================================================= */

.contact-panel {
    width: 100%;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;

    transform: translateY(35px);

    transition:
        max-height 0.55s ease,
        opacity 0.35s ease,
        margin-top 0.55s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-content.is-open .contact-panel {
    max-height: 1000px;
    opacity: 1;
    margin-top: 28px;
    transform: translateY(0);
}

/* =========================================================
   2 KHỐI IT
   =========================================================
   ========================================================= */

.contact-locations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    width: 100%;
    max-width: 1260px;
    margin: 0 auto;

    gap: 24px;
    min-height: 0;
}

/* =========================================================
   CARD IT
   ========================================================= */

.contact-person {
    width: 100%;

    padding: 24px 22px 22px;

    background: #ffffff;

    border: 1px solid #e2e6ed;
    border-top: 3px solid var(--yellow);
    border-radius: 14px;

    box-shadow:
        0 6px 20px rgba(15, 23, 42, 0.07);
}

.contact-person-title {
    color: var(--blue-dark);
    font-size: 23px;
    line-height: 1.3;
    font-weight: 750;
}

.contact-person-name {
    margin-top: 4px;

    color: var(--text);
    font-size: 17px;
    font-weight: 650;
}

.contact-person-info {
    display: flex;
    flex-direction: column;
    gap: 3px;

    margin-top: 8px;
}

.contact-person-info a {
    color: var(--text-light);
    font-size: 14px;

    transition: color 0.2s ease;
}

.contact-person-info a:hover {
    color: var(--blue);
}

/* =========================================================
   TEAMS + ZALO
   ========================================================= */

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin-top: 20px;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    min-height: 215px;

    padding: 18px 14px;

    background: #ffffff;

    border: 1px solid #e2e6ed;
    border-radius: 12px;

    color: var(--text);

    box-shadow:
        0 5px 16px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-method:hover {
    transform: translateY(-4px);

    border-color: var(--yellow);

    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.12);
}

.method-logo {
    width: 48px;
    height: 48px;

    margin-bottom: 12px;

    object-fit: contain;
}

.method-title {
    color: var(--blue-dark);
    font-size: 16px;
    font-weight: 750;
}

.method-description {
    max-width: 210px;

    margin-top: 5px;

    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
}

.method-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    margin-top: 16px;
    padding: 7px 15px;

    border: 1px solid var(--blue);
    border-radius: 9px;

    background: var(--blue);
    color: #ffffff;

    font-size: 13px;
    font-weight: 650;
}

/* =========================================================
   QR
   ========================================================= */

.zalo-qr {
    width: 88px;
    height: 88px;

    margin-top: 10px;

    object-fit: contain;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .contact-locations {
        grid-template-columns: 1fr;
        max-width: 700px;
    }
}

@media (max-width: 600px) {

    .contact-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .contact-trigger {
        width: 100%;
        min-width: 0;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HOMEPAGE - BALANCED CONTACT SPACING
   ========================================================= */

.site-main:has(.contact-section) {
    padding-bottom: 0;
}

html,
body {
    overflow-x: hidden;
}



/* =========================================================
   MOBILE RESPONSIVE - IT GUIDE FINAL
   ========================================================= */

@media (max-width: 900px) {

    .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .guide-card {
        min-height: 300px;
        padding: 26px 18px 24px;
    }

    .contact-locations {
        grid-template-columns: 1fr;
        max-width: 700px;
    }
}


@media (max-width: 600px) {

    /* =====================================================
       HOMEPAGE HEADER
       ===================================================== */

    .site-header .header-inner {
        min-height: 60px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .site-header .brand-logo {
        height: 38px;
    }

    .site-header .main-nav {
        gap: 13px;
    }

    .site-header .nav-link {
        font-size: 13px;
        font-weight: 700;
    }


    /* =====================================================
       HERO
       ===================================================== */

    .home-hero {
        aspect-ratio: 4 / 3;
        min-height: 430px;
    }

    .hero-content {
        width: 100%;
        padding-left: 18px;
        padding-right: 18px;
    }

    .home-hero h1 {
        margin-bottom: 10px;
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.18;
    }

    .home-hero p {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.55;
    }

    .hero-dots {
        bottom: 24px;
    }


    /* =====================================================
       GUIDE CARDS
       ===================================================== */

    .guide-section {
        width: 100%;
        margin-top: -20px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 10px;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .guide-card {
        min-height: 0;
        padding: 25px 20px 24px;
        border-radius: 24px;
    }

    .guide-icon {
        width: 66px;
        height: 66px;
        margin-bottom: 17px;
        font-size: 36px;
        border-radius: 17px;
    }

    .guide-card h3 {
        font-size: 19px;
        line-height: 1.35;
    }

    .guide-card p {
        font-size: 14px;
        line-height: 1.55;
    }


    /* =====================================================
       CONTACT
       ===================================================== */

    .contact-section {
        width: 100%;
        margin-top: 24px;
        padding-bottom: 28px;
    }

    .contact-content {
        width: 100%;
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .contact-trigger {
        width: 100%;
        min-height: 48px;
        padding: 11px 16px;
        font-size: 14px;
        border-radius: 11px;
    }

    .contact-panel {
        width: 100%;
        max-height: 0;
    }

    .contact-content.is-open .contact-panel {
        max-height: 2200px;
        margin-top: 20px;
    }

    .contact-locations {
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
    }

    .contact-person {
        padding: 20px 16px 18px;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .contact-method {
        width: 100%;
    }

    .method-logo {
        width: 42px;
        height: 42px;
    }

    .method-title {
        font-size: 15px;
    }

    .method-description {
        max-width: 100%;
        font-size: 12px;
    }

    .method-button {
        min-height: 42px;
        width: 100%;
        margin-top: 12px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .zalo-qr {
        width: 96px;
        height: 96px;
    }


    /* =====================================================
       QUAN TRỌNG:
       CONTACT KHÔNG ĐƯỢC BỊ FOOTER CHE
       ===================================================== */

    .guide-section.contact-slide-active,
    .contact-section.contact-slide-active,
    .site-footer.contact-slide-active {
        transform: none !important;
    }

    .contact-section.contact-moving {
        transform: none !important;
    }

    .site-footer {
        position: relative;
        z-index: 1;
    }


    /* =====================================================
       FOOTER HOMEPAGE
       ===================================================== */

    .site-footer .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-title {
        font-size: 13px;
    }

    .footer-text {
        font-size: 11px;
        line-height: 1.4;
    }

    .footer-copy {
        font-size: 10px;
    }
}


@media (max-width: 380px) {

    .site-header .header-inner {
        padding-left: 11px;
        padding-right: 11px;
    }

    .site-header .brand-logo {
        height: 34px;
    }

    .site-header .main-nav {
        gap: 9px;
    }

    .site-header .nav-link {
        font-size: 12px;
    }

    .home-hero {
        min-height: 400px;
    }

    .home-hero h1 {
        font-size: 25px;
    }

    .home-hero p {
        font-size: 13px;
    }

    .guide-section,
    .contact-content {
        padding-left: 12px;
        padding-right: 12px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .guide-card,
    .contact-panel,
    .contact-section,
    .guide-section,
    .site-footer {
        transition: none !important;
    }
}


/* =========================================================
   MOBILE CONTACT NATURAL HEIGHT FIX
   Desktop giữ nguyên hoàn toàn.
   ========================================================= */

@media (max-width: 600px) {

    /*
     * Khi mở contact:
     * cho panel dùng chiều cao tự nhiên của nội dung,
     * không bị cắt bởi max-height.
     */
    .contact-content.is-open .contact-panel {
        max-height: none !important;
        height: auto !important;

        overflow: visible !important;

        opacity: 1;
        margin-top: 20px;

        transform: none !important;
    }

    /*
     * Contact và footer phải nằm theo flow bình thường.
     */
    .contact-section,
    .site-footer {
        position: relative;
        transform: none !important;
    }

    .contact-section {
        overflow: visible !important;
    }

    .contact-content {
        overflow: visible !important;
    }

    /*
     * Footer không được nằm đè lên contact.
     */
    .site-footer {
        z-index: 1;
        margin-top: 0;
    }
}


@media (max-width: 380px) {

    .contact-content.is-open .contact-panel {
        max-height: none !important;
        height: auto !important;
    }
}


/* =========================================================
   GUIDE COLOR ICON
   ========================================================= */

.guide-icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.guide-icon svg {
    width: 43px;
    height: 43px;
    display: block;
}


/* Mobile */

@media (max-width: 700px) {

    .guide-icon img {
        width: 50px;
        height: 50px;
    }

    .guide-icon svg {
        width: 38px;
        height: 38px;
    }

}
