:root {
    --color-bg: #ffffff;
    --color-text: #333333;
    --color-accent: #7b746c;
    --color-divider: #d2cec9;
    --color-overlay: rgba(26, 26, 26, 0.85);
    --font-main: Helvetica, Arial, sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Base settings */
body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

/* Modal Container */
#modal-container {
    background: rgba(0, 0, 0, 0.6);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Contact */
.contact-form button[type="submit"] {
    padding: 16px 25px;
    background: #fff;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    letter-spacing: 2px;
}

.contact-form button[type="submit"]:hover {
    background: #000;
    color: #fff;
    outline: 2px solid #fff;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    color: #fff;
    transition: transform 0.4s ease-in-out;
    transform: translateY(-100%);
}

.header__btn {
    display: inline-flex; 
    align-items: center;  
    justify-content: center; 
    
    height: 38px;          
    padding: 0 12px;       
    
    font-size: 14px;      
    line-height: 1;        
    box-sizing: border-box; 
    text-decoration: none;
    
    margin: 0;        
}

.header__btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.header__trigger {
    z-index: 999;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__btn--cta {
    background-color: #fff !important;
    color: #000 !important;        
    
    border: 1px solid #fff;         
    border-radius: 0 !important;      
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 15px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    font-family: inherit;
    
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.header__btn--cta:hover {
    background-color: transparent !important;
    color: #fff !important;               
    border-color: #fff;                
    opacity: 1;                           
}

.header__logo {
    display: flex;
    align-items: center;
}

.header__logo img {
    max-width: 200px;
    height: auto;
}

/* Hero-section */
.portfolio-hero {
    padding: 180px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.portfolio-hero__title {
    font-size: 72px;
    font-weight: 300;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: var(--color-text);
}

.portfolio-hero__divider {
    width: 80px;
    height: 2px;
    background-color: var(--color-divider);
    margin: 0 auto;
}

/* Project web */
.portfolio-grid {
    padding: 60px 40px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-grid__items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.portfolio-item {
    text-decoration: none;
    color: inherit;
}

.portfolio-item_large {
    grid-column: span 2;
}

.portfolio-item__image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f5f5f5;
}

.portfolio-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.portfolio-item:hover .portfolio-item__image {
    transform: scale(1.05);
}

/* Overlay while hover */
.portfolio-item__overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-overlay);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 30px;
    text-align: center;
    color: #fff;
}

.portfolio-item:hover .portfolio-item__overlay {
    opacity: 1;
}

.portfolio-item__category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}

/* Information under project-card */
.portfolio-item__info {
    padding: 20px 0;
}

.portfolio-item__info-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.portfolio-item__info-category {
    font-size: 12px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    display: block;
}

/* Footer */
.portfolio-footer {
    padding: 40px 0;
    background-color: #1c1c1c;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-btn {
    display: inline-block;
    padding: 12px 22px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0px;
    background: linear-gradient(145deg, #2a2a2a, #151515);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
    transition: all 0.25s ease;
    cursor: pointer;
    font-family: var(--font-main);
}

.footer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.8);
    background: linear-gradient(145deg, #333, #1a1a1a);
}

/* Animation */
.portfolio-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.portfolio-animate_visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile adaptive */
@media (max-width: 430px) {
    /* Header & Navigation */
    .header {
        padding: 0 15px;
        height: 60px;
    }

    .header__logo img {
        max-width: 115px;
        height: auto;
    }

    .header__nav {
        gap: 8px;
    }

    /* Базовый стиль кнопок в хедере */
    .header__btn {
        height: 34px;           /* Компактная высота */
        padding: 0 10px;        /* Уменьшенные отступы */
        font-size: 13px;        /* Читабельный шрифт для мобильных */
        border-radius: 0 !important; /* Строго прямоугольные */
    }

    /* Кнопка "Оставить заявку" - Белый фон, черный текст */
    .header__btn--cta {
        background-color: #fff !important;
        color: #000 !important;
        border: 1px solid #fff;
    }

    /* Инверсия при нажатии/наведении на мобильных */
    .header__btn--cta:active,
    .header__btn--cta:hover {
        background-color: transparent !important;
        color: #fff !important;
    }

    /* Portfolio Hero */
    .portfolio-hero__title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    /* Footer Buttons */
    .footer-btn {
        max-width: 210px;
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 0px !important; /* Убираем округление в футере */
    }
}