/* --- Общие сбросы --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    background: #000;
    z-index: 1000;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo img {
        height: 60px;
    }
}

/* --- Header Buttons Vertical с отступом --- */
.header-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.header-buttons button,
.header-buttons a {
    background: transparent;
    border: 1px solid #555;
    color: #fff;
    padding: 7px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
    width: 130px;
}

.header-buttons button:hover,
.header-buttons a:hover {
    background: #fff;
    color: #000;
}

@media (max-width: 768px) {
    .header-buttons {
        gap: 8px;
        align-items: flex-start;
    }
    .header-buttons button,
    .header-buttons a {
        width: 100%;
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* --- GRID 2x2 FLEX --- */
.grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 100px;
    height: calc(100vh - 100px);
}

.card {
    flex: 0 0 50%;
    height: 50%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 20px;
    cursor: pointer;
}

.card-fade {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 2;
}

.card-fade.active {
    opacity: 1;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    transition: background 0.4s;
    z-index: 3;
}

.card:hover .card-overlay {
    background: rgba(0,0,0,0.35);
}

.card-title {
    position: relative;
    font-size: 24px;
    z-index: 4;
}

/* Индикатор точек */
.card-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.card-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: background 0.3s;
}

.card-indicator .dot.active {
    background: #fff;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 40px;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.prev { left: 40px; }
.next { right: 40px; }

/* --- Контактное окно справа --- */
.contact-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    color: #fff;
    padding: 40px 20px;
    box-shadow: -4px 0 10px rgba(0,0,0,0.5);
    z-index: 3000;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.contact-panel.active {
    right: 0;
}

.contact-panel h2 {
    margin-bottom: 30px;
    font-size: 28px;
    text-align: center;
}

.contact-info p {
    margin-bottom: 20px;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.contact-info p:hover {
    color: #0ff;
}

.contact-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

/* Нотификация */
#copyNotification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
    z-index: 4000;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .grid {
        margin-top: 100px;
        height: calc(100vh - 100px);
    }

    .card {
        flex: 0 0 50%;
        height: 50%;
        padding: 10px;
    }

    .card-title {
        font-size: 20px;
    }

    .contact-panel {
        width: 90%;
        right: -90%;
        padding: 30px 15px;
    }
}