/* ============================================
   Glasgow SEO - Main Stylesheet
   Design: Kolibri.is inspired, modern minimal
   ============================================ */

:root {
    --primary-color: #0D9488;
    --secondary-color: #1E3A5F;
    --accent-color: #F59E0B;
    --background-color: #F8FAFC;
    --text-color: #1F2937;
    --text-light: #6B7280;
    --white: #ffffff;
    --border-color: #E5E7EB;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* ============================================
   HEADER - CRITICAL SECTION
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--white);
    box-shadow: var(--shadow);
    height: var(--header-height);
    overflow: visible;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: visible;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo:hover {
    color: var(--primary-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-weight: 700;
}

/* ============================================
   NAVIGATION - BASE STYLES
   ============================================ */

.main-nav {
    display: flex;
    align-items: center;
    overflow: visible;
}

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

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-list > li > a:hover {
    color: var(--primary-color);
}

.nav-list > li > a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact CTA button */
.nav-cta {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    border-radius: var(--border-radius);
    margin-left: 0.5rem;
}

.nav-cta:hover {
    background: var(--secondary-color) !important;
    opacity: 1;
}

/* ============================================
   DROPDOWN - CRITICAL SECTION
   ============================================ */

.has-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.has-dropdown > .nav-link {
    padding-right: 0.25rem;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.dropdown-toggle:hover {
    color: var(--primary-color);
}

.dropdown-toggle svg {
    transition: transform 0.3s ease;
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    z-index: 10000;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.dropdown-menu a.active {
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(13, 148, 136, 0.05);
}

/* ============================================
   DESKTOP DROPDOWN BEHAVIOR
   ============================================ */

@media (min-width: 769px) {
    .has-dropdown:hover > .dropdown-menu {
        display: block;
    }

    .has-dropdown:hover > .dropdown-toggle svg {
        transform: rotate(180deg);
    }

    .has-dropdown:hover > .dropdown-toggle {
        color: var(--primary-color);
    }

    .has-dropdown.dropdown-open > .dropdown-menu {
        display: block;
    }

    .has-dropdown.dropdown-open > .dropdown-toggle svg {
        transform: rotate(180deg);
    }

    .nav-list > li {
        flex-shrink: 0;
    }
}

.has-dropdown.has-active-child > .nav-link {
    color: var(--primary-color);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   MOBILE STYLES
   ============================================ */

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

    .site-header {
        overflow: visible;
    }

    .header-container {
        overflow: visible;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }

    .main-nav.mobile-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 1rem;
        margin: 0;
        overflow: visible;
    }

    .nav-list > li {
        border-bottom: 1px solid var(--border-color);
        overflow: visible;
    }

    .nav-list > li:last-child {
        border-bottom: none;
    }

    .nav-list > li > a {
        padding: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .has-dropdown {
        flex-wrap: wrap;
        overflow: visible;
    }

    .has-dropdown > .nav-link {
        flex: 1;
        padding-right: 0;
    }

    .has-dropdown > .dropdown-toggle {
        min-width: 44px;
        min-height: 44px;
        border-left: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background: var(--background-color);
        display: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
    }

    .has-dropdown.dropdown-open > .dropdown-menu {
        display: block;
        max-height: 500px;
        padding: 0.5rem 0;
        overflow: visible;
    }

    .has-dropdown.dropdown-open > .dropdown-toggle svg {
        transform: rotate(180deg);
    }

    .dropdown-menu a {
        padding: 0.875rem 1.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav-cta {
        margin: 1rem 0 0 0 !important;
        text-align: center;
        justify-content: center;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

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

.btn-accent:hover {
    background: #D97706;
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--white) 100%);
    position: relative;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img,
.hero-image svg {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.bg-light {
    background: var(--background-color);
}

/* ============================================
   SERVICES GRID
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    color: var(--white);
}

.service-icon svg {
    width: 32px;
    height: 32px;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.service-card .btn {
    font-size: 0.9rem;
    padding: 0.625rem 1.25rem;
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-light);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.testimonial-info p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.stars {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* ============================================
   FAQ ACCORDION COMPONENT
   ============================================ */

.faq-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-lg);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question > span:first-child {
    flex: 1;
    padding-right: 1rem;
}

.faq-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--background-color);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-icon {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

.faq-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer-content {
    overflow: hidden;
}

.faq-answer-content p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
}

/* FAQ Grid Layout */
.faq-accordion.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
}

/* FAQ Tabs Layout */
.faq-tabs-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.faq-tab {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.faq-tab:hover,
.faq-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.faq-tab-content {
    display: none;
}

.faq-tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .faq-accordion.faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-question {
        padding: 1rem 0.75rem 1rem 1rem;
        font-size: 0.95rem;
    }

    .faq-question > span:first-child {
        padding-right: 0.75rem;
    }

    .faq-icon {
        width: 32px;
        height: 32px;
    }

    .faq-icon svg {
        width: 16px;
        height: 16px;
    }

    .faq-answer-content p {
        padding: 0 1rem 1rem;
    }

    .faq-tabs {
        gap: 0.25rem;
    }

    .faq-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

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

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column ul a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.875rem;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn {
    background: var(--white);
    color: var(--primary-color);
}

.cta-section .btn:hover {
    background: var(--accent-color);
    color: var(--white);
}

/* ============================================
   PROCESS STEPS
   ============================================ */

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.process-step h3 {
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-light);
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--background-color), var(--white));
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-light);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */

.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.error-content {
    max-width: 500px;
}

.error-illustration {
    margin-bottom: 2rem;
}

.error-illustration svg {
    width: 180px;
    height: 180px;
}

.error-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-content > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.error-suggestions {
    background: var(--background-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: left;
}

.error-suggestions h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-suggestions ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.error-suggestions a {
    display: block;
    padding: 0.5rem 0;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.error-suggestions a:hover {
    color: var(--secondary-color);
}

/* ============================================
   WHAT WE DO CAROUSEL
   ============================================ */

.what-we-do-section {
    padding: 4rem 0;
    overflow: hidden;
    background: var(--background-color);
}

.what-we-do-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.what-we-do-section .section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
}

.carousel-row {
    display: flex;
    margin-bottom: 1rem;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    animation: scroll-left 240s linear infinite;
}

.carousel-row.reverse .carousel-track {
    animation: scroll-right 250s linear infinite;
}

.carousel-row[data-speed="260"] .carousel-track {
    animation-duration: 260s;
}

/* Pause on hover */
.carousel-row:hover .carousel-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.carousel-item {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.carousel-item:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.popup-overlay.active {
    display: flex;
}

.popup-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    position: relative;
    overflow: hidden;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--text-light);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 1;
    transition: background 0.3s;
}

.popup-close:hover {
    background: var(--primary-color);
}

.popup-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: 80vh;
}

.popup-content h1,
.popup-content h2 {
    margin-top: 0;
}

.popup-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.popup-content ul,
.popup-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.popup-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .carousel-item {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .popup-container {
        margin: 1rem;
        max-height: 90vh;
    }

    .popup-content {
        padding: 1.5rem;
        max-height: 85vh;
    }
}
