/* ===========================
   FONT (ĐẶT ĐẦU TIÊN)
=========================== */
@font-face {
    font-family: 'General Sans';
    src: url('font/GeneralSans-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('font/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* ===========================
   CSS VARIABLES & THEMES
=========================== */
:root {
    --hover-color: #8a8a8a;
    --click-color: #A3C9F1;
    --bg-main: #ffffff;
    --text-main: #333;
    --navbar-bg: #ffffff;
    --navbar-text: #333;
}

body.dark {
    --bg-main: #000000;
    --text-main: #ffffff;
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
}

/* ===========================
   BASE
=========================== */
body {
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif; /* body dùng Roboto */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* ===========================
   HEADER
=========================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background-color: var(--navbar-bg);
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 9999;
    font-family: 'General Sans', sans-serif; /* navbar dùng General Sans */
}

.logo-img { height: 65px; width: auto; }

/* ===========================
   MAIN NAV
=========================== */
.main-nav { display: flex; align-items: center; }

.main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    font-size: 20px;
    font-family: 'General Sans', sans-serif;
}

.main-menu li { margin-right: 30px; }

.nav-item {
    text-decoration: none;
    color: var(--navbar-text);
    padding: 5px 0;
    display: block;
    transition: color 0.2s;
    font-family: 'General Sans', sans-serif;
}

.main-item:hover { color: var(--hover-color); }
.main-item.active,
.main-item.clicked { color: var(--click-color); }
body.dark .main-item.active,
body.dark .main-item.clicked { color: var(--click-color); }

/* ===========================
   NAV ACTIONS
=========================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* ===========================
   THEME TOGGLE
=========================== */
.theme-toggle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    outline: 1px solid var(--navbar-text);
    background-color: #000;
    transition: background-color 0.3s ease;
}

body.dark .theme-toggle { background-color: #fff; }

/* ===========================
   HAMBURGER
=========================== */
.hamburger-menu {
    cursor: pointer;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px;
    transition: transform 0.3s;
}

.bar {
    width: 100%;
    height: 1.5px;
    background-color: var(--navbar-text);
    border: none;
    box-shadow: none;
    transition: all 0.3s;
}

.hamburger-menu.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 8px); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -8px); }

/* ===========================
   DROPDOWN
=========================== */
.dropdown-menu {
    list-style: none;
    padding: 10px 20px;
    margin: 0;
    position: absolute;
    top: 70px;
    right: 0;
    background: transparent;
    box-shadow: none;
    z-index: 1000;
    min-width: 150px;
    text-align: right;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    font-family: 'General Sans', sans-serif;
}

.dropdown-menu.visible { display: block; opacity: 1; transform: translateY(0); }
.dropdown-menu li { padding: 8px 85px; }
.dropdown-menu a { color: var(--navbar-text); }
.sub-item { font-size: 16px; padding: 0; }
.sub-item:hover { color: var(--hover-color); }
.sub-item.active,
.sub-item.clicked { color: var(--click-color); }

/* ===========================
   HERO
=========================== */
.hero {
    padding: 60px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.7;
    color: var(--text-main);
}

.tags { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

.tag {
    padding: 8px 20px;
    background: #dfdfdf;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* ===========================
   VIDEO
=========================== */
.video-prototype {
    margin: 80px calc(-50vw + 50%);
    width: 100vw;
}

.video-prototype-img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.video-prototype-img::-webkit-media-controls,
.video-prototype-img::-webkit-media-controls-enclosure { display: none !important; }

/* ===========================
   MOCKUP
=========================== */
.mockup-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    margin: 80px 0;
}

.mockup-layout-img { width: 100%; height: auto; object-fit: cover; display: block; }

/* ===========================
   CONTENT SECTIONS
=========================== */
.content-section {
    max-width: 1350px;
    margin: 60px auto;
    padding: 0 60px;
}

.content-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.content-section h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 40px 0 20px;
    color: var(--text-main);
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    opacity: 0.7;
    color: var(--text-main);
}

.content-section ul { list-style: none; margin: 20px 0; padding: 0; }

.content-section ul li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.7;
    color: var(--text-main);
}

.content-section ul li::before { content: "—"; position: absolute; left: 0; }

/* ===========================
   INFO GRID
=========================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 100px;
    margin: 60px 0;
}

.info-item h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 500;
    opacity: 0.6;
    color: var(--text-main);
}

.info-item p { font-size: 1.2rem; margin: 0; color: var(--text-main); }
.info-item .role-description { font-size: 1rem; line-height: 1.8; margin-top: 10px; opacity: 0.7; }

.info-item .timeline-details,
.info-item .deliverables-list { list-style: none; padding: 0; margin-top: 10px; }

.info-item .timeline-details li,
.info-item .deliverables-list li {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.7;
    margin-bottom: 8px;
    padding-left: 0;
    color: var(--text-main);
}

.info-item .timeline-details li::before,
.info-item .deliverables-list li::before { content: none; }

/* ===========================
   FULL WIDTH IMAGE
=========================== */
.full-width-image { width: 100%; margin: 80px 0; }
.full-width-image img { width: 100%; height: auto; display: block; }

/* ===========================
   FIGMA SECTION
=========================== */
.figma-section {
    padding: 20px 60px;
    text-align: center;
}

.figma-section h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-main);
}

.figma-link {
    color: var(--text-main);
    text-decoration: underline;
    font-size: 1.5rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.figma-link:hover { opacity: 0.6; }

/* ===========================
   FOOTER
=========================== */
.main-footer {
    width: 100%;
    height: 250px;
    background-color: #A3C9F1;
    margin-top: 100px;
    position: relative;
}
 
.logo-footer { display: flex; justify-content: left; align-items: center; padding: 40px 60px; }
.footer { display: flex; justify-content: space-between; padding: 60px 60px 0; }
 
.back-to-top {
    position: absolute;
    top: 40px;
    right: 60px;
    background: none;
    font-size: 18px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease;
}
 
.back-to-top:hover { transform: scale(1.05); }
 
.footer a {
    color: #000;
    text-decoration: none;
}
 
.footer a:hover {
    text-decoration: underline;
}
 
.footer-highlight {
    font-size: 24px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
}

/* ===========================
   MOBILE < 480px
=========================== */
@media (max-width: 480px) {
    .header { padding: 14px 20px; }
    .logo-img { height: 40px; }
    .main-menu { font-size: 13px; }
    .main-menu li { margin-right: 10px; }
    .nav-actions { gap: 10px; }
    .theme-toggle { width: 18px; height: 18px; }
    .hamburger-menu { width: 20px; height: 16px; }
    .hamburger-menu.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-4px, 6px); }
    .hamburger-menu.active .bar:nth-child(3) { transform: rotate(45deg) translate(-4px, -6px); }
    .dropdown-menu { top: 55px; right: 20px; min-width: 120px; padding: 6px 8px; }
    .dropdown-menu li { padding: 6px 16px; }
    .sub-item { font-size: 13px; }

    .hero { padding: 30px 20px; }
    .hero h1 { font-size: 1.8rem; }
    .hero .subtitle { font-size: 1rem; margin-bottom: 25px; }
    .tag { font-size: 0.8rem; padding: 6px 14px; }

    .content-section { padding: 0 20px; margin: 30px auto; }
    .content-section h2 { font-size: 1.6rem; }
    .content-section h3 { font-size: 1.3rem; }
    .content-section p, .content-section ul li { font-size: 1rem; }

    .info-grid { grid-template-columns: 1fr; gap: 30px; margin: 30px 0; }
    .video-prototype { margin: 30px calc(-50vw + 50%); }
    .mockup-layout { gap: 30px; margin: 30px 0; }
    .full-width-image { margin: 30px 0; }
    .figma-section { padding: 20px; }

    .main-footer { min-height: auto; margin-top: 50px; padding-bottom: 20px; height: auto; }
    .logo-footer { padding: 20px 16px 10px; }
    .logo-footer .logo-img { height: 34px; }
    .back-to-top { position: static; display: block; text-align: right; padding: 0 16px 10px; font-size: 13px; }
    .footer-bar { flex-direction: column; align-items: flex-start; padding: 8px 16px 16px; gap: 5px; font-size: 11px; }
}

/* ===========================
   MOBILE 481–767px
=========================== */
@media (min-width: 481px) and (max-width: 767px) {
    .header { padding: 16px 28px; }
    .logo-img { height: 46px; }
    .main-menu { font-size: 15px; }
    .main-menu li { margin-right: 16px; }
    .nav-actions { gap: 12px; }
    .theme-toggle { width: 20px; height: 20px; }
    .dropdown-menu { top: 58px; right: 28px; padding: 8px 10px; }
    .dropdown-menu li { padding: 6px 24px; }
    .sub-item { font-size: 14px; }

    .hero { padding: 40px 30px; }
    .hero h1 { font-size: 2.2rem; }
    .hero .subtitle { font-size: 1.1rem; }
    .tag { font-size: 0.85rem; padding: 7px 16px; }

    .content-section { padding: 0 30px; margin: 40px auto; }
    .content-section h2 { font-size: 1.9rem; }
    .content-section h3 { font-size: 1.4rem; }
    .content-section p, .content-section ul li { font-size: 1.05rem; }

    .info-grid { grid-template-columns: 1fr 1fr; gap: 35px; margin: 40px 0; }
    .video-prototype { margin: 50px calc(-50vw + 50%); }
    .mockup-layout { gap: 40px; margin: 50px 0; }
    .full-width-image { margin: 50px 0; }

    .main-footer { margin-top: 60px; padding-bottom: 20px; height: auto; }
    .logo-footer { padding: 24px 28px 10px; }
    .back-to-top { position: static; display: block; text-align: right; padding: 0 28px 10px; font-size: 14px; }
    .footer-bar { flex-direction: column; align-items: flex-start; padding: 8px 28px 16px; gap: 5px; font-size: 12px; }
}

/* ===========================
   TABLET 768–1023px
=========================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .header { padding: 20px 40px; }
    .logo-img { height: 55px; }
    .main-menu { font-size: 18px; }
    .main-menu li { margin-right: 25px; }
    .nav-actions { gap: 18px; }
    .hamburger-menu { width: 22px; height: 19px; }
    .hamburger-menu.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-4.5px, 7.5px); }
    .hamburger-menu.active .bar:nth-child(3) { transform: rotate(45deg) translate(-4.5px, -7.5px); }
    .dropdown-menu { top: 65px; right: 40px; min-width: 140px; }
    .dropdown-menu li { padding: 8px 60px; }
    .sub-item { font-size: 15px; }

    .hero { padding: 50px 40px; }
    .hero h1 { font-size: 2.6rem; }
    .hero .subtitle { font-size: 1.3rem; }

    .content-section { padding: 0 40px; margin: 50px auto; }
    .content-section h2 { font-size: 2.2rem; }
    .content-section h3 { font-size: 1.6rem; }

    .info-grid { grid-template-columns: 1fr 1fr; gap: 50px; margin: 50px 0; }
    .video-prototype { margin: 60px calc(-50vw + 50%); }
    .mockup-layout { gap: 60px; margin: 60px 0; }
    .full-width-image { margin: 60px 0; }

    .main-footer { height: 220px; margin-top: 80px; }
    .logo-footer { padding: 35px 40px; }
    .footer-bar { padding: 50px 40px 0; }
    .back-to-top { top: 35px; right: 40px; font-size: 17px; }
}

/* ===========================
   PRINT
=========================== */
@media print {
    .header, .hamburger-menu, .dropdown-menu, .back-to-top { display: none; }
    body { background: white; color: black; }
}