/* 
 * Arrow Intelligent Systems - Main Stylesheet
 * Shared styles across all pages
 */

/* ============================================
   CSS VARIABLES (Design Tokens)
   ============================================ */
:root {
    --primary-blue: #0a1428;
    --secondary-blue: #1e3a5f;
    --accent-blue: #2563eb;
    --light-blue: #3b82f6;
    --text-light: #e5e7eb;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --border-gray: #374151;
    --success-green: #10b981;
    --gradient-primary: linear-gradient(135deg, #0a1428 0%, #1e3a5f 100%);
    --gradient-accent: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--primary-blue);
    overflow-x: hidden;
}

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

/* Ensure in-page scroll targets aren't hidden behind fixed nav */
.page-section,
#contact {
    scroll-margin-top: 160px;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 20, 40, 0.85);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1330px;
    margin: 0 auto;
    padding: 0 10px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    height: 160px;
    width: auto;
    margin-left: 0px;
    margin-right: 10px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-white);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--light-blue);
    transform: translateY(-1px);
}

/* Dropdown Menu Styles */
.nav-menu li {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dropdown-toggle::before {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.dropdown-toggle.active::before {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 20, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--light-blue);
    padding-left: 2rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.mobile-menu-btn:hover {
    color: var(--light-blue);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--light-blue);
    outline-offset: 2px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--text-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light-blue);
    border: 2px solid var(--light-blue);
}

.btn-secondary:hover {
    background: var(--light-blue);
    color: var(--text-white);
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-white) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CARD STYLES
   ============================================ */
.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-gray);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--light-blue);
}

.service-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.service-card p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(10, 20, 40, 0.95) 100%);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section a:hover {
    color: var(--light-blue);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   TOOLTIP STYLES
   ============================================ */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 350px;
    background-color: var(--primary-blue);
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 15px;
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    -webkit-text-fill-color: #fff;
    color: #fff;
    position: absolute;
    z-index: 999;
    bottom: 90%;
    left: 110%;
    margin-left: 0;
    margin-bottom: 0;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--border-gray);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    line-height: 1.4;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-blue) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltip-asterisk {
    color: var(--light-blue);
    font-size: 1.1em;
    font-weight: bold;
    vertical-align: super;
    margin-left: 3px;
    text-shadow: 0 0 2px #fff, 0 0 2px var(--primary-blue);
    cursor: help;
}

/* ============================================
   HUBSPOT FORM STYLES
   ============================================ */
.hs-form-frame {
    background-color: #ffffff !important;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-logo {
        height: 140px;
    }

    .page-section,
    #contact {
        scroll-margin-top: 140px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-logo {
        height: 120px;
    }

    .page-section,
    #contact {
        scroll-margin-top: 120px;
    }

    .logo {
        font-size: 1rem;
    }

    .nav-container {
        padding: 0 15px;
    }

    /* Mobile Menu Implementation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 120px 2rem 2rem 2rem;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        border-left: 1px solid var(--border-gray);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.35s; }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1.2rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        color: var(--light-blue);
        padding-left: 0.5rem;
        transform: translateY(0);
    }

    .nav-menu a::after {
        display: none;
    }

    /* Mobile Dropdown Styles */
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-menu.show {
        max-height: 300px;
    }

    .dropdown-menu a {
        padding: 1rem 0 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown-menu a:hover {
        padding-left: 2rem;
    }

    .dropdown-toggle::before {
        position: absolute;
        right: 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .service-card {
        padding: 2rem;
    }

    .tooltip .tooltiptext {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 110%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
    }

    .nav-logo {
        height: 100px;
    }

    .page-section,
    #contact {
        scroll-margin-top: 100px;
    }

    .logo {
        font-size: 0.9rem;
    }

    .nav-menu {
        width: 100%;
        max-width: none;
        padding: 100px 1.5rem 2rem 1.5rem;
    }

    .mobile-menu-btn {
        font-size: 1.6rem;
        padding: 0.3rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .tooltip .tooltiptext {
        width: 250px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 110%;
        font-size: 0.85rem;
        padding: 12px;
    }
}
