/* ================================
   FAR IT - Main Stylesheet
   Parallax Scrolling Design
   ================================ */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --black: #000000;
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --overlay-gradient: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --header-height: 80px;
}

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

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

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* ================================
   Header & Navigation
   ================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    height: var(--header-height);
    background: transparent;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .logo,
.header.scrolled .nav-link {
    color: var(--secondary-color);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-link--cta {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    background: var(--primary-dark);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-normal);
}

.header.scrolled .nav-toggle span {
    background: var(--secondary-color);
}

/* ================================
   Reveal on Scroll Sections
   ================================ */

/* Wrapper - conține toate secțiunile parallax */
.parallax-wrapper {
    position: relative;
}

/* Imaginile de fundal fixe - stivuite */
.bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -10;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}

.bg-fixed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-gradient);
}

.bg-fixed.active {
    opacity: 1;
}

/* Prima imagine vizibilă la start */
.bg-fixed-1 {
    opacity: 1;
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80');
}
.bg-fixed-2 { background-image: url('https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?w=1920&q=80'); }
.bg-fixed-3 { background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1920&q=80'); }
.bg-fixed-4 { background-image: url('https://images.unsplash.com/photo-1547658719-da2b51169166?w=1920&q=80'); }
.bg-fixed-5 { background-image: url('https://images.unsplash.com/photo-1586075010923-2dd4570fb338?w=1920&q=80'); }

/* Fiecare secțiune */
.parallax-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Imaginea de fundal în secțiune - ascunsă pe desktop */
.parallax-bg {
    display: none;
}

/* Container pentru imaginile fixe - nu mai e folosit */
.bg-container {
    display: none;
}

/* Content Styling */
.content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
}

.content-inner {
    max-width: 700px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.parallax-section .section-tag {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.parallax-section h1,
.parallax-section h2 {
    font-family: var(--font-primary);
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.parallax-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

.parallax-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

.parallax-section p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 550px;
}

/* Feature List */
.feature-list {
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-full {
    width: 100%;
}

/* ================================
   Contact Section
   ================================ */
.contact-section {
    background: var(--secondary-color);
    padding: 6rem 2rem;
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.contact-info > p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--secondary-color);
    color: var(--white);
}

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

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

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.form-checkbox label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.form-checkbox a {
    color: var(--accent-color);
}

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

/* ================================
   Footer
   ================================ */
.footer {
    background: #0a0f1a;
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
}

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

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

/* ================================
   Services Overview Section
   ================================ */
.services-overview {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 6rem 2rem;
}

.services-overview .section-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.services-overview h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--white);
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
    border-color: var(--primary-color);
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: var(--accent-color);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.service-link:hover {
    color: var(--white);
}

/* ================================
   About Section
   ================================ */
.about-section {
    background: var(--white);
    padding: 6rem 2rem;
}

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

.about-content h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-family: var(--font-primary);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
}

/* ================================
   Portfolio Section
   ================================ */
.portfolio-section {
    background: #f8fafc;
    padding: 6rem 2rem;
}

.portfolio-section h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.portfolio-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================================
   Responsive Design
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

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

    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: right var(--transition-normal);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--white);
        font-size: 1.25rem;
        padding: 1rem 0;
    }

    .nav-link--cta {
        margin-top: 1rem;
    }

    /* Reveal on scroll - disable on mobile for better performance */
    .bg-fixed {
        display: none;
    }

    .parallax-section {
        position: relative;
        min-height: 100vh;
        min-height: 100svh; /* Small viewport height for mobile */
    }

    .parallax-bg {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
    }

    .parallax-bg::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--overlay-gradient);
    }

    /* Imaginile de fundal pentru mobile (dimensiuni mai mici) */
    .section-1 .parallax-bg { background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1200&q=70'); }
    .section-2 .parallax-bg { background-image: url('https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?w=1200&q=70'); }
    .section-3 .parallax-bg { background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1200&q=70'); }
    .section-4 .parallax-bg { background-image: url('https://images.unsplash.com/photo-1547658719-da2b51169166?w=1200&q=70'); }
    .section-5 .parallax-bg { background-image: url('https://images.unsplash.com/photo-1586075010923-2dd4570fb338?w=1200&q=70'); }

    .content {
        padding: 1.5rem;
        padding-top: calc(var(--header-height) + 2rem);
    }

    .parallax-section h1 {
        font-size: 2.25rem;
    }

    .parallax-section h2 {
        font-size: 1.875rem;
    }

    .parallax-section p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Contact */
    .contact-section {
        padding: 4rem 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Services Overview */
    .services-overview {
        padding: 4rem 1.5rem;
    }

    .services-overview h2 {
        font-size: 2rem;
    }

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

    /* About Section */
    .about-section {
        padding: 4rem 1.5rem;
    }

    .about-content h2 {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-placeholder {
        height: 300px;
    }

    /* Portfolio */
    .portfolio-section {
        padding: 4rem 1.5rem;
    }

    .portfolio-section h2 {
        font-size: 2rem;
    }

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

/* Small phones */
@media (max-width: 480px) {
    .parallax-section h1 {
        font-size: 1.875rem;
    }

    .parallax-section h2 {
        font-size: 1.5rem;
    }

    .section-tag {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* High resolution screens */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }

    .content {
        max-width: 1400px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parallax-bg {
        background-attachment: scroll;
    }
}
