/* ===== NitroButton Landing Page — Unified Design System ===== */

/* ---------- CSS Custom Properties (light/dark aware) ---------- */
:root {
    --nb-hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --nb-hero-text: #ffffff;
    --nb-section-bg: var(--bs-body-bg);
    --nb-section-alt-bg: var(--bs-tertiary-bg);
    --nb-dark-section-bg: #0f172a;
    --nb-dark-section-text: #ffffff;
    --nb-gradient-start: #0d6efd;
    --nb-gradient-end: #6610f2;
    --nb-card-bg: var(--bs-body-bg);
    --nb-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --nb-card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    --nb-card-border: var(--bs-border-color-translucent);
    --nb-feature-bg: var(--bs-tertiary-bg);
    --nb-overlay-bg: rgba(13, 110, 253, 0.85);
    --nb-glass-bg: rgba(255, 255, 255, 0.95);
    --nb-glass-border: rgba(255, 255, 255, 0.2);
    --nb-banner-bg: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    --nb-wave-fill: var(--bs-body-bg);
    --nb-icon-bg: rgba(13, 110, 253, 0.1);
    --nb-icon-color: #0d6efd;
}

[data-bs-theme="dark"] {
    --nb-hero-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
    --nb-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    --nb-card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    --nb-overlay-bg: rgba(13, 110, 253, 0.9);
    --nb-glass-bg: rgba(33, 37, 41, 0.95);
    --nb-glass-border: rgba(255, 255, 255, 0.1);
    --nb-dark-section-bg: #020617;
    --nb-icon-bg: rgba(13, 110, 253, 0.2);
    --nb-wave-fill: var(--bs-body-bg);
}

/* ---------- Global Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Animations ---------- */
@keyframes nb-fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes nb-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

@keyframes nb-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%      { transform: translateY(-15px) rotate(2deg); }
    66%      { transform: translateY(5px) rotate(-1deg); }
}

@keyframes nb-slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes nb-particle-rise {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.1; }
    100% { transform: translateY(-100vh) translateX(100px) scale(0.3); opacity: 0; }
}

@keyframes nb-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(13, 110, 253, 0.3); }
    50%      { box-shadow: 0 0 40px rgba(13, 110, 253, 0.6); }
}

.nb-fade-in {
    animation: nb-fadeInUp 0.8s ease-out both;
}
.nb-delay-1 { animation-delay: 0.15s; }
.nb-delay-2 { animation-delay: 0.3s; }
.nb-delay-3 { animation-delay: 0.45s; }

.nb-pulse {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nb-pulse:hover {
    animation: nb-pulse 1.5s ease-in-out infinite;
}

/* ---------- Newsletter Banner ---------- */
.nb-banner {
    background: var(--nb-banner-bg);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.nb-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    pointer-events: none;
}

/* ---------- Hero Section ---------- */
.nb-hero {
    background: var(--nb-hero-bg);
    color: var(--nb-hero-text);
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.nb-hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.nb-hero-particle {
    position: absolute;
    background: rgba(13, 110, 253, 0.4);
    border-radius: 50%;
    animation: nb-particle-rise linear infinite;
}

.nb-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 1;
    line-height: 0;
}
.nb-hero-wave svg {
    width: 100%;
    height: 80px;
    display: block;
}
.nb-wave-fill {
    fill: var(--nb-wave-fill);
}

.min-vh-50 {
    min-height: 50vh;
}

/* ---------- Sections ---------- */
.nb-section {
    background-color: var(--nb-section-bg);
}

.nb-section-alt {
    background-color: var(--nb-section-alt-bg);
}

.nb-dark-section {
    background: var(--nb-dark-section-bg);
    color: var(--nb-dark-section-text);
}

.nb-gradient-section {
    background: linear-gradient(135deg, var(--nb-gradient-start) 0%, var(--nb-gradient-end) 100%);
    color: #ffffff;
    position: relative;
}

/* ---------- Icon Circles ---------- */
.nb-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--nb-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}
.nb-icon-circle i {
    font-size: 2rem;
    color: var(--nb-icon-color);
    transition: transform 0.4s ease;
}
.nb-feature-card:hover .nb-icon-circle {
    background: var(--nb-icon-color);
    transform: scale(1.1);
}
.nb-feature-card:hover .nb-icon-circle i {
    color: #ffffff;
    transform: scale(1.1);
}

/* ---------- Feature Cards ---------- */
.nb-feature-card {
    background: var(--nb-card-bg);
    box-shadow: var(--nb-card-shadow);
    border: 1px solid var(--nb-card-border);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nb-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--nb-card-hover-shadow);
}

/* ---------- Project Cards ---------- */
.nb-project-card {
    background: var(--nb-card-bg);
    box-shadow: var(--nb-card-shadow);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--nb-card-border);
}
.nb-project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--nb-card-hover-shadow);
}

.nb-card-img-wrapper {
    position: relative;
    overflow: hidden;
}
.nb-card-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}
.nb-project-card:hover .nb-card-img-wrapper img {
    transform: scale(1.1);
}

.nb-card-overlay {
    position: absolute;
    inset: 0;
    background: var(--nb-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: #ffffff;
}
.nb-project-card:hover .nb-card-overlay {
    opacity: 1;
}

.nb-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--nb-icon-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nb-icon-color);
    transition: all 0.3s ease;
}
.nb-project-card:hover .nb-card-arrow {
    background: var(--nb-icon-color);
    color: #ffffff;
    transform: translateX(4px);
}

/* ---------- Service Cards ---------- */
.nb-service-card {
    background: var(--nb-card-bg);
    box-shadow: var(--nb-card-shadow);
    border: 1px solid var(--nb-card-border);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nb-service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--nb-card-hover-shadow);
}

.nb-service-img-col {
    background: var(--nb-section-alt-bg);
}
.nb-service-img-col img {
    transition: transform 0.5s ease;
}
.nb-service-card:hover .nb-service-img-col img {
    transform: scale(1.05);
}

/* ---------- Glass Cards (used in gradient sections) ---------- */
.nb-glass-card {
    background: var(--nb-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--nb-glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}
.nb-glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.nb-card-icon-col {
    background: var(--nb-dark-section-bg);
}
[data-bs-theme="dark"] .nb-card-icon-col {
    background: rgba(0, 0, 0, 0.3);
}

/* ---------- Float Icon (inspiration section) ---------- */
.nb-float-icon {
    animation: nb-float 6s ease-in-out infinite;
    display: inline-block;
}
.nb-float-icon i {
    filter: drop-shadow(0 0 30px rgba(13, 110, 253, 0.4));
}

/* ---------- Contact Items ---------- */
.nb-contact-item {
    padding: 1rem;
    border-radius: 1rem;
    transition: background 0.3s ease;
}
.nb-contact-item:hover {
    background: var(--nb-icon-bg);
}

/* ---------- Cookies Banner ---------- */
.cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: 1.5rem 0;
    z-index: 9999;
    animation: nb-slideUp 0.5s ease-out;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}
[data-bs-theme="dark"] .cookies-banner {
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Webcam PIP ---------- */
.webcam-pip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 240px;
    background-color: var(--bs-body-bg);
    border: 2px solid #0d6efd;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}
.webcam-pip.expanded {
    width: 640px;
    height: 480px;
}
.webcam-pip-header {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    padding: .5rem .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}
.webcam-pip-title {
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
}
.webcam-pip-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    border-radius: 50%;
}
.webcam-pip-close:hover {
    opacity: 0.7;
    background: rgba(255,255,255,0.2);
}
.webcam-pip-content {
    width: 100%;
    height: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ---------- Modal Enhancements ---------- */
.modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
[data-bs-theme="dark"] .modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- Scroll Reveal (observer-powered) ---------- */
.nb-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.nb-reveal.nb-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive Adjustments ---------- */
/* ---------- Modal Project Image ---------- */
.nb-modal-img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    .nb-hero {
        min-height: 50vh;
    }
    .nb-hero h1 {
        font-size: 2rem !important;
    }
    .nb-float-icon i {
        font-size: 5rem !important;
    }
    .nb-modal-img {
        max-height: 200px;
    }
}
