:root {
    --primary-color: #2a2a2a;
    --accent-color: #ff6b6b;
    --light-color: #f9f9f9;
    --dark-color: #121212;
    --transition: all 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--primary-color);
    overflow-x: hidden;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

/* Стили для анимаций */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Навигация */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 15px 0;
}

.header-scrolled {
    background-color: rgba(18, 18, 18, 0.9);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent-color);
}

.logo svg {
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 5px;
    transition: var(--transition);
}

/* Герой-секция */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--dark-color);
}

.hero-gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    opacity: 0.4;
}

.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    color: var(--light-color);
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.cta-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: var(--light-color);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.6);
}

/* Секция услуг */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
    position: relative;
}

.service-icon {
    position: absolute;
    top: -30px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.service-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.service-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
}

.service-btn:hover {
    background-color: var(--accent-color);
}

/* Секция портфолио */
.portfolio {
    background-color: #f1f1f1;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    margin: 5px;
    background-color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-align: center;
}

.portfolio-category {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Секция отзывов */
.testimonials {
    position: relative;
    overflow: hidden;
}

.testimonials-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.8s ease;
    text-align: center;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 5px solid var(--accent-color);
}

.testimonial-content {
    position: relative;
    padding: 30px;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: #f1f1f1;
    font-family: 'Georgia', serif;
    line-height: 1;
}

.testimonial-content p {
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

.testimonial-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.testimonial-position {
    color: #666;
    font-size: 0.9rem;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--accent-color);
}

/* Секция контактов */
.contact {
    position: relative;
    background: linear-gradient(135deg, var(--dark-color) 0%, #333 100%);
    color: var(--light-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    animation: slideIn 1s ease;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 0;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 107, 107, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-text p, .contact-text a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.contact-text a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
}

/* Футер */
footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.subscribe-form {
    display: flex;
    margin-bottom: 20px;
}

.subscribe-input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.subscribe-btn {
    padding: 10px 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-btn:hover {
    background-color: #ff5252;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Лайтбокс для увеличенного просмотра */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

/* Анимация камеры для прелоадера */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.camera-loader {
    width: 80px;
    height: 60px;
    position: relative;
}

.camera-body {
    width: 80px;
    height: 40px;
    background-color: var(--accent-color);
    border-radius: 10px;
    position: relative;
}

.camera-lens {
    width: 30px;
    height: 30px;
    background-color: #222;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 25px;
    border: 3px solid #555;
}

.camera-flash {
    width: 15px;
    height: 15px;
    background-color: white;
    border-radius: 3px;
    position: absolute;
    top: 5px;
    right: 10px;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.camera-viewfinder {
    width: 20px;
    height: 15px;
    background-color: #555;
    position: absolute;
    top: -15px;
    left: 30px;
    border-radius: 5px 5px 0 0;
}

/* Стили для страницы полного портфолио */
.portfolio-full {
    padding-top: 150px; /* Adjust for fixed header */
}

.portfolio-grid-all {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.portfolio-item-all {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.portfolio-item-all:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item-all .portfolio-img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.portfolio-item-all .portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: var(--light-color);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item-all:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-item-all .portfolio-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.portfolio-item-all .portfolio-category {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Стили для кнопки "Просмотреть все работы" */
.text-center {
    text-align: center;
}

.mt-5 {
    margin-top: 3rem;
}

/* Стили для модального окна карусели */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: none;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--light-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
    background: none;
    border: none;
    padding: 0;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-color);
    text-decoration: none;
}

.modal-carousel {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-carousel img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    animation: fadeInModalImage 0.4s ease-in-out;
}

@keyframes fadeInModalImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide animations */
@keyframes slide-in-from-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-from-left {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.modal-carousel img.slide-in-right {
    animation: slide-in-from-right 0.4s ease-out;
}

.modal-carousel img.slide-in-left {
    animation: slide-in-from-left 0.4s ease-out;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light-color);
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10000;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-nav.prev {
    left: 20px;
    border-radius: 5px;
}

.carousel-nav.next {
    right: 20px;
    border-radius: 5px;
}

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 992px) {
    .portfolio-grid-all {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .portfolio-full {
        padding-top: 100px;
    }

    .portfolio-grid-all {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .carousel-nav {
        padding: 10px 15px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 576px) {
    .portfolio-grid-all {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
    }

    .close-modal {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }

    .carousel-nav {
        left: 10px;
        right: 10px;
    }
}