:root {
    --bg: #0a0a0a;
    --text: #ffffff;
    --accent: #007AFF; /* Apple Blue для акцентов */
    --gray: #1a1a1a;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo { 
    font-weight: 700; 
    font-size: 1.2rem; 
    letter-spacing: 1px; 
    color: var(--text); 
    text-decoration: none;
}

nav a { 
    color: var(--text); 
    text-decoration: none; 
    margin-left: 2rem; 
    font-size: 0.9rem; 
    opacity: 0.6; 
    transition: 0.3s; 
}

nav a:hover, nav a.active { 
    opacity: 1; 
}

.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
}

.hero h1 { 
    font-size: clamp(2.5rem, 8vw, 5rem); 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
}
.hero p { 
    font-size: 1.2rem; 
    opacity: 0.6; 
    max-width: 600px; 
    margin-bottom: 2rem; 
}

.btn {
    display: inline-block;
    background: var(--text);
    color: var(--bg);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}
.btn:hover { transform: scale(1.05); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
}
.btn-outline:hover {
    background: var(--text);
    color: var(--bg);
}

.section { padding: 5rem 10%; }
.section-title { 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 4px; 
    opacity: 0.4; 
    margin-bottom: 1rem;
}

.portfolio { background: var(--bg); }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--gray);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: block;
    position: relative;
    border: 1px solid #333;
    transition: border-color 0.3s, transform 0.3s;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
}
.card:hover {
    border-color: #777;
    transform: translateY(-4px);
}

.card .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.3s;
}

.card .hover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover .hover-video {
    opacity: 1;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 3;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.card:hover .card-overlay {
    transform: translateY(0);
    opacity: 1;
}

.card-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Project Details */
.project-details {
    padding: 2rem 10% 5rem;
}

.project-details .project-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 3rem;
    line-height: 1.1;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-block h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.info-block p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0;
}

.project-media {
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray);
    aspect-ratio: 16/9;
    border: 1px solid #333;
}

.project-media iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =============================================
   ABOUT PAGE STYLES
   ============================================= */

.about { background: #0f0f0f; min-height: 80vh; }

.about-content {
    display: flex;
    gap: 6rem;
    margin-top: 3rem;
    align-items: flex-start;
}

/* Left: Text column */
.about-text {
    flex: 1;
    max-width: 600px;
}

.about-text h1 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.05;
    margin: 0.5rem 0 0.75rem;
    font-weight: 700;
}

.about-headline {
    font-size: 0.85rem;
    opacity: 0.4;
    letter-spacing: 0.02em;
    margin: 0 0 2.5rem;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.85;
    opacity: 0.65;
    margin: 0 0 1.4rem;
}

/* Spec list */
.about-spec-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.about-spec-list li {
    font-size: 0.9rem;
    opacity: 0.55;
    padding: 0.65rem 0;
    border-bottom: 1px solid #1c1c1c;
}

.about-spec-list li:first-child {
    border-top: 1px solid #1c1c1c;
}

/* Right: Portrait column */
.about-photos {
    flex: 0 0 auto;
    width: 360px;
}

.about-portrait {
    width: 100%;
    border-radius: 16px;
    display: block;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* =============================================
   CHAT WIDGET STYLES
   ============================================= */

/* -- Toggle Button (FAB) -- */
.chat-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.chat-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* -- Chat Panel -- */
.chat-widget {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    z-index: 998;
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    /* Closed by default */
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.chat-widget.chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* -- Header -- */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #1f1f1f;
    background: #141414;
}
.chat-header-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.chat-header-status {
    font-size: 0.72rem;
    opacity: 0.45;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}
.chat-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    display: inline-block;
}
.chat-close-btn {
    background: none;
    border: none;
    color: var(--text);
    opacity: 0.5;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}
.chat-close-btn:hover { opacity: 1; }

/* -- Messages -- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}

.chat-msg {
    display: flex;
}
.chat-msg--user {
    justify-content: flex-end;
}
.chat-msg--assistant {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.65rem 1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.6;
}
.chat-msg--user .chat-bubble {
    background: var(--text);
    color: var(--bg);
    border-bottom-right-radius: 4px;
}
.chat-msg--assistant .chat-bubble {
    background: #1e1e1e;
    color: rgba(255,255,255,0.85);
    border-bottom-left-radius: 4px;
    border: 1px solid #2a2a2a;
}

/* -- Typing indicator -- */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 1rem;
}
.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    animation: chatBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* -- Quick chips -- */
.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid #1f1f1f;
}
.chat-chip {
    background: none;
    border: 1px solid #2e2e2e;
    border-radius: 50px;
    color: rgba(255,255,255,0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.chat-chip:hover {
    border-color: rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.9);
}

/* -- Input row -- */
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #1f1f1f;
    background: #141414;
}
.chat-input {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 50px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: rgba(255,255,255,0.3);
}
.chat-input::placeholder { opacity: 0.35; }

.chat-send-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.2s;
}
.chat-send-btn:hover { transform: scale(1.08); }

@media (max-width: 480px) {
    .chat-widget { right: 1rem; width: calc(100vw - 2rem); bottom: 5rem; }
    .chat-toggle-btn { right: 1rem; bottom: 1.2rem; }
}

footer { 

    padding: 5rem 10%; 
    border-top: 1px solid #222; 
    text-align: center; 
    background: var(--bg);
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--bg);
    border-top: 1px solid #222;
}

.testimonials .section-title {
    margin-left: 10%;
    margin-bottom: 3rem;
}

.testimonial-single-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 2rem;
}

.testimonial-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease;
}

.quote-icon {
    font-size: 5rem;
    line-height: 1;
    color: var(--text);
    opacity: 0.2;
    margin-bottom: -1rem;
    font-family: Georgia, serif;
}

.review-text {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.review-author {
    font-weight: 700;
    font-size: 1rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.nav-btn:hover {
    opacity: 1;
    border-color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
    .about-content { flex-direction: column-reverse; gap: 2.5rem; }
    .about-photos { width: 100%; max-width: 300px; }
    .about-text { max-width: 100%; }
}

@media (max-width: 768px) {
    .hero { padding: 0 5%; }
    header { flex-direction: column; padding: 1.5rem; gap: 1rem; }
    nav { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
    nav a { margin-left: 0; }
}



