/* ==========================================================================
   NIVYON TECHNOLOGY - GLOBAL STYLESHEET
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    
    --border-glass: rgba(226, 232, 240, 0.8);
    --border-glow: rgba(37, 99, 235, 0.3);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    
    --accent-blue: #2563eb;
    --accent-cyan: #0284c7;
    --accent-purple: #7c3aed;
    --accent-green: #059669;
    
    --gradient-primary: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #7c3aed 100%);
    --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    height: 48px;
    width: auto;
}

.logo-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

.logo-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 0.62rem;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 3.2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-blue) !important;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
}

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

/* ===== HERO & PAGE HEADERS ===== */
.hero, .page-header {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 10%, rgba(2, 132, 199, 0.06) 0%, transparent 70%);
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.hero h1, .page-header h1 {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero h1 span, .page-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p, .page-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
}

/* ===== SERVICES & PORTFOLIO GRIDS ===== */
.services-section, .portfolio-section {
    padding-bottom: 120px;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.services-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card, .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 38px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover, .project-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-premium);
}

.card-top {
    margin-bottom: 24px;
}

.service-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.service-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.service-card h3, .project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.3;
}

.service-card p, .project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.bullet-list {
    margin-bottom: 24px;
}

.bullet-list li {
    padding: 6px 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.bullet-list li svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border-glass);
}

.tags span {
    padding: 5px 12px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
}

/* ===== CONTACT & FORMS ===== */
.contact-container {
    padding: 150px 0 100px;
    max-width: 640px;
    margin: 0 auto;
}

.contact-card {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 44px;
    box-shadow: var(--shadow-premium);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-body);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
}

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

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    background: #ffffff;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 1100px) {
    .services-grid, .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid, .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .hero h1, .page-header h1 {
        font-size: 2.6rem;
    }
}

/* ===== GLOBAL COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 850px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: var(--shadow-premium);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
    bottom: 24px;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-content a {
    color: var(--accent-blue);
    text-decoration: none;
}

.cookie-content a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cookie-btn-accept {
    background: var(--gradient-primary);
    color: #ffffff;
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.cookie-btn-decline:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

@media (max-width: 640px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
/* ==========================================================================
   MOBILE NAVBAR LAYOUT & EXPAND/COLLAPSE FIX
   ========================================================================== */

/* Default hide toggle on desktop */
.mobile-toggle-btn {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--border-glass, #e2e8f0);
    font-size: 1.5rem;
    color: #1e293b;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    line-height: 1;
    z-index: 1001;
}

@media (max-width: 768px) {
    /* Navbar top bar layout: Logo on left, Hamburger on right */
    .navbar .container,
    .navbar-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 20px !important;
        position: relative !important;
    }

    /* Show hamburger icon */
    .mobile-toggle-btn {
        display: inline-block !important;
    }

    /* CRITICAL FIX: Hide navigation menu BY DEFAULT on mobile */
    .nav-links,
    #nav-menu {
        display: none !important; /* Forces menu to start hidden */
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        padding: 20px !important;
        gap: 12px !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
        z-index: 1000 !important;
    }

    /* Display navigation ONLY when .active class is added via JS */
    .nav-links.active,
    #nav-menu.active {
        display: flex !important;
    }

    .nav-links a {
        width: 100% !important;
        text-align: center !important;
        padding: 10px 0 !important;
        font-size: 1rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .nav-links .btn {
        width: 100% !important;
        margin-top: 8px !important;
        color: #ffffff !important;
        background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    }
}
