/* ==========================================================
   CSS CUSTOM PROPERTIES
   ========================================================== */
:root {
    --color-black:       #000000;
    --color-white:       #FFFFFF;
    --color-primary:     #0057A0;
    --color-primary-hover: #0074d9;
    --color-accent:      #D72638;
    --color-text:        #4A4A4A;
    --color-bg:          #FFFFFF;
    --color-surface:     #F5F5F5;
    --color-divider:     #2a2a2a;
    --color-shadow:      rgba(0, 0, 0, 0.08);

    --font-base:         'Open Sans', sans-serif;
    --font-heading:      'Montserrat', sans-serif;

    --header-height:     120px;
    --header-shrink:     75px;

    --radius-sm:         6px;
    --radius-md:         8px;
    --radius-lg:         16px;

    --max-width:         1200px;
    --section-padding:   30px 20px 40px;
    --transition:        0.3s ease;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    scrollbar-gutter: stable;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: var(--font-base);
    background: var(--color-bg);
    color: var(--color-text);
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================
   HEADER
   ========================================================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--color-black);
    display: flex;
    align-items: center;
    transition: height 0.35s ease;
}

.header.shrink {
    height: var(--header-shrink);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-shrink);
    white-space: nowrap;
}

.header-left picture {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: height 0.35s ease;
}

.header.shrink .header-logo {
    height: 55px;
    width: auto;
}

.header-tagline {
    color: var(--color-white);
    font-size: 0.9rem;
    opacity: 0.85;
    transition: opacity 0.35s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* ==========================================================
   NAVIGATION
   ========================================================== */
.header-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.header-nav .nav-links a {
    color: var(--color-white);
    font-weight: 500;
    transition: color var(--transition), text-shadow var(--transition);
}

.header-nav .nav-links a:hover {
    color: #7ec8ff;
    text-shadow: 0 0 8px rgba(126, 200, 255, 0.9),
                 0 0 20px rgba(0, 116, 217, 0.7),
                 0 0 35px rgba(0, 87, 160, 0.4);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #111111;
    color: var(--color-white);
    min-width: 180px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    margin: 0;
}

.dropdown-content li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-content a {
    display: block;
    padding: 8px 15px;
    color: var(--color-white);
    transition: color var(--transition), text-shadow var(--transition);
}

.dropdown-content a:hover {
    color: #7ec8ff;
    text-shadow: 0 0 8px rgba(126, 200, 255, 0.9),
                 0 0 20px rgba(0, 116, 217, 0.7),
                 0 0 35px rgba(0, 87, 160, 0.4);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Support button */
.support-btn {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.support-btn:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 12px rgba(0, 116, 217, 0.7),
                0 0 24px rgba(0, 116, 217, 0.4);
    transform: translateY(-2px);
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-white);
    border-radius: 3px;
}

/* ==========================================================
   MOBILE MENU
   ========================================================== */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--color-black);
    padding: 20px 40px;
    gap: 10px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--color-white);
    padding: 6px 0;
    transition: color var(--transition), text-shadow var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a:active {
    color: #7ec8ff;
    text-shadow: 0 0 8px rgba(126, 200, 255, 0.9),
                 0 0 20px rgba(0, 116, 217, 0.7),
                 0 0 35px rgba(0, 87, 160, 0.4);
}

.mobile-dropbtn {
    background: none;
    border: none;
    color: var(--color-white);
    text-align: left;
    padding: 6px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: color var(--transition), text-shadow var(--transition);
}

.mobile-dropbtn:hover,
.mobile-dropbtn:active {
    color: #7ec8ff;
    text-shadow: 0 0 8px rgba(126, 200, 255, 0.9),
                 0 0 20px rgba(0, 116, 217, 0.7),
                 0 0 35px rgba(0, 87, 160, 0.4);
}

.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    padding-left: 15px;
    gap: 4px;
}

.mobile-dropdown-content.active {
    display: flex;
}

.mobile-support-btn {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ==========================================================
   HERO SLIDER
   ========================================================== */
.hero-slider {
    position: relative;
    height: 450px;
    width: 100%;
    margin-top: var(--header-height);
    margin-bottom: 20px;
    border-radius: 0;
    overflow: hidden;
    background: #0a0a0a;
    contain: layout;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}

.hero-overlay h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
}

/* ==========================================================
   BUTTONS & CTA
   ========================================================== */
.cta-btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}

.cta-btn:hover {
    background: #b81e2d;
    transform: translateY(-2px);
}

.cta-btn-container {
    text-align: center;
}

/* Service page utilities — replace inline styles */
.overview-block {
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: left;
    line-height: 1.7;
}

.overview-block h3 {
    margin-top: 30px;
}

.section-cta {
    margin-top: 20px;
    text-align: center;
}

.addons-section {
    margin-top: 0;
}

.grid-top {
    margin-top: 20px;
}

/* ==========================================================
   SECTION DIVIDER
   ========================================================== */
.section-divider {
    max-width: var(--max-width);
    width: 100%;
    height: 2px;
    background: var(--color-divider);
    margin: 20px auto 10px;
    border-radius: 2px;
}

/* ==========================================================
   SERVICES
   ========================================================== */
.services-overview {
    padding: 20px 40px;
    text-align: center;
    margin-top: 10px;
}

.services-subtitle {
    margin-bottom: 30px;
}

/* Non-home pages: clear fixed header */
body:not(.home) main > .services-overview:first-of-type {
    padding-top: calc(var(--header-height) + 20px);
}

.services-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Home page: constrain services grid so boxes stay centered, not full-width */
body.home .services-overview .services-grid {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.service-box {
    background: var(--color-surface);
    padding: 25px;
    border-radius: var(--radius-md);
    width: 300px;
    text-align: left;
    transition: transform var(--transition);
}

.service-box:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    min-height: 60px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-primary);
    transition: transform 0.35s ease, filter 0.35s ease, stroke 0.35s ease;
}

.service-box:hover .service-icon svg {
    transform: translateY(-4px) scale(1.08);
    stroke: var(--color-primary-hover);
    filter: drop-shadow(0 0 10px rgba(0, 116, 217, 0.55));
}

/* ==========================================================
   HOME — INTRO SECTION
   ========================================================== */
.home-intro {
    padding: 40px 40px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-intro-inner {
    display: flex;
    gap: 60px;
    align-items: center;
    flex-wrap: wrap;
}

.home-intro-text {
    flex: 2 1 340px;
    line-height: 1.8;
}

.home-intro-text h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 16px;
}

.home-intro-text p {
    margin-bottom: 16px;
    font-size: 1.05rem;
    color: var(--color-text);
    opacity: 0.9;
}

.home-intro-stats {
    flex: 1 1 220px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-box {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    border-top: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--color-text);
    opacity: 0.75;
    line-height: 1.3;
}

/* ==========================================================
   HOME — WHY CYBERARM SECTION
   ========================================================== */
.home-why {
    padding: 40px 40px;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-why h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
}

.why-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 30px;
}

.why-box {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    width: 280px;
    text-align: left;
    transition: transform var(--transition), box-shadow var(--transition);
    border-bottom: 3px solid transparent;
}

.why-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--color-shadow);
    border-bottom-color: var(--color-primary);
}

.why-icon {
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.why-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-white);
}

.why-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.why-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.85;
}

/* ==========================================================
   SUPPORT CTA BLOCK
   ========================================================== */
.boxed-support {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 40%, #e8f1ff 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--color-shadow);
    text-align: center;
}

.boxed-support .cta-btn {
    margin-top: 25px;
}

/* ==========================================================
   ABOUT PAGE
   ========================================================== */
.about-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 10px) 40px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
    min-height: 420px;
}

.about-hero-content {
    flex: 1 1 340px;
}

.about-hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.about-hero-content p {
    font-size: 1.15rem;
    opacity: 0.85;
    line-height: 1.6;
}

.about-hero-image {
    flex: 1 1 420px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-hero-image img {
    width: 100%;
    height: 380px;
    max-width: 580px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.about-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 40px 30px;
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-values {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-padding);
    text-align: center;
}

.about-values h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

/* ==========================================================
   CONTACT PAGE
   ========================================================== */
.contact-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 40px) 40px 120px;
    min-height: 80vh;
    overflow: visible;
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--color-text);
    opacity: 0.75;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.contact-layout {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Info Panel */
.contact-info-panel {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-surface);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px var(--color-shadow);
}

.contact-card-icon {
    width: 42px;
    height: 42px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-white);
}

.contact-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.contact-card-text a,
.contact-card-text span {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
}

.contact-card-text a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.contact-promise {
    margin-top: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f5f9ff, #e8f1ff);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.6;
    opacity: 0.9;
}

/* Form Panel */
.contact-form-panel {
    flex: 2 1 420px;
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px var(--color-shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 180px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.required {
    color: var(--color-accent);
}

.optional {
    font-weight: 400;
    opacity: 0.6;
    font-size: 0.8rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid #ddd;
    font-family: var(--font-base);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-white);
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 87, 160, 0.1);
}

.form-group.form-error input,
.form-group.form-error textarea {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: flex-start;
    padding: 14px 32px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.contact-submit-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-white);
    transition: transform var(--transition);
}

.contact-submit-btn:hover svg {
    transform: translateX(4px);
}

/* Alerts */
.form-alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.form-alert-error {
    background: #fff0f1;
    border-left: 3px solid var(--color-accent);
    color: #8b0000;
}

.form-alert-error a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Success State */
.form-success {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.form-success-icon {
    width: 70px;
    height: 70px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success-icon svg {
    width: 36px;
    height: 36px;
    stroke: #2e7d32;
}

.form-success h3 {
    font-size: 1.8rem;
    color: var(--color-text);
    margin: 0;
}

.form-success p {
    color: var(--color-text);
    opacity: 0.8;
    font-size: 1rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 12px 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    opacity: 0.85;
}

.footer-left h3 {
    font-size: 1rem;
    margin-bottom: 3px;
    line-height: 1;
}

.footer-left p {
    font-size: 0.85rem;
    margin-bottom: 3px;
    line-height: 1;
}

.footer-nav {
    display: flex;
    gap: 10px;
}

.footer-nav a {
    color: var(--color-white);
    font-size: 1rem;
    margin: 3px 0;
    opacity: 0.85;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer a {
    color: var(--color-white);
    opacity: 0.85;
}

/* ==========================================================
   RESPONSIVE — TABLET & MOBILE (max-width: 900px)
   ========================================================== */
@media (max-width: 900px) {

    /* Push page content below the fixed header on mobile */
    body {
        padding-top: 80px;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9000;
        height: 80px;
    }

    .header-nav {
        display: none;
    }

    .hamburger {
        display: flex;
        flex-shrink: 0;
        position: relative;
        z-index: 99999;
    }

    .header-left {
        flex-direction: row;
        align-items: center;
        white-space: nowrap;
        gap: 8px;
        min-width: 0;
    }

    .header-logo {
        height: 50px;
        width: auto;
    }

    .header-tagline {
        display: none;
    }

    .header-right {
        gap: 12px;
        min-width: 0;
    }

    .support-btn {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* Shrink mode overrides */
    .header.shrink .header-logo {
        height: 45px;
    }

    .header.shrink .header-tagline {
        display: none;
    }

    .header.shrink .header-left,
    .header.shrink .header-right {
        flex-direction: column;
        align-items: flex-start;
        white-space: normal;
        gap: 12px;
        min-width: 0;
    }

    /* Mobile menu — fixed directly below the header */
    .mobile-menu {
        position: fixed;
        top: var(--header-shrink);
        left: 0;
        width: 100%;
        padding: 20px 30px;
        margin-top: 0;
        z-index: 8999;
    }

    /* Push page content below the fixed header on mobile */
    body {
        padding-top: var(--header-height);
    }

    /* Hero */
    .hero-overlay h1 {
        font-size: 2rem;
    }

    .hero-slider {
        margin-top: 8px;
        padding-top: 0;
    }

    /* On mobile the header is position:fixed with body padding-top to compensate.
       Remove any additional top offsets from sections. */
    .services-overview,
    .cloud-services-hero,
    .page-hero,
    .service-hero,
    .hero-section,
    .section-hero,
    body:not(.home) main > .services-overview:first-of-type,
    .about-hero,
    .contact-section {
        margin-top: 0;
        padding-top: 20px;
    }

    /* Contact */
    .contact-layout {
        flex-direction: column;
    }

    .contact-form-panel {
        padding: 24px;
    }

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

    .contact-submit-btn {
        align-self: stretch;
        text-align: center;
        justify-content: center;
    }

    .contact-header h1 {
        font-size: 2rem;
    }

    /* Home sections */
    .home-intro,
    .home-why {
        padding: 30px 20px;
    }

    .home-intro-inner {
        flex-direction: column;
        gap: 30px;
    }

    .home-intro-stats {
        width: 100%;
    }

    .why-box {
        width: 100%;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}
