/* CSS cho Layout AMP chung - Header, Sidebar, Modal Liên hệ */

:root {
    --primary: #2563eb;
    --text: #0f172a;
    --bg: #f4f6fb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    padding-bottom: 90px;
}

/* Main Content Area */
.amp-main-content {
    padding-top: 64px;
}

/* Header */
.amp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.2);
}

.amp-header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.amp-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #e5e7eb;
}

.amp-logo img {
    display: block;
    height: 32px;
    width: auto;
}


.amp-menu-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.amp-menu-btn span {
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: all 0.3s;
}

/* Sidebar */
.amp-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: #0b1120;
    color: #e5e7eb;
    z-index: 1200;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 18px 16px 24px;
}

.amp-sidebar.is-open {
    left: 0;
}

.amp-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.amp-sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.amp-sidebar-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amp-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.amp-sidebar-list li {
    margin-bottom: 6px;
}

.amp-sidebar-list a {
    display: block;
    padding: 8px 6px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.2s;
}

.amp-sidebar-list a:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #bfdbfe;
}

.amp-sidebar-sublist {
    list-style: none;
    padding: 0;
    margin: 4px 0 4px 16px;
    display: none;
}

.amp-caret {
    float: right;
    color: #9ca3af;
    font-size: 12px;
}

.amp-sidebar-sublist > li > a {
    padding: 6px 6px 6px 20px;
    font-size: 13px;
    color: #9ca3af;
    display: block;
}

.amp-sidebar-sublist > li > a:hover {
    color: #bfdbfe;
    background: rgba(148, 163, 184, 0.1);
}

.amp-sidebar-sublist-level2 {
    margin-left: 16px;
}

.amp-sidebar-sublist-level2 > li > a {
    padding-left: 30px;
    font-size: 12px;
}

.amp-sidebar-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin: 10px 0 2px;
    padding: 8px 6px;
}

.amp-pill {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.2;
    vertical-align: middle;
    margin-left: 4px;
}

.amp-pill.hoc {
    background: #dbeafe;
    color: #1e40af;
}

.amp-pill.thi {
    background: #fee2e2;
    color: #991b1b;
}

/* Backdrop */
.amp-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.amp-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Liên hệ AMP */
.amp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.amp-modal.is-open {
    display: flex;
}

.amp-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.amp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.amp-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 10;
}

.amp-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.amp-modal-subtitle {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.amp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.amp-modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
}

.amp-modal-body {
    padding: 20px;
}

.amp-modal-promo {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
    text-align: center;
}

.amp-timer {
    font-weight: 700;
    color: #dc2626;
}

.amp-contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.amp-form-group {
    width: 100%;
}

.amp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.amp-input-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
}

.amp-input,
.amp-select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    color: var(--text);
    transition: all 0.2s;
}

.amp-input:focus,
.amp-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.amp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.amp-modal-footer {
    margin-top: 8px;
}

.amp-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.amp-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.amp-submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .amp-modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
    
    .amp-modal-header {
        padding: 16px;
    }
    
    .amp-modal-body {
        padding: 16px;
    }
    
    .amp-modal-header h3 {
        font-size: 18px;
    }
}

