/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #050811;
    color: #E5E7EB;
}

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.6rem;
}

p, li {
    font-size: 1rem;
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.7rem;
    }
    h2 {
        font-size: 1.3rem;
    }
}

/* --------------------------------------------------
   HEADER + NAVIGATION
-------------------------------------------------- */
header {
    background: #020617;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    height: 40px;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transition: 0.3s;
}

header nav a {
    color: #E5E7EB;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    margin: 0;
    border: 1px solid #1F2937;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

header nav a:hover {
    background: #38BDF8;
    border-color: #38BDF8;
    color: #020617;
}

header nav a.active {
    background: #38BDF8;
    border-color: #38BDF8;
    color: #020617;
    font-weight: 700;
}

header nav .cta {
    background: #38BDF8;
    padding: 8px 16px;
    border-radius: 6px;
    color: #020617;
    border-color: #38BDF8;
}

/* --------------------------------------------------
   HAMBURGER MENU
-------------------------------------------------- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #E5E7EB;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */
.hero {
    background: #020617;
    color: #E5E7EB;
    padding: 120px 0;
    text-align: center;
}

.hero .btn-primary {
    background: #38BDF8;
    padding: 12px 24px;
    border-radius: 4px;
    color: #020617;
    text-decoration: none;
    margin-right: 10px;
}

.hero .btn-secondary {
    border: 2px solid #38BDF8;
    padding: 10px 22px;
    border-radius: 4px;
    color: #E5E7EB;
    text-decoration: none;
}

@media (max-width: 600px) {
    .hero {
        padding: 60px 0;
    }
    .hero .btn-primary,
    .hero .btn-secondary {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 8px 0 0 0;
        text-align: center;
    }
}

/* --------------------------------------------------
   SERVICES GRID
-------------------------------------------------- */
.services {
    padding: 80px 0;
}

.services .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.card {
    background: #0B1220;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    text-align: center;
}

.card .icon {
    height: 50px;
    margin-bottom: 20px;
}

/* --------------------------------------------------
   PAGE HEADER
-------------------------------------------------- */
.page-header {
    background: #0B1220;
    color: #E5E7EB;
    padding: 60px 0;
    text-align: center;
}

@media (max-width: 600px) {
    .page-header {
        padding: 36px 0;
    }
}

/* --------------------------------------------------
   CASE STUDIES
-------------------------------------------------- */
.case {
    background: #0B1220;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* --------------------------------------------------
   BUTTONS (global)
-------------------------------------------------- */
.btn-primary {
    display: inline-block;
    background: #38BDF8;
    padding: 12px 24px;
    border-radius: 4px;
    color: #020617;
    text-decoration: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 480px) {
    .btn-primary {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* --------------------------------------------------
   FORMS (global - covers contact, checkout, login,
   register, admin/cpadmin forms, etc.)
-------------------------------------------------- */
input, textarea, select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* 16px minimum prevents iOS Safari from auto-zooming in on focus */
    font-size: max(16px, 1rem);
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid #1F2937;
    background: #020617;
    color: #E5E7EB;
    font-family: 'Roboto', sans-serif;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
}

.contact-form form,
.contact-form .contact-info {
    flex: 1 1 100%;
}

.contact-info {
    flex: 1;
}

/* --------------------------------------------------
   TABLES (global - wrap any wide table in
   <div class="table-scroll">...</div> to enable
   horizontal scroll on narrow screens instead of
   squashing or breaking layout)
-------------------------------------------------- */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
}

.table-scroll table {
    min-width: 600px;
}

/* --------------------------------------------------
   CARD GRIDS (covers .services .grid and cportal's
   .cp-grid, so both respond the same way)
-------------------------------------------------- */
@media (max-width: 1024px) {
    .services .grid,
    .cp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .services .grid,
    .cp-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
footer {
    background: #020617;
    color: #E5E7EB;
    text-align: center;
    padding: 20px 0;
}

footer p {
    margin: 6px 0;
}

/* --------------------------------------------------
   MOBILE RESPONSIVE
-------------------------------------------------- */
@media (max-width: 1024px) {
    .services .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    body {
        padding-bottom: 40px;
    }

    .container {
        padding: 0 16px;
    }

    .header-flex {
        flex-direction: column;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: #020617;
        padding: 20px 0;
    }

    header nav.open {
        display: flex;
    }

    header nav a {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .contact-form {
        flex-direction: column;
    }

    .contact-info {
        margin-top: 20px;
    }

    .services .grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .case {
        padding: 20px;
    }
}