/* ===== Global Styles ===== */
:root {
    --primary-color: #ff8c42;
    --primary-dark: #e67e2a;
    --secondary-color: #7d8a96;
    --accent-color: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #d1d5db;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Navigation ===== */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.menu a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
}

.cta-button-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ===== Section Title ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* ===== Services Section ===== */
.services {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

.service-card.in-development {
    background-color: #e8e8e8;
    opacity: 0.7;
    position: relative;
}

.service-card.in-development::before {
    content: 'В розробці';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(125, 138, 150, 0.4);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
}

.service-card.in-development * {
    position: relative;
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-white);
}

.service-card.in-development:hover {
    background-color: #e8e8e8;
    transform: translateY(-4px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounceIcon 2s ease-in-out infinite;
}

.service-card:hover .service-icon {
    animation: rotateIcon 0.6s ease-in-out;
}

@keyframes bounceIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotateIcon {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Description Section ===== */
.description {
    padding: 80px 0;
    background: linear-gradient(to right, var(--bg-light), var(--bg-white));
}

.description-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.features-list {
    max-width: 600px;
    margin: 3rem auto 0;
}

.features-list h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.features-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.features-list li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
}

/* ===== Gallery Section ===== */
.gallery {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background-color: var(--bg-light);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #e0e7ff;
}

.gallery-content {
    padding: 1.5rem;
}

.gallery-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.gallery-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== Contacts Section ===== */
.contacts {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contacts .section-title {
    color: white;
    text-align: center;
}

.contacts-content-center {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.submit-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {

    /* Hamburger Menu Active */
    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translateY(12px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-12px);
    }

    /* Menu Mobile */
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        padding: 1rem;
        gap: 0;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }

    .menu.active {
        display: flex;
    }

    .menu li {
        width: 100%;
    }

    .menu a {
        display: block;
        padding: 0.75rem;
        width: 100%;
    }

    /* Hero */
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Section Title */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* Contacts */
    .contacts-content-center {
        max-width: 100%;
    }

    /* Sections Padding */
    .services,
    .description,
    .gallery {
        padding: 60px 0;
    }

    .contacts {
        padding: 60px 0;
    }

    /* Footer Links */
    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== Loading & Animation ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.gallery-item {
    animation: fadeIn 0.6s ease forwards;
}

.service-card:nth-child(n) {
    animation-delay: calc(0.1s * var(--index, 0));
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== Scroll to Top Button ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
    display: flex;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ===== Modal Styles ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.modal-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-description {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    text-align: justify;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background-color: var(--bg-light);
    cursor: pointer;
}

.gallery-modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-modal-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-modal-images img:hover {
    transform: scale(1.05);
}