:root {
    --bg-color: #f4f6f8;
    --white: #ffffff;
    --text-main: #000000;
    --text-secondary: #333333;
    --border-color: #E2E2E2;
    --radius-pill: 50px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-ui: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-ui);
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto; /* Allow normal scrolling */
    background-color: #1a232c; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background Image */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('backround-image/unigair-backround.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Navigation Pill */
.top-nav {
    margin-top: 32px;
    background: var(--white);
    height: 56px;
    width: 90%;
    max-width: 1100px;
    border-radius: var(--radius-pill);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 24px;
    width: auto;
}

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

.nav-btn {
    background: none;
    border: none;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    position: relative;
    padding: 6px 4px;
    transition: opacity 0.2s ease;
}

.nav-btn.active {
    font-weight: 600;
}

/* Main Container */
.main-container {
    width: 90%;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 24px;
    margin-top: 32px;
    padding: 60px 70px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    margin-bottom: 40px;
    display: flex;
    overflow: hidden;
    height: auto;
    min-height: 60vh;
}

/* Views logic */
.view {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    padding: 60px 70px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: 0; 
}

/* View Titles */
.view-title {
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -1px;
    margin-bottom: 40px;
    line-height: 1.1;
}

/* --- Tehtud tööd --- */
.gallery-wrapper {
    position: relative;
    width: 100%;
}

.gallery {
    display: flex;
    gap: 16px;
    height: 480px; 
    width: 100%;
    scroll-behavior: smooth;
}

.gallery-item {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Fades to mimic figma scroll view */
.fade-left, .fade-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 80px;
    pointer-events: none;
    z-index: 2;
}
.fade-left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
.fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

/* --- Kontakt --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    width: 100%;
    margin-bottom: 50px;
}

.contact-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 44px;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.form-group label {
    font-size: 22px;
    font-weight: 500;
    min-width: 90px;
    text-align: left;
}

.form-group input, 
.form-group textarea {
    flex: 1;
    width: 100%;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 24px;
    padding: 0 20px;
    font-size: 16px;
    font-family: var(--font-ui);
    transition: border-color 0.2s ease;
    outline: none;
}

.form-group input {
    height: 44px;
}

.form-group textarea {
    height: 120px;
    border-radius: 20px;
    padding: 16px 20px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #B0B0B0;
}

.message-group {
    align-items: flex-start;
}

.message-group label {
    margin-top: 10px;
}

/* Info Styles */
.info-section .contact-title {
    text-align: center;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 400;
}

.bottom-logo {
    display: flex;
    justify-content: center;
    margin-top: auto; 
}

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

/* --- Tablets (max 900px) --- */
@media (max-width: 900px) {
    .main-container {
        padding: 40px;
    }
    .view {
        padding: 40px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .fade-left, .fade-right {
        display: none;
    }
    .gallery {
        height: 380px;
    }
}

/* --- Mobile Devices (max 600px) --- */
@media (max-width: 600px) {
    .top-nav {
        width: 95%;
        padding: 0 20px;
        margin-top: 20px;
        height: 50px;
    }
    .nav-links {
        gap: 16px;
    }
    .nav-btn {
        font-size: 14px;
    }
    .logo {
        height: 20px;
    }

    .main-container {
        width: 95%;
        padding: 30px 20px;
        margin-top: 20px;
        border-radius: 20px;
    }
    .view {
        padding: 30px 20px;
    }

    .view-title, .contact-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    /* Mobile Swipe Gallery */
    .gallery {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 20px; /* space for scroll handle if visible */
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none;    /* Firefox */
    }
    .gallery::-webkit-scrollbar {
        display: none;
    }
    .gallery-item {
        flex: 0 0 85%; /* Shows a peek of the next image */
        scroll-snap-align: center;
        height: 350px;
    }
    .gallery-item:hover {
        transform: none; /* Disable hover translation on mobile to avoid jitter */
    }

    /* Contact Form Tweaks */
    .contact-grid {
        gap: 50px;
        margin-bottom: 30px;
    }
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .form-group label {
        font-size: 18px;
        min-width: unset;
        margin-top: 0;
    }
    .message-group label {
        margin-top: 0;
    }
    .info-content {
        font-size: 16px;
        gap: 16px;
        text-align: center;
    }
    .bottom-logo img {
        height: 36px;
    }
}

/* --- Image Modal --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.image-modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1001;
    font-family: Arial, sans-serif;
}

.close-modal:hover {
    color: #ccc;
}
