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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: #1e1e2e;
    --border-hover: #2a2a3e;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #7a7a92;
    --accent-1: #7b6bee;
    --accent-2: #00cec9;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
    --accent-gradient-hover: linear-gradient(135deg, #7d6ff0, #00e0db);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ===== SECTION COMMON ===== */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a7cf0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

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

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
}

.nav-logo-icon {
    width: 22px;
    height: 22px;
    margin-right: 6px;
}

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

.logo-ai {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dev {
    color: var(--text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 280px;
    padding: 8px;
    margin-top: 16px;
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: flex !important;
    align-items: center;
    padding: 12px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    transition: var(--transition);
    position: static !important;
    border-radius: var(--radius-sm);
}

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

.dropdown-menu a:hover {
    color: var(--text-primary) !important;
    background: rgba(108, 92, 231, 0.1);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.lang-switcher a {
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 4px;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.lang-switcher a:hover {
    color: var(--text-primary);
}

.lang-switcher a.lang-active {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.15);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===== HERO ===== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

#neural-canvas,
.neural-canvas-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-1);
    top: -10%;
    right: -5%;
    opacity: 0.15;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    bottom: -10%;
    left: -5%;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-glass {
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 20px;
    padding: 56px 48px;
    max-width: 760px;
    margin: 0 auto 64px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-2);
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

#hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.hero-free-consult {
    margin-top: 20px;
    margin-bottom: 64px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-2);
    text-align: center;
    letter-spacing: 0.3px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== SERVEIS ===== */
#serveis,
#serveis-preview {
    padding: 120px 0;
}

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

.services-grid.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
    transform: translateY(-4px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.featured {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

.service-card.featured::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-1);
}

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

.icon-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-1);
    letter-spacing: 1px;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    min-height: calc(1.3rem * 1.3 * 2);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
}

.service-tags li {
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-2);
    font-family: var(--font-mono);
}

/* ===== SOBRE ===== */
#sobre {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content .section-tag {
    margin-bottom: 20px;
}

.about-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
}

.about-content > p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.about-feature-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: rgba(0, 206, 201, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-2);
}

.about-feature-icon svg {
    width: 18px;
    height: 18px;
}

.about-feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.about-feature span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Code Window */
.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
    margin-left: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    max-width: 100%;
}

.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-prop { color: #f07178; }
.code-string { color: #c3e88d; }
.code-bool { color: #ffcb6b; }

/* ===== PORTFOLIO ===== */
#portfolio {
    padding: 120px 0;
}

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

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

.portfolio-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image img {
    max-height: 95%;
    max-width: 95%;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.portfolio-placeholder {
    color: var(--text-muted);
}

.portfolio-placeholder svg {
    width: 48px;
    height: 48px;
}

.portfolio-info {
    padding: 28px;
}

.portfolio-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    min-height: calc(1.15rem * 1.3 * 2);
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
    min-height: calc(0.9rem * 1.6 * 3);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tags span {
    padding: 3px 10px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-2);
    font-family: var(--font-mono);
}

/* ===== CONTACTE ===== */
#contacte {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.required {
    color: var(--accent-1);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group select:-webkit-autofill,
.form-group textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--bg-card);
}

.contact-form .btn {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

.contact-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-card strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.contact-card span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.footer-brand .footer-logo-icon {
    margin-right: 8px;
}

.footer-logo-icon {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px;
    max-height: 22px;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
    line-height: 1.6;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col .footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col .footer-heading a {
    color: var(--text-primary);
    transition: var(--transition);
}

.footer-col .footer-heading a:hover {
    color: var(--accent-2);
}

.footer-col a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

    .about-grid {
        gap: 48px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-glass {
        padding: 48px 40px;
    }

    .hero-stats {
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .testimonial-card {
        padding: 48px 40px;
    }

    .cta-box {
        padding: 64px 40px;
    }

    .featured-project {
        padding: 40px;
    }

    .service-card {
        padding: 32px;
    }

    .card-arrow {
        top: 32px;
        right: 32px;
    }
}

@media (max-width: 768px) {
    .code-body {
        font-size: 0.7rem;
        padding: 16px;
        white-space: pre-wrap;
        word-break: break-all;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        z-index: 999;
        padding: 80px 24px;
        padding-top: calc(80px + env(safe-area-inset-top, 0px));
    }

    .nav-links.active {
        display: flex;
    }

    /* Show "Serveis" parent link on mobile */
    .nav-dropdown > a {
        display: block !important;
    }

    /* Show dropdown items as flat list */
    .nav-dropdown .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        min-width: auto;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    .nav-links > li {
        text-align: center;
        width: 100%;
    }

    .nav-links > li > a,
    .dropdown-menu a {
        font-size: 1.2rem !important;
        color: var(--text-secondary) !important;
        font-weight: 500 !important;
        padding: 14px 0 !important;
        display: block !important;
        text-align: center;
        min-height: 44px;
    }

    .nav-links > li > a::after,
    .dropdown-menu a::after {
        display: none !important;
    }

    .dropdown-menu a:hover,
    .nav-links > li > a:hover {
        background: none !important;
        color: var(--text-primary) !important;
    }

    .nav-cta {
        margin-top: 0;
        padding: 14px 0 !important;
        background: none !important;
        box-shadow: none !important;
        color: var(--text-secondary) !important;
        font-size: 1.2rem !important;
        font-weight: 500 !important;
        min-height: 44px;
    }

    .nav-cta:hover {
        box-shadow: none !important;
        color: var(--text-primary) !important;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
        padding: 10px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Grids → 1 column */
    .services-grid,
    .services-grid.two-col,
    .services-grid.four-col {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-col {
        align-items: center;
    }

    /* Hero adjustments */
    .hero-glass {
        padding: 40px 28px;
    }

    .hero-stats {
        gap: 32px;
    }

    #hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    /* Sections: reduce padding */
    #serveis,
    #serveis-preview,
    #sobre,
    #portfolio,
    #contacte,
    #exemples,
    .faq-section,
    .process-section,
    .values-section,
    .stack-section,
    #perque,
    .about-story {
        padding: 80px 0;
    }

    #testimonial,
    #cta {
        padding: 64px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Cards: reduce padding */
    .service-card {
        padding: 28px;
    }

    .card-arrow {
        top: 28px;
        right: 28px;
    }

    .value-card {
        padding: 28px;
    }

    .usecase-card {
        padding: 24px;
    }

    .process-step {
        padding: 24px;
    }

    /* Testimonial + CTA */
    .testimonial-card {
        padding: 36px 28px;
    }

    .testimonial-card::before {
        top: 16px;
        left: 24px;
        font-size: 4rem;
    }

    .cta-box {
        padding: 48px 28px;
    }

    .featured-project {
        padding: 32px 24px;
    }

    /* Portfolio info */
    .portfolio-info {
        padding: 20px;
    }

    .portfolio-info h3 {
        min-height: auto;
    }

    .portfolio-info p {
        min-height: auto;
    }

    /* Service card h3 min-height reset */
    .service-card h3 {
        min-height: auto;
    }

    .usecase-card h3 {
        min-height: auto;
    }

    .process-step h3 {
        min-height: auto;
    }

    .value-card h3 {
        min-height: auto;
    }

    /* Lang switcher: compact touch targets */
    .lang-switcher {
        gap: 2px;
        margin-left: auto;
        margin-right: 8px;
    }

    .lang-switcher a {
        padding: 5px 7px;
        min-height: 38px;
        min-width: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Contact page */
    .contact-section {
        padding: 60px 0 80px;
    }

    .service-detail {
        padding: 64px 0;
    }

    .page-header {
        padding: 120px 0 48px;
    }
}

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

    .hero-glass {
        padding: 28px 20px;
        margin-bottom: 32px;
        border-radius: 14px;
    }

    #hero h1 {
        font-size: clamp(1.6rem, 7vw, 2rem);
        letter-spacing: -0.5px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
        margin-bottom: 24px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 28px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding-top: 32px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-suffix {
        font-size: 1.5rem;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-free-consult {
        margin-top: 16px;
        margin-bottom: 40px;
    }

    /* Sections even smaller padding */
    #serveis,
    #serveis-preview,
    #sobre,
    #portfolio,
    #contacte,
    #exemples,
    .faq-section,
    .process-section,
    .values-section,
    .stack-section,
    #perque,
    .about-story {
        padding: 56px 0;
    }

    #testimonial,
    #cta {
        padding: 48px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-tag {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    /* Cards tighter */
    .service-card {
        padding: 24px;
    }

    .card-arrow {
        top: 24px;
        right: 24px;
        font-size: 1.2rem;
    }

    .value-card {
        padding: 24px;
    }

    .stack-category {
        padding: 24px;
    }

    /* Testimonial + CTA */
    .testimonial-card {
        padding: 28px 20px;
    }

    .testimonial-card::before {
        top: 10px;
        left: 16px;
        font-size: 3rem;
    }

    .cta-box {
        padding: 36px 20px;
    }

    .cta-box .btn {
        margin-top: 24px;
    }

    .cta-box p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .featured-project {
        padding: 28px 20px;
    }

    /* Cookie banner */
    .cookie-banner-content {
        gap: 12px;
    }

    #cookie-banner {
        padding: 16px;
    }

    /* Contact cards */
    .contact-card {
        padding: 18px;
        gap: 14px;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    /* Page header */
    .page-header {
        padding: 100px 0 36px;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .page-header-sm {
        padding: 100px 0 36px;
    }

    .legal-content {
        padding: 40px 0 80px;
    }

    /* About features */
    .about-features {
        margin-top: 24px;
    }

    /* Footer */
    .footer-grid {
        gap: 24px;
    }

    footer {
        padding: 48px 0 24px;
    }
}

/* ===== LEGAL PAGES ===== */
.page-header-sm {
    padding: 120px 0 48px;
}

.page-header-sm h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    text-align: center;
}

.legal-content {
    padding: 64px 0 120px;
}

.legal-container {
    max-width: 800px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.legal-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    list-style: disc;
    margin-bottom: 4px;
}

.legal-content a {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:hover {
    color: var(--accent-1);
}

.legal-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(108, 92, 231, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-2);
}

/* Cookie table */
.cookie-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cookie-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    font-size: 0.85rem;
}

.cookie-table td {
    color: var(--text-secondary);
}

.btn-cookie-settings {
    background: none;
    border: none;
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.95rem;
    padding: 0;
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 24px;
    animation: slideUp 0.3s ease;
}

#cookie-banner.cookie-banner-hide {
    animation: slideDown 0.3s ease forwards;
}

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

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}

.cookie-banner-text h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.cookie-banner-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition);
}

.btn-cookie-outline:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.btn-cookie-accept {
    padding: 10px 20px;
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition);
}

.btn-cookie-accept:hover {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

/* Cookie settings panel */
.cookie-settings-panel {
    max-width: 1200px;
    margin: 20px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.cookie-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.cookie-setting-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.cookie-setting-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-toggle.disabled span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cookie-toggle.disabled input {
    accent-color: var(--accent-1);
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-hover);
    border-radius: 24px;
    transition: var(--transition);
}

.slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.switch input:checked + .slider {
    background: var(--accent-1);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.cookie-settings-save {
    padding: 16px 0 0;
    text-align: right;
}

/* Footer legal links */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner-actions .btn-cookie-outline,
    .cookie-banner-actions .btn-cookie-accept {
        width: 100%;
        text-align: center;
    }

    .cookie-setting {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== FAQ ===== */
.faq-section {
    padding: 120px 0;
}

.faq-section.alt {
    background: var(--bg-secondary);
}

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

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: block;
    padding: 20px 0 8px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: default;
}

.faq-question svg {
    display: none;
}

.faq-answer p {
    padding: 0 0 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ===== RECAPTCHA BADGE ===== */

/* ===== CHATBOT ===== */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    cursor: pointer;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    transition: var(--transition);
    animation: chatPulse 2s ease-out infinite;
}

@keyframes chatPulse {
    0% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.5); }
    70% { box-shadow: 0 0 0 28px rgba(108, 92, 231, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    animation: none;
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.5);
}

.chatbot-toggle.active {
    animation: none;
}

.chatbot-toggle img {
    width: 28px;
    height: 28px;
    filter: brightness(10);
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #5b4bd4;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.4);
}

.chatbot-toggle .close-icon {
    display: none;
    font-size: 24px;
    color: #fff;
    line-height: 1;
}

.chatbot-toggle.active img {
    display: none;
}

.chatbot-toggle.active .close-icon {
    display: block;
}

.chatbot-toggle.active .chatbot-badge {
    display: none;
}

/* Contact page: move button up */
.page-contacte .chatbot-toggle {
    bottom: 100px;
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    height: 560px;
    max-height: calc(100dvh - 140px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    z-index: 9000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.page-contacte .chatbot-window {
    bottom: 176px;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatbot-header-logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.chatbot-header-logo span {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
}

.chatbot-header-logo .logo-kod {
    color: #f0f0f5 !important;
}

.chatbot-header-logo .logo-dev {
    font-weight: 400 !important;
}

.chatbot-logo-icon {
    width: 22px;
    height: 22px;
    margin-right: 6px;
}

.chatbot-header-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chatbot-clear {
    background: none;
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-family: var(--font-main);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-clear:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: var(--transition);
}

.chatbot-close:hover {
    color: var(--text-primary);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.chatbot-msg.bot {
    background: var(--bg-card);
    color: var(--text-secondary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
    background: var(--accent-1);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--accent-gradient);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.chatbot-cta:hover {
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    transform: translateY(-1px);
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingDot 1.2s infinite;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

.chatbot-input {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--bg-primary);
}

.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.chatbot-input input::placeholder {
    color: var(--text-muted);
}

.chatbot-input input:focus {
    border-color: var(--accent-1);
}

.chatbot-input button {
    padding: 10px 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-main);
    transition: var(--transition);
}

.chatbot-input button:hover {
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chatbot-window {
        bottom: 5.5rem;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: calc(100vw - 2rem);
        max-width: 400px;
        max-height: calc(100dvh - 8rem);
        border-radius: 16px;
    }

    .chatbot-messages {
        max-height: calc(100dvh - 12rem);
    }

    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
    }

    .page-contacte .chatbot-toggle {
        bottom: 80px;
    }

    .page-contacte .chatbot-window {
        bottom: 9rem;
    }
}

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

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

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

/* ===== NAV CTA & ACTIVE ===== */
.nav-cta {
    padding: 8px 20px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    color: #fff !important;
    font-weight: 600;
}

.nav-cta:hover {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* ===== PAGE HEADER ===== */
.page-header {
    position: relative;
    padding: 160px 0 80px;
    text-align: center;
    overflow: hidden;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -1px;
}

/* ===== SERVICES TWO COL ===== */
.services-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.service-card {
    position: relative;
}

.card-arrow {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.service-card:hover .card-arrow {
    color: var(--accent-2);
    transform: translateX(4px);
}

/* ===== EXEMPLES ===== */
#exemples {
    padding: 120px 0;
}

/* ===== SERVICES INDEX ===== */
.services-index {
    padding: 80px 0 120px;
}

/* ===== SERVICE DETAIL ===== */
.service-detail {
    padding: 100px 0;
}

.service-detail.alt {
    background: var(--bg-secondary);
}

.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.service-detail-grid.reverse {
    direction: rtl;
}

.service-detail-grid.reverse > * {
    direction: ltr;
}

.service-detail-icon {
    width: 56px;
    height: 56px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-1);
}

.service-detail-icon.featured {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(0, 206, 201, 0.1));
}

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

.service-detail-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.service-detail-content > p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 28px;
}

.service-detail-list {
    list-style: none;
    margin-bottom: 28px;
}

.service-detail-list li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gradient);
}

.service-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-detail-tags span {
    padding: 5px 14px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-2);
    font-family: var(--font-mono);
}

.code-comment {
    color: var(--text-muted);
}

/* ===== USE CASES ===== */
#use-cases {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.usecase-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
    transform: translateY(-4px);
}

.usecase-icon {
    width: 48px;
    height: 48px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent-1);
}

.usecase-icon svg {
    width: 24px;
    height: 24px;
}

.usecase-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: calc(1.05rem * 1.3 * 2);
}

.usecase-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: auto;
}

/* ===== PER QUÈ KODAI DEV ===== */
#perque {
    padding: 120px 0;
}

/* ===== TESTIMONIAL ===== */
#testimonial {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.testimonial-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--radius);
    padding: 56px 48px;
    text-align: center;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 24px;
    left: 36px;
    font-size: 5rem;
    font-family: Georgia, serif;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
}

.testimonial-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
}

.testimonial-card blockquote p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.testimonial-author strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== CTA SECTION ===== */
#cta {
    padding: 100px 0;
}

.cta-box {
    text-align: center;
    padding: 80px 48px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.05));
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius);
}

.cta-box h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.cta-box .btn {
    margin-top: 32px;
}

.cta-box p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== PROCESS ===== */
.process-section {
    padding: 120px 0;
    background: var(--bg-secondary);
}

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

.process-step {
    padding: 32px;
    position: relative;
}

.process-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 16px;
    line-height: 1;
}

.process-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: calc(1.1rem * 1.3 * 2);
}

.process-step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== VALUES ===== */
.values-section {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.value-card p {
    margin-top: auto;
}

.value-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

.value-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.4;
    margin-bottom: 16px;
}

.value-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: calc(1.15rem * 1.3 * 2);
}

.value-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== STACK ===== */
.stack-section {
    padding: 120px 0;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stack-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
}

.stack-category:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

.stack-category h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-2);
}

.stack-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stack-items span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.stack-items span::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-weight: 700;
}

/* ===== ABOUT STORY ===== */
.about-story {
    padding: 100px 0;
}

.about-story .about-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 24px;
}

.about-story .about-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ===== FEATURED PROJECT ===== */
.portfolio-featured {
    padding: 80px 0;
}

.featured-project {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(0, 206, 201, 0.04));
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--radius);
    padding: 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.featured-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.featured-header .portfolio-category {
    margin-bottom: 16px;
}

.featured-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-link {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.featured-header > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 28px;
}

.featured-header .portfolio-tags {
    justify-content: center;
}

/* ===== PORTFOLIO PAGE ===== */
.portfolio-section {
    padding: 80px 0 120px;
}

.portfolio-section .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
}

.portfolio-card.large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.portfolio-card.large .portfolio-image {
    aspect-ratio: auto;
    min-height: 280px;
}

.portfolio-card.large .portfolio-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* ===== CONTACT PAGE ===== */
.contact-section {
    padding: 80px 0 120px;
}

.contact-card.highlight {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.03));
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid.four-col {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 1024px) {
    .services-grid.two-col {
        grid-template-columns: 1fr;
    }

    .service-detail-grid,
    .service-detail-grid.reverse {
        grid-template-columns: 1fr;
        gap: 48px;
        direction: ltr;
    }

    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .values-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-section .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card.large {
        grid-template-columns: 1fr;
    }
}

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

    .process-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }

    .service-detail-grid,
    .service-detail-grid.reverse {
        gap: 36px;
    }
}

/* ===== SAFE AREA (notched iPhones) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
    #navbar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .container {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }

    #cookie-banner {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .chatbot-toggle {
        bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .chatbot-window {
        bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-glass {
        padding: 24px 28px;
        margin-bottom: 20px;
    }

    #hero h1 {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 5px 14px;
        margin-bottom: 16px;
    }

    .hero-stats {
        flex-direction: row;
        gap: 32px;
        padding-top: 24px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-suffix {
        font-size: 1.3rem;
    }

    /* Force hamburger menu in landscape */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        z-index: 999;
        padding: 50px 24px;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > li {
        text-align: center;
        width: 100%;
    }

    .nav-links > li > a,
    .dropdown-menu a {
        font-size: 1rem !important;
        padding: 8px 0 !important;
        display: block !important;
        text-align: center;
        color: var(--text-secondary) !important;
        font-weight: 500 !important;
    }

    .nav-links > li > a::after,
    .dropdown-menu a::after {
        display: none !important;
    }

    .dropdown-menu a:hover,
    .nav-links > li > a:hover {
        background: none !important;
        color: var(--text-primary) !important;
    }

    .nav-dropdown > a {
        display: block !important;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        min-width: auto;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    .nav-cta {
        margin-top: 0;
        padding: 8px 0 !important;
        background: none !important;
        box-shadow: none !important;
        color: var(--text-secondary) !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Chatbot: smaller and out of the way */
    .chatbot-toggle {
        width: 48px;
        height: 48px;
        bottom: 12px;
        right: 12px;
    }

    .chatbot-toggle img {
        width: 22px;
        height: 22px;
    }

    /* Sections tighter */
    #serveis,
    #serveis-preview,
    #sobre,
    #portfolio,
    #contacte,
    .faq-section,
    .process-section,
    .values-section,
    .stack-section,
    #perque,
    #use-cases,
    .about-story {
        padding: 48px 0;
    }

    #testimonial,
    #cta {
        padding: 36px 0;
    }

    .section-header {
        margin-bottom: 28px;
    }
}
