/* ==========================================================================
   FIET Service Evaluation - Home Page Stylesheet
   Designed to match FIET Brand & Reference Mockup
   ========================================================================== */

:root {
    --primary-red: #D71920;
    --primary-crimson: #C8102E;
    --dark-red: #850B18;
    --deep-red: #670511;
    --soft-red: #FFF0F3;
    --border-red: #FED7DF;
    
    --text-dark: #1E293B;
    --text-body: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 28px rgba(200, 16, 46, 0.1);

    --transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: #F8F9FA;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
.site-header {
    background-color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
    max-width: 82%;
}

.header-logo-link:hover {
    transform: scale(1.01);
}

.header-logo {
    height: 44px;
    max-height: 48px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-icon-kiosk {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #F1F5F9;
    color: var(--text-body);
    border: 1px solid #E2E8F0;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-kiosk:hover {
    background-color: #E2E8F0;
    color: var(--text-dark);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #E02440 0%, #C8102E 100%);
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.28);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background: linear-gradient(135deg, #C8102E 0%, #A50C24 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(200, 16, 46, 0.38);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    background-color: #FFFFFF;
    background-image: url('../../img/hero1.png');
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
    min-height: 480px;
    padding: 4.5rem 1.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 620px;
}

.hero-title {
    font-size: clamp(2.2rem, 4.2vw, 3.2rem);
    font-weight: 700;
    color: #1E293B;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-title .text-crimson {
    color: var(--primary-red);
    display: inline-block;
    background: linear-gradient(135deg, #E02440 0%, #B80D24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-faculty {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 600;
    color: #334155;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.hero-faculty span {
    font-weight: 500;
    color: #475569;
}

.hero-quote {
    font-size: 1.15rem;
    font-weight: 600;
    font-style: italic;
    color: #1E293B;
    margin-bottom: 0.85rem;
    letter-spacing: 0.2px;
}

.hero-desc {
    font-size: 0.98rem;
    color: var(--text-body);
    line-height: 1.65;
    max-width: 520px;
}

/* ==========================================================================
   Section: เลือกแบบประเมิน (Horizontal Selection Row matching Reference)
   ========================================================================== */
.selection-section {
    padding: 3.5rem 0 4.5rem 0;
    background-color: #F1F5F9;
    position: relative;
}

.selection-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: stretch;
    gap: 2.5rem;
}

/* Left Title Column */
.selection-title-col {
    flex: 0 0 290px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.accent-dash {
    width: 36px;
    height: 4px;
    background: #C8102E;
    border-radius: 2px;
    margin-bottom: 0.85rem;
}

.selection-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.text-crimson {
    color: #C8102E;
}

.selection-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Right Cards Row */
.selection-cards-row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}

/* Compact Card Component */
.compact-card {
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    border: 1.5px solid #C8102E;
    box-shadow: 0 4px 18px rgba(200, 16, 46, 0.08);
    padding: 1.35rem 1.35rem 1.4rem 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    user-select: none;
}

.compact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #A50C24;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.card-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
    transition: var(--transition);
}

.compact-card:hover .card-icon-box {
    transform: scale(1.05);
}

.icon-crimson {
    background: linear-gradient(135deg, #E02440 0%, #C8102E 100%);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25);
}

.icon-dark {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.25);
}

.card-title-wrap {
    flex: 1;
}

.card-main-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.3;
}

.card-arrow-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E02440 0%, #C8102E 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(200, 16, 46, 0.28);
    transition: var(--transition);
}

.card-arrow-btn svg {
    width: 15px;
    height: 15px;
    stroke: #FFFFFF;
    stroke-width: 3;
}

.compact-card:hover .card-arrow-btn {
    background: linear-gradient(135deg, #C8102E 0%, #A50C24 100%);
    transform: scale(1.08) translateX(2px);
    box-shadow: 0 5px 15px rgba(200, 16, 46, 0.4);
}

.compact-card:active .card-arrow-btn {
    transform: scale(0.95);
}

.card-desc-text {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.95rem;
    flex-grow: 1;
}

/* ==========================================================================
   Compact Footer (Matching User Reference Image)
   ========================================================================== */
.compact-footer {
    background: linear-gradient(100deg, #A8071A 0%, #C8102E 50%, #850B18 100%);
    color: #FFFFFF;
    position: relative;
    margin-top: auto;
    overflow: hidden;
}

/* Sweeping Curved Top Wave */
.footer-wave-wrapper {
    position: absolute;
    top: -45px;
    left: 0;
    width: 100%;
    height: 48px;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
}

.footer-wave-wrapper svg {
    display: block;
    width: 100%;
    height: 100%;
}

.compact-footer-body {
    padding: 2.5rem 1.5rem 2.8rem 1.5rem;
    position: relative;
    z-index: 2;
}

.compact-footer-container {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Left: Developer & Copyright */
.compact-footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.copyright-line {
    font-size: 0.88rem;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.author-line {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Right: Diagonal Lines + FIET Logo */
.compact-footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.diagonal-stripes {
    display: flex;
    gap: 7px;
    align-items: center;
}

.diagonal-stripes span {
    width: 3px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-32deg);
    border-radius: 2px;
}

.footer-fiet-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.footer-fiet-logo:hover {
    opacity: 1;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-out;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    max-width: 580px;
    width: 100%;
    padding: 2.2rem 2.2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    color: #64748B;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.notice-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #FFF0F3;
    color: #E02440;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
}

.notice-text {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.btn-notice-ok {
    background: linear-gradient(135deg, #E02440 0%, #C8102E 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 2.5rem;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.25);
    transition: var(--transition);
}

.btn-notice-ok:hover {
    background: linear-gradient(135deg, #C8102E 0%, #A50C24 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.35);
}

/* ==========================================================================
   Responsive Breakpoints for Mobile & Tablet
   ========================================================================== */
@media (max-width: 1140px) {
    .selection-container {
        flex-direction: column;
        gap: 2rem;
    }

    .selection-title-col {
        flex: none;
        max-width: 100%;
    }

    .selection-cards-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 900px) {
    .header-logo {
        height: 36px;
    }

    .hero-section {
        padding: 3.5rem 1.5rem;
        background-position: right 15% center;
        min-height: 420px;
    }

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 65%, rgba(255, 255, 255, 0.6) 100%);
        z-index: 1;
        pointer-events: none;
    }

    .selection-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .selection-cards-row .compact-card:last-child {
        grid-column: 1 / -1;
    }

    .compact-footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .compact-footer-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0.75rem 1rem;
        justify-content: center;
        gap: 0;
    }

    /* Hide login button on mobile */
    .header-actions {
        display: none !important;
    }

    /* Show logo taking full navbar width */
    .header-logo-link {
        max-width: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header-logo {
        height: auto;
        max-height: 42px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .hero-section {
        min-height: auto;
        padding: 2.25rem 1rem 2rem 1rem;
        background-position: right center;
    }

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
        z-index: 1;
        pointer-events: none;
    }

    .hero-title {
        font-size: clamp(1.65rem, 6.5vw, 2.1rem);
        line-height: 1.25;
        margin-bottom: 0.65rem;
    }

    .hero-faculty {
        font-size: 0.98rem;
        line-height: 1.45;
        margin-bottom: 0.85rem;
    }

    .hero-quote {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .hero-desc {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .selection-section {
        padding: 2.25rem 0 3rem 0;
    }

    .selection-container {
        padding: 0 1rem;
        gap: 1.25rem;
    }

    .selection-title {
        font-size: 1.45rem;
    }

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

    .selection-cards-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .selection-cards-row .compact-card:last-child {
        grid-column: auto;
    }

    .compact-card {
        padding: 1.15rem 1rem;
        border-radius: 16px;
    }

    .compact-card:active {
        transform: scale(0.98);
    }

    .card-icon-box {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .card-main-title {
        font-size: 1rem;
    }

    .card-desc-text {
        font-size: 0.82rem;
        margin-top: 0.65rem;
    }

    .compact-footer-body {
        padding: 2rem 1rem 2.25rem 1rem;
    }

    .compact-footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .compact-footer-left {
        align-items: center;
    }

    .copyright-line {
        font-size: 0.82rem;
    }

    .author-line {
        font-size: 0.78rem;
    }

    .compact-footer-right {
        justify-content: center;
    }

    .diagonal-stripes span {
        height: 28px;
    }

    .modal-overlay {
        padding: 1rem;
    }

    .modal-box {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    .modal-title {
        font-size: 1.2rem !important;
    }

    .notice-text {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .btn-notice-ok {
        padding: 0.65rem 2rem;
        font-size: 0.9rem;
    }
}
