/* ==========================================================
   ICT Systems – Main Stylesheet
   ========================================================== */

/* ----------------------------------------------------------
   0. Nav status button
   ---------------------------------------------------------- */
.nav-status-li { margin-left: 8px; }

.nav-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 5px 13px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    font-family: inherit;
    transition: background var(--tr), color var(--tr);
    white-space: nowrap;
}
.nav-status-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-status-btn:hover { background: var(--primary); color: #fff; }

/* ----------------------------------------------------------
   Modal
   ---------------------------------------------------------- */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { display: flex; }

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: modal-in .2s ease;
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    line-height: 0;
    transition: color var(--tr), background var(--tr);
}
.modal-close:hover { color: var(--text-primary); background: var(--surface-2); }
.modal-close svg { width: 18px; height: 18px; }

.modal-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.modal-icon svg { width: 22px; height: 22px; }

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    padding-right: 28px;
}
.modal-desc {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-bottom: 24px;
}

/* Form */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--tr);
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.form-group input.invalid { border-color: #d93025; }

.modal-submit {
    width: 100%;
    margin-top: 6px;
    padding: 11px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .97rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--tr), opacity var(--tr);
}
.modal-submit:hover { background: var(--primary-hover); }
.modal-submit:disabled { opacity: .55; cursor: not-allowed; }

/* Result container */
.ticket-result {
    display: none;
    margin-top: 18px;
    border-radius: 10px;
    overflow: hidden;
    font-size: .9rem;
}
.ticket-result.is-visible { display: block; }

/* Error state */
.ticket-result.tr-error {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.ticket-result.tr-error.is-visible { display: flex; }
[data-theme="dark"] .ticket-result.tr-error { background: #2d1515; border-color: #6b2020; }
.ticket-result.tr-error svg { width: 18px; height: 18px; color: #dc2626; flex-shrink: 0; margin-top: 1px; }
.ticket-result.tr-error p { color: #b91c1c; line-height: 1.55; }
[data-theme="dark"] .ticket-result.tr-error p { color: #f87171; }

/* Success state */
.ticket-result.tr-success {
    border: 1px solid var(--border);
    background: var(--surface);
}
.tr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.tr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: .85rem;
    color: var(--badge-color, #6b7280);
}
.tr-status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--badge-color, #6b7280);
    flex-shrink: 0;
}
.tr-ticket-num {
    font-family: monospace;
    font-size: .82rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid var(--border);
}
.tr-device {
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}
.tr-details {
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}
.tr-row {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    line-height: 1.45;
}
.tr-row-label {
    flex-shrink: 0;
    width: 80px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-muted);
    padding-top: 1px;
}
.tr-row span:last-child { color: var(--text-primary); }
.tr-section-label {
    padding: 8px 16px 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.tr-no-items {
    padding: 10px 16px;
    font-size: .88rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.tr-items {
    list-style: none;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.tr-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 16px;
    color: var(--text-secondary);
}
.tr-items li span:last-child { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.tr-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.tr-total strong { color: var(--text-primary); font-size: 1rem; }
.tr-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: .78rem;
}

@media (max-width: 768px) {
    .nav-status-li { margin-left: 0; }
    .nav-status-btn { width: 100%; justify-content: flex-start; padding: 11px 14px; font-size: .9rem; border: none; border-radius: 8px; background: var(--primary-light); color: var(--primary); }
    .nav-status-btn:hover { background: var(--primary); color: #fff; }
}

/* ----------------------------------------------------------
   1. CSS Custom Properties – Light theme (default)
   ---------------------------------------------------------- */
:root {
    --bg:           #f6f8fb;
    --surface:      #ffffff;
    --surface-2:    #eef1f6;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted:   #718096;
    --primary:      #0062cc;
    --primary-hover:#004fa3;
    --primary-light:#e6f0ff;
    --border:       #e2e8f0;
    --shadow:       0 2px 10px rgba(0,0,0,.07);
    --shadow-hover: 0 8px 28px rgba(0,0,0,.13);
    --nav-bg:       rgba(255,255,255,.95);
    --radius:       14px;
    --tr:           .25s ease;
}

/* ----------------------------------------------------------
   2. Dark theme
   ---------------------------------------------------------- */
[data-theme="dark"] {
    --bg:           #0d1117;
    --surface:      #161b22;
    --surface-2:    #1c2230;
    --text-primary: #e6edf3;
    --text-secondary:#8d96a0;
    --text-muted:   #6a737d;
    --primary:      #58a6ff;
    --primary-hover:#79c0ff;
    --primary-light:#1a2d42;
    --border:       #30363d;
    --shadow:       0 2px 10px rgba(0,0,0,.4);
    --shadow-hover: 0 8px 28px rgba(0,0,0,.55);
    --nav-bg:       rgba(13,17,23,.95);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background var(--tr), color var(--tr);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--tr);
}
a:hover { color: var(--primary-hover); }

/* ----------------------------------------------------------
   4. Layout helpers
   ---------------------------------------------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 88px 0; }

section h2 {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 52px;
    color: var(--text-primary);
    letter-spacing: -.5px;
}

/* ----------------------------------------------------------
   5. Navigation
   ---------------------------------------------------------- */
header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background var(--tr), border-color var(--tr);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
    /* keep colours in light mode; invert to white in dark mode */
    transition: filter var(--tr);
}

[data-theme="dark"] .logo-img {
    filter: brightness(0) invert(1);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: .95rem;
    padding: 6px 14px;
    border-radius: 8px;
    transition: background var(--tr), color var(--tr);
}
.nav-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
#theme-toggle {
    width: 34px;
    padding-inline: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-controls button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    transition: background var(--tr), border-color var(--tr), color var(--tr);
    line-height: 1.4;
}
.nav-controls button:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px !important;
    width: 40px;
    height: 40px;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
   6. Hero
   ---------------------------------------------------------- */
#hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 72px;
    background: linear-gradient(145deg, #0055b3 0%, #003d8f 55%, #00297a 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] #hero {
    background: linear-gradient(145deg, #0d1f3c 0%, #091628 55%, #050e1c 100%);
}

/* subtle dot-grid pattern */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-sub {
    font-size: clamp(.95rem, 2.5vw, 1.15rem);
    color: rgba(255,255,255,.75);
    margin-bottom: 44px;
    letter-spacing: .3px;
}

.btn {
    display: inline-block;
    background: #fff;
    color: #0055b3;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform var(--tr), box-shadow var(--tr), color var(--tr);
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.3);
    color: #003d8f;
}

/* ----------------------------------------------------------
   7. Services
   ---------------------------------------------------------- */
#services { background: var(--bg); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
    box-shadow: var(--shadow);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
}
.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.service-card p {
    color: var(--text-secondary);
    font-size: .93rem;
    line-height: 1.75;
}

/* ----------------------------------------------------------
   8. About
   ---------------------------------------------------------- */
#about { background: var(--surface-2); }

.about-content {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.about-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    text-align: center;
}

/* ----------------------------------------------------------
   9. Contact  (dark footer-style section)
   ---------------------------------------------------------- */
#contact {
    background: linear-gradient(160deg, #004ea8 0%, #002f6e 50%, #001d4a 100%);
    padding-bottom: 0;
}
[data-theme="dark"] #contact {
    background: linear-gradient(160deg, #0b1e38 0%, #071525 50%, #040d18 100%);
}

.cf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding-bottom: 52px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    align-items: start;
    max-width: 700px;
    margin: 0 auto;
}

/* data columns */
.cf-col-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
}
.cf-col-icon svg { width: 20px; height: 20px; }

.cf-col-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: rgba(255,255,255,.45);
    margin-bottom: 14px;
}

.cf-addr {
    font-style: normal;
    color: rgba(255,255,255,.8);
    font-size: .97rem;
    line-height: 1.9;
}

.cf-contacts {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cf-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cf-contacts svg {
    width: 15px;
    height: 15px;
    color: rgba(255,255,255,.4);
    flex-shrink: 0;
}
.cf-contacts a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: .97rem;
    transition: color var(--tr);
}
.cf-contacts a:hover { color: #fff; }

/* copyright strip */
.cf-copy {
    padding: 24px 0;
    text-align: center;
    color: rgba(255,255,255,.3);
    font-size: .82rem;
}

/* ----------------------------------------------------------
   10. Footer — removed, copyright lives inside #contact
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   11. Responsive – tablet
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 20px 20px;
        gap: 2px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 11px 14px; display: block; }

    section { padding: 64px 0; }

    .cf-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* ----------------------------------------------------------
   12. Responsive – mobile
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    nav, .container { padding-inline: 16px; }

    section h2 { margin-bottom: 36px; }

    .services-grid { grid-template-columns: 1fr; }

    .cf-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .cf-brand {
        flex-direction: column;
        align-items: flex-start;
    }
}
