/* ============================================
   Conversion Optimization Components
   - Sticky bottom CTA banner
   - Exit intent modal
   - Trust guarantees bar
   - Testimonial cards
   - Social proof numbers
   ============================================ */

/* Sticky CTA banner (bottom of viewport) */
.sticky-cta-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 60;
    background: #fff;
    border-top: 2px solid #16a34a;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 0.75rem 1rem;
    transition: bottom 0.4s ease-in-out;
}
.sticky-cta-banner.visible {
    bottom: 0;
}
.sticky-cta-banner .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.sticky-cta-banner .message {
    font-size: 0.95rem;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}
.sticky-cta-banner .message strong { color: #16a34a; }
.sticky-cta-banner .actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.sticky-cta-banner .btn-cta {
    background: #16a34a;
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.sticky-cta-banner .btn-cta:hover { background: #15803d; }
.sticky-cta-banner .close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
}
.sticky-cta-banner .close-btn:hover { color: #1f2937; }

/* Trust guarantees bar */
.trust-bar {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #166534;
}
.trust-bar .item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.trust-bar .check {
    color: #16a34a;
    font-weight: 700;
}

/* Social proof numbers strip */
.social-proof-strip {
    background: linear-gradient(to right, #f9fafb, #fff, #f9fafb);
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 1rem;
    margin: 2rem 0;
}
.social-proof-strip .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.social-proof-strip .stat {
    padding: 0.5rem;
}
.social-proof-strip .stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #16a34a;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}
.social-proof-strip .stat-label {
    margin-top: 0.4rem;
    font-size: 0.875rem;
    color: #4b5563;
}
.social-proof-strip .since {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.2rem;
}

/* Testimonial cards */
.testimonials-section {
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, #f9fafb, #fff);
}
.testimonials-section .container {
    max-width: 1200px;
    margin: 0 auto;
}
.testimonials-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.testimonial-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.testimonial-card .stars {
    color: #f59e0b;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}
.testimonial-card blockquote {
    font-style: italic;
    color: #1f2937;
    margin: 0 0 1rem;
    flex: 1;
    line-height: 1.6;
}
.testimonial-card .author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    margin-top: auto;
}
.testimonial-card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.testimonial-card .author-info { flex: 1; min-width: 0; }
.testimonial-card .name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}
.testimonial-card .meta {
    font-size: 0.75rem;
    color: #6b7280;
}
.testimonial-card .composite-tag {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 0.4rem;
    font-style: italic;
}

/* Exit intent modal */
.exit-intent-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.exit-intent-modal.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.exit-intent-modal .content {
    background: #fff;
    border-radius: 1rem;
    max-width: 480px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.exit-intent-modal .close-x {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}
.exit-intent-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}
.exit-intent-modal p {
    color: #4b5563;
    margin-bottom: 1.25rem;
}
.exit-intent-modal form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.exit-intent-modal input[type="email"] {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 100%;
}
.exit-intent-modal input[type="email"]:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
.exit-intent-modal button[type="submit"] {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.exit-intent-modal button[type="submit"]:hover { background: #15803d; }
.exit-intent-modal .small-print {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5rem;
}

/* Calculator components */
.calc-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.calc-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1f2937;
}
.calc-form input[type="number"], .calc-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.calc-form input[type="number"]:focus, .calc-form select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
.calc-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.calc-form button {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
.calc-form button:hover { background: #15803d; }

.calc-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(to right, #f0fdf4, #fff);
    border-left: 4px solid #16a34a;
    border-radius: 0.5rem;
    display: none;
}
.calc-result.visible { display: block; }
.calc-result h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.75rem;
}
.calc-result .big-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #16a34a;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    margin: 0.5rem 0;
}
.calc-result .equiv-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bbf7d0;
}
.calc-result .equiv-list li {
    margin: 0.4rem 0;
}

@media (max-width: 640px) {
    .calc-form .row { grid-template-columns: 1fr; }
    .sticky-cta-banner .message { font-size: 0.85rem; }
    .sticky-cta-banner .actions { width: 100%; }
    .sticky-cta-banner .btn-cta { flex: 1; text-align: center; }
}

/* =========== Modern navigation with dropdowns =========== */
#navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Nav items - clean hover with underline animation */
.nav-item {
    position: relative;
    padding: 0.5rem 0;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #16a34a, #22c55e);
    transition: width 0.25s ease;
    border-radius: 2px;
}
.nav-item:hover, .nav-item.active, .nav-dropdown:hover > .nav-item {
    color: #16a34a;
}
.nav-item:hover::after, .nav-item.active::after, .nav-dropdown:hover > .nav-item::after {
    width: 100%;
}
.nav-item .chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}
.nav-dropdown:hover .chevron, .nav-dropdown:focus-within .chevron, .nav-dropdown.is-open .chevron {
    transform: rotate(180deg);
}

/* Dropdown panels */
.nav-dropdown {
    position: relative;
    padding-bottom: 12px; /* invisible hover area between trigger and panel */
    margin-bottom: -12px;
}
.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 320px;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 100;
    /* keep a gap visually but hover area extends through .nav-dropdown padding-bottom */
    margin-top: 4px;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel,
.nav-dropdown.is-open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
}
/* Larger invisible bridge (the panel margin-top + ::before) */
.dropdown-panel::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    height: 24px;
    background: transparent;
}
.dropdown-panel.wide {
    min-width: 480px;
}
.dropdown-panel.tall {
    max-height: 70vh;
    overflow-y: auto;
}
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.15s ease;
    color: #1f2937;
    text-decoration: none;
}
.dropdown-item:hover {
    background: #f0fdf4;
    color: #166534;
}
.dropdown-item .icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: #f0fdf4;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover .icon-wrap {
    background: #16a34a;
    color: #fff;
}
.dropdown-item .text { min-width: 0; }
.dropdown-item .title {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.2;
    margin: 0;
}
.dropdown-item .desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.15rem;
    line-height: 1.3;
}
.dropdown-item:hover .desc { color: #4b5563; }
.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.5rem 0;
}
.dropdown-footer {
    padding: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid #f3f4f6;
}
.dropdown-footer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
}
.dropdown-footer a:hover { color: #15803d; }

/* Compact language selector with flags */
.lang-selector {
    position: relative;
}
.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.15s;
}
.lang-trigger:hover {
    border-color: #16a34a;
    color: #16a34a;
}
.lang-trigger .flag {
    font-size: 1.05rem;
    line-height: 1;
}

/* SVG flag rendering (works on all OS, unlike emoji flags) */
.flag-svg {
    display: inline-flex;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    vertical-align: middle;
}
.flag-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}
.flag-slot { display: inline-flex; align-items: center; }
.lang-trigger .chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}
.lang-selector:hover .lang-trigger .chevron,
.lang-selector:focus-within .lang-trigger .chevron {
    transform: rotate(180deg);
}
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
    z-index: 110;
}
.lang-selector:hover .lang-menu,
.lang-selector:focus-within .lang-menu,
.lang-selector.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}
.lang-selector:hover .lang-trigger .chevron,
.lang-selector:focus-within .lang-trigger .chevron,
.lang-selector.is-open .lang-trigger .chevron {
    transform: rotate(180deg);
}
.lang-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}
.lang-menu button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    background: none;
    text-align: left;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #1f2937;
    transition: background 0.12s;
}
.lang-menu button:hover { background: #f0fdf4; color: #166534; }
.lang-menu button.active { background: #f0fdf4; color: #16a34a; font-weight: 600; }
.lang-menu .flag {
    font-size: 1.15rem;
    line-height: 1;
}
.lang-menu .check-icon {
    margin-left: auto;
    color: #16a34a;
    opacity: 0;
    font-weight: 700;
}
.lang-menu button.active .check-icon { opacity: 1; }

/* Primary CTA button refined */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: linear-gradient(to right, #16a34a, #22c55e);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.6rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
    transition: all 0.2s ease;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    background: linear-gradient(to right, #15803d, #16a34a);
}

/* Mobile menu redesign */
.mobile-menu-modern {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 40;
    overflow-y: auto;
}
.mobile-menu-modern.open { display: block; }
.mobile-section {
    border-bottom: 1px solid #f3f4f6;
}
.mobile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    font-size: 0.95rem;
}
.mobile-section-header .chev {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
    color: #9ca3af;
}
.mobile-section.expanded .chev { transform: rotate(180deg); }
.mobile-section-content {
    display: none;
    padding: 0 1.25rem 1rem;
}
.mobile-section.expanded .mobile-section-content { display: block; }
.mobile-section-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 0.4rem;
}
.mobile-section-content a:hover { background: #f0fdf4; color: #166534; }
.mobile-section-content a .item-icon {
    width: 28px; height: 28px;
    background: #f0fdf4; color: #16a34a;
    border-radius: 0.4rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.mobile-direct-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid #f3f4f6;
}
.mobile-direct-link:hover { background: #f9fafb; }
.mobile-langs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
}
.mobile-langs button {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #4b5563;
}
.mobile-langs button.active {
    background: #f0fdf4; color: #16a34a; border-color: #16a34a; font-weight: 600;
}
.mobile-cta {
    margin: 1rem 1.25rem;
    padding: 0.85rem;
    background: linear-gradient(to right, #16a34a, #22c55e);
    color: #fff;
    text-align: center;
    border-radius: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-modern { display: none !important; }
}

/* Hide nav + sticky bits in print mode */
@media print {
    #navbar, .sticky-cta-banner, .exit-intent-modal, .floating-print-btn { display: none !important; }
}

/* Floating print button for ressources/ pages */
.floating-print-btn {
    position: fixed;
    bottom: 96px;
    right: 1.25rem;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    cursor: pointer;
    transition: all 0.2s;
}
.floating-print-btn:hover { background: #15803d; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 163, 74, 0.45); }
