:root {
    --color-primary: #AF9B68;
    --color-primary-hover: #968452;
    --color-text-main: #151515;
    --color-text-light: #ffffff;
    --color-bg-dark: #151515;
    --color-bg-light: #ffffff;
    --color-bg-alt: #f5f5f5;
    --color-border: #e0e0e0;

    --font-family-main: 'Red Hat Display', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --container-width: 1200px;
}

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

body {
    font-family: var(--font-family-main);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--color-bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.text-lead {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-text-light);
}

.btn-outline:hover {
    background-color: var(--color-text-light);
    color: var(--color-text-main);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(21, 21, 21, 0.95);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
}

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

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text-light);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

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

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

/* Hero Section */
.hero {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-text {
    flex: 1;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Utility */
.section-padding {
    padding: var(--spacing-xl) 0;
}

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

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

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

/* Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Feature Grid Improvements */
.feature-card {
    background: #fff;
    padding: 2rem;
    border-top: 4px solid var(--color-primary);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* App Cards */
.app-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-card:hover {
    border-color: transparent;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom;
}

.app-card:hover::before {
    transform: scaleY(1);
}

.app-card .card-icon {
    transition: transform 0.4s ease, color 0.4s ease;
}

.app-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    color: var(--color-primary-hover);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: clamp(28px, 7vw, 36px) !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    .hero-text {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }

    .hero-visual {
        width: 100%;
        margin-top: var(--spacing-sm);
    }

    .hero-visual img {
        max-width: 100%;
        height: auto;
        border-radius: 20px;
    }

    /* TODO: Mobile Menu */
    .container {
        padding: 0 1.5rem;
    }
}

/* Mobile Optimization Classes */

.why-genai-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-direction: row-reverse;
}

.competence-block {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.competence-block.reverse {
    flex-direction: row-reverse;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .why-genai-content {
        flex-direction: column-reverse;
        /* Image Top, Text Bottom */
        gap: 2rem;
    }

    .competence-block,
    .competence-block.reverse {
        gap: 1.5rem;
        align-items: center;
    }

    /* 
       Block 1 & 3 (Normal): [Text, Image] in HTML.
       We want [Image, Text] visually.
       So we use column-reverse.
    */
    .competence-block {
        flex-direction: column-reverse;
    }

    /*
       Block 2 (Reverse): [Image, Text] in HTML.
       We want [Image, Text] visually.
       So we use column.
    */
    .competence-block.reverse {
        flex-direction: column;
    }

    /* Reset widths for stacking */
    .competence-block>div,
    .competence-block.reverse>div {
        width: 100% !important;
        /* Force full width */
        flex: unset;
        text-align: center;
        /* Optional: center text on mobile for better look */
    }

    /* Specific Image Styling for Mobile */
    .competence-block img {
        width: 100%;
        height: auto;
        /* Let it scale naturally or set a max-height if needed */
        max-height: 400px;
        /* Limit height so it doesn't take up whole screen */
        object-fit: cover;
    }

    /* Image Styling */
    .competence-block img {
        height: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center;
        border-radius: 8px;
        /* Consistency */
    }

    /* Fix height issue: If text is long, image height might stretch or not be 1:1. 
       User said "1:1 arányba kerüljön (cropolva)". 
       So specific height logic is needed or aspect-ratio on image tag is enough. 
       But parent div might need to constrain it?
       Let's trust aspect-ratio on img.
    */

    /* Tech Grid */
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: rgba(175, 155, 104, 0.1);
    /* Transparent primary color */
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(175, 155, 104, 0.15);
}