/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f8;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Header Styles */
header {
    background-color: #0d1626;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #8a7df8;
    font-weight: bold;
    font-size: 24px;
    letter-spacing: 1px;
}

.logo span {
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
    color: white;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    width: 200px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 500;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-signup {
    background-color: #8a7df8;
    color: white;
}

/* Main Content */
.main-content {
    width: 100%;
    padding: 0;
    background-color: #f5f5f8;
}

.gradient-rectangle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(30deg, #e2dfff 0%, #f5f5f8 100%);
    padding: 40px 10%;
    width: 100%;
    min-height: 400px;
}

.main-text {
    width: 50%;
}

.main-text h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #0d1626;
}

.main-text p {
    margin-bottom: 25px;
    color: #555;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-task {
    background-color: #0d1626;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
}

.btn-work {
    background-color: transparent;
    color: #0d1626;
    padding: 12px 25px;
    border-radius: 25px;
    border: 1px solid #0d1626;
    font-weight: 500;
}

.main-image {
    width: 40%;
}

.main-image img {
    width: 100%;
    border-radius: 15px;
}

/* Service Areas */
.services {
    padding: 50px 10%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services h2 {
    margin-bottom: 30px;
    color: #0d1626;
}

.service-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category {
    border-radius: 50px;
    padding: 12px 25px;
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    min-width: 120px;
    height: 50px;
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(65, 63, 63, 0.4);
    border-radius: 50px;
    z-index: 1;
}

.category {
    position: relative;
    z-index: 2;
}

.see-more {
    color: #8a7df8;
    align-self: flex-end;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.see-more:hover {
    color: #666;
}

/* How it Works */
.how-it-works {
    padding: 50px 10%;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #0d1626;
}

.steps-container {
    background-color: #ffffff;
    border-radius: 25px;
    padding: 50px 60px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 22%;
}

.step-icon {
    width: 60px;
    height: 60px;
    background-color: #e2dfff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #0d1626;
}

.step h3 {
    margin-bottom: 12px;
    color: #0d1626;
    font-size: 18px;
}

.step p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* VIP Tasks */
.vip-tasks {
    padding: 50px 10%;
}

.vip-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.vip-tasks-header h2 {
    color: #0d1626;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.task-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.task-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

.task-budget {
    margin-bottom: 15px;
}

.task-budget span {
    font-weight: 600;
    color: #0d1626;
}

.btn-details {
    background-color: #4caf50;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

.task-date {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

/* Statistics */
.statistics {
    padding: 50px 10%;
    text-align: center;
}

.statistics h2 {
    margin-bottom: 40px;
    color: #0d1626;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #4caf50;
    margin-bottom: 15px;
}

.stat-graph {
    margin: 20px 0;
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.graph-bar {
    width: 8%;
    background-color: #4caf50;
    border-radius: 3px 3px 0 0;
}

.stat-info {
    font-size: 14px;
    color: #666;
}

/* Footer */
footer {
    background-color: #0d1626;
    color: white;
    padding: 50px 10% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    color: #8a7df8;
    font-weight: bold;
    font-size: 24px;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 14px;
    color: #888;
}

/* Registration Section */
.registration {
    padding: 50px 10%;
    background-color: #fff;
    text-align: center;
}

.registration h2 {
    margin-bottom: 30px;
    color: #0d1626;
    font-size: 24px;
}

.registration form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="file"] {
    border: none;
    padding: 0;
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    width: 24px;
    height: 24px;
}

.form-group input[type="tel"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: calc(100% - 34px); /* Учитываем ширину флага и отступ */
}

.checkbox-group {
    margin-top: 10px;
}

.checkbox-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.privacy-info {
    margin: 30px 0;
    text-align: left;
    color: #666;
}

.privacy-info h3 {
    margin-bottom: 10px;
    color: #0d1626;
    font-size: 18px;
}

.privacy-info p {
    font-size: 14px;
}

.btn-register {
    background-color: #4caf50;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-register:hover {
    background-color: #45a049;
}
/* User Avatar */
.user-avatar {
    display: inline-block;
    vertical-align: middle;
}
/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
}

.btn-logout {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: #e60000;
}

/* Адаптация для мобильных устройств (до 768px) */
@media (max-width: 768px) {
    /* Header */
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 5%;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    nav ul li {
        margin-left: 0;
        font-size: 14px;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
        padding: 8px 12px;
        font-size: 14px;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 6px 14px;
        font-size: 14px;
    }

    .user-profile {
        flex-direction: column;
        gap: 5px;
    }

    /* Main Content */
    .gradient-rectangle {
        flex-direction: column;
        padding: 20px 5%;
        min-height: 250px;
    }

    .main-text {
        width: 100%;
        text-align: center;
    }

    .main-text h1 {
        font-size: 20px;
    }

    .main-text p {
        font-size: 12px;
    }

    /* Перемещаем картинку над кнопками и корректируем кнопки */
    .main-image {
        width: 80%;
        margin: 20px auto; /* Центрируем картинку */
        order: -1; /* Перемещаем картинку перед кнопками */
    }

    .main-image img {
        border-radius: 10px;
    }

    .action-buttons {
        display: flex;
        justify-content: space-between; /* Располагаем кнопки по краям */
        gap: 0; /* Убираем фиксированный отступ */
        width: 100%; /* Занимаем всю ширину */
    }

    .btn-task,
    .btn-work {
        padding: 8px 15px;
        font-size: 12px;
        width: 45%; /* Ограничиваем ширину кнопок */
        text-align: center;
    }

    /* Service Areas */
    .services {
        padding: 20px 5%;
    }

    .services h2 {
        font-size: 18px;
    }

    .service-categories {
        gap: 10px;
    }

    .category {
        min-width: 90px;
        height: 35px;
        font-size: 10px;
        padding: 10px 20px;
    }

    .see-more {
        font-size: 12px;
    }

    /* How it Works */
    .how-it-works {
        padding: 20px 5%;
    }

    .how-it-works h2 {
        font-size: 18px;
    }

    .steps-container {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .step {
        width: 100%;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step h3 {
        font-size: 14px;
    }

    .step p {
        font-size: 10px;
    }

    /* VIP Tasks */
    .vip-tasks {
        padding: 20px 5%;
    }

    .vip-tasks-header h2 {
        font-size: 18px;
    }

    .task-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .task-card {
        padding: 10px;
    }

    .task-title {
        font-size: 12px;
    }

    .task-budget {
        font-size: 10px;
    }

    .btn-details {
        padding: 5px 10px;
        font-size: 10px;
    }

    .task-date {
        font-size: 8px;
    }

    /* Statistics */
    .statistics {
        padding: 20px 5%;
    }

    .statistics h2 {
        font-size: 18px;
    }

    .stats-container {
        flex-direction: column;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-graph {
        height: 60px;
    }

    .stat-info {
        font-size: 10px;
    }

    /* Footer */
    footer {
        padding: 20px 5% 10px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-logo {
        font-size: 18px;
    }

    .footer-column h3 {
        font-size: 14px;
    }

    .footer-links li {
        font-size: 10px;
    }

    .footer-bottom {
        font-size: 10px;
    }

    /* Registration Section */
    .registration {
        padding: 20px 5%;
    }

    .registration h2 {
        font-size: 18px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 6px;
        font-size: 12px;
        width: 100%;
    }

    /* Стили для поля телефона с флагом */
    .phone-input {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .flag-icon {
        width: 20px;
        height: 20px;
    }

    .form-group input[type="tel"] {
        padding: 6px;
        font-size: 12px;
        width: calc(100% - 28px); /* Учитываем ширину флага и отступ */
    }

    .btn-register {
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Запрет альбомного режима через медиа-запрос */
@media (orientation: landscape) and (max-width: 768px) {
    body::before {
        content: "Please rotate your device to portrait mode for the best experience.";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 20px;
        font-size: 16px;
        z-index: 9999;
    }
}