/* Custom CSS for РЕМСПЕЦТЕХМОНТАЖ */

:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --extra-light-blue: #f0f9ff;
    --dark-blue: #1e3a8a;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Navbar */
.custom-navbar {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.custom-navbar.scrolled {
    background: rgba(30, 64, 175, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--white) !important;
    display: flex;
    align-items: center;
}

/* Navbar Logo Styles */
.navbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Hero Logo Styles */
.hero-logo {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* Mobile navbar fixes */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-logo {
        width: 35px;
        height: 35px;
    }

    .navbar-collapse {
        background: rgba(30, 64, 175, 0.95);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
    }

    .navbar-nav .nav-link {
        margin: 0.5rem 0;
        padding: 0.5rem 1rem;
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }
}

/* Navbar toggler */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Responsive background images */
@media (orientation: landscape) {
    .hero-section::before {
        background-image: url('assets/images/hero-bg-horizontal.jpg');
    }
}

@media (orientation: portrait) {
    .hero-section::before {
        background-image: url('assets/images/hero-bg-vertical.jpg');
    }
}

/* Overlay to reduce contrast */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
    rgba(30, 64, 175, 0.8) 0%,
    rgba(59, 130, 246, 0.7) 50%,
    rgba(6, 182, 212, 0.8) 100%);
    z-index: 2;
}

.hero-overlay {
    position: relative;
    z-index: 3;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons .btn {
    margin-bottom: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.hero-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Works Hero Section */
.works-hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, #06b6d4 100%);
    margin-top: 76px;
    position: relative;
}

.works-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="works-pattern" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="20" cy="20" r="0.8" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="40" cy="60" r="0.6" fill="rgba(255,255,255,0.04)"/><circle cx="90" cy="80" r="0.9" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="100" height="100" fill="url(%23works-pattern)"/></svg>');
}

/* Work Tags */
.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.work-tags .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

/* Section Titles */
.section-title {
    position: relative;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

/* Service Cards */
.service-card {
    background: var(--white);
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--light-blue);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.service-card h4 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h5 {
    margin: 0;
    font-weight: 600;
}

.gallery-placeholder {
    background: linear-gradient(135deg, var(--extra-light-blue), var(--light-blue));
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-blue);
    transition: all 0.3s ease;
}

.gallery-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-placeholder p {
    font-weight: 600;
    margin: 0;
}

.gallery-item:hover .gallery-placeholder {
    background: linear-gradient(135deg, var(--light-blue), var(--secondary-blue));
    color: var(--white);
}

/* Service Preview Cards */
.service-preview-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border: 1px solid var(--light-blue);
}

.service-preview-card:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.15);
}

.service-preview-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.service-preview-content h4 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    position: relative;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 1.5rem;
}

.contact-card h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-card .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.contact-card a,
.contact-card button {
    transition: all 0.3s ease;
}

.contact-card a:hover,
.contact-card button:hover {
    transform: translateY(-2px);
}

.footer-icon-link {
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none !important;
}

.footer-icon-link:hover {
    color: var(--secondary-blue) !important;
    transform: translateY(-2px);
}

/* Contact cards equal height */
.contact-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Footer */
.footer {
    background: var(--text-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.social-links .footer-icon-link {
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links .footer-icon-link:hover {
    color: var(--secondary-blue) !important;
    transform: translateY(-2px);
}

/* Custom Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-blue);
    color: var(--secondary-blue);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--secondary-blue);
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

/* CTA Buttons */
.cta-buttons .btn {
    margin-bottom: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-logo {
        width: 200px;
        height: 200px;
    }

    .hero-icon {
        font-size: 4rem;
    }

    .service-preview-card {
        flex-direction: column;
        text-align: center;
    }

    .service-preview-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .section-title::after {
        left: 50%;
    }

    /* Ensure hero section starts below fixed navbar on mobile */
    .hero-section {
        margin-top: 76px;
    }

    .works-hero-section {
        margin-top: 76px;
    }

    /* Work tags responsive */
    .work-tags {
        justify-content: center;
    }

    .work-tags .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-logo {
        width: 150px;
        height: 150px;
    }

    .service-card,
    .contact-card {
        margin-bottom: 2rem;
    }

    .service-preview-card {
        padding: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    /* Smaller navbar brand on very small screens */
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-logo {
        width: 30px;
        height: 30px;
    }

    /* Adjust hero section margin for smaller navbar */
    .hero-section,
    .works-hero-section {
        margin-top: 70px;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }

    /* Work tags extra small screens */
    .work-tags {
        justify-content: center;
    }

    .work-tags .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Sections offset for fixed navbar */
#about, #gallery, #services, #contact {
    scroll-margin-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--extra-light-blue);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--secondary-blue), var(--primary-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--primary-blue), var(--dark-blue));
}

/* Loading Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Modal Styles */
.modal-dialog {
    max-width: 70vw;
    max-height: 80vh;
}

.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: var(--primary-blue);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(80vh - 60px);
}

.modal-body img {
    max-width: 100%;
    max-height: calc(80vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 85vw;
        margin: 0.5rem;
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

    .modal-header .modal-title {
        font-size: 1.1rem;
    }

    .modal-body img {
        max-height: calc(80vh - 50px);
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        max-width: 90vw;
        margin: 0.25rem;
    }

    .modal-body img {
        max-height: calc(75vh - 50px);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .works-hero-section,
    .contact-section,
    .footer {
        display: none !important;
    }

    body {
        color: black !important;
        background: white !important;
    }

    .section-title {
        color: black !important;
    }
}