/* ============================================
   Solution Software Srl — Refactored Styles
   Modern, accessible, responsive
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-primary: #1a73e8;
    --color-primary-dark: #1557b0;
    --color-accent: #00c853;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-inverse: #fff;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #1a1a2e;
    --color-border: #e0e0e0;
    --color-shadow: rgba(0, 0, 0, 0.1);

    --font-base: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.6;

    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px var(--color-shadow);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);

    --container-max: 1200px;
    --header-height: 72px;

    --transition: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover, a:focus {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 9999;
    transform: translateY(0);
    transition: transform var(--transition);
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

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

.cookie-banner a:hover {
    color: #4ade80;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: lowercase;
    padding: 0.5rem 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a:focus::after {
    width: 100%;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    max-height: 900px;
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(26, 26, 46, 0.6) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-text-inverse);
    padding: 0 1.5rem;
    max-width: 800px;
    animation: fadeInUp 1s ease both;
}

.slide-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slide-content .lead {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Slider Controls */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(255,255,255,0.4);
}

.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.slider-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.slider-dots button.active,
.slider-dots button:hover {
    background: white;
    border-color: white;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 0;
}

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

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

.section-dark a {
    color: var(--color-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-header p {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   GRID & CARDS
   ============================================ */
.grid {
    display: grid;
    gap: 2rem;
}

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

.card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-card {
    text-align: center;
}

.feature-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ============================================
   SOLUTIONS
   ============================================ */
.solutions-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    align-items: flex-start;
}

.solutions-col {
    flex: 1 1 0;
    min-width: 280px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 680px) {
    .solutions-col {
        max-width: 100%;
    }
}

.solution-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    transition: background var(--transition);
}

.solution-item:hover {
    background: rgba(255,255,255,0.1);
}

.solution-icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

.solution-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-inverse);
}

.solution-item p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

.solution-highlight {
    background: linear-gradient(135deg, rgba(26,115,232,0.2), rgba(21,87,176,0.2));
    border-color: rgba(26,115,232,0.3);
}

/* ============================================
   CONTACT
   ============================================ */
.section-contact {
    background: var(--color-bg-light);
}

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.contact-form-wrapper {
    background: var(--color-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-control::placeholder {
    color: #aaa;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    cursor: pointer;
}

.form-checkbox a {
    text-decoration: underline;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
}

.info-item a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
}

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

.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-wrapper iframe {
    display: block;
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,0.6);
    padding: 3rem 0;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    opacity: 0.8;
    transition: opacity var(--transition);
}

.footer-logo:hover img {
    opacity: 1;
}

.copyright {
    font-size: 0.875rem;
}

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

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

    .slider-prev,
    .slider-next {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .primary-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }

    .primary-nav.open {
        max-height: 400px;
    }

    .nav-list {
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
    }

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

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

    .nav-list a {
        display: block;
        padding: 1rem 0;
    }

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

    .hero {
        min-height: 400px;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
