*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #faf9f7;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --color-accent: #b08968;
    --color-accent-dark: #8a6a4e;
    --color-white: #ffffff;
    --color-card: #ffffff;
    --color-border: #e8e4df;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 3px;
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--color-accent);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 1px;
}

/* Hero */
.hero {
    position: relative;
    height: 520px;
    background: url('https://images.unsplash.com/photo-1471341971476-ae15ff5dd4ea?w=1400&h=600&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.2rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.center {
    text-align: center;
}

/* About */
.about {
    padding: 80px 24px;
}

.about h2,
.services h2,
.preview h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 24px;
    text-align: center;
}

.about p {
    max-width: 780px;
    margin: 0 auto 16px;
    color: var(--color-text-light);
    text-align: center;
    font-size: 1.05rem;
}

/* Services */
.services {
    background: var(--color-white);
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.service-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Preview grid */
.preview {
    padding: 80px 24px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 40px 0 32px;
}

.preview-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.preview-item:hover img {
    transform: scale(1.05);
}

/* Page header */
.page-header {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 64px 0;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.page-header p {
    font-weight: 300;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Portfolio */
.portfolio {
    padding: 64px 24px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.portfolio-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.portfolio-card:hover {
    transform: translateY(-4px);
}

.portfolio-image {
    aspect-ratio: 3/2;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 24px;
}

.portfolio-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Contacts */
.contacts {
    padding: 64px 24px;
}

.contacts h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.contacts-info-block {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 48px;
}

.contact-line {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
}

.contact-line:last-child {
    border-bottom: none;
}

.contact-line strong {
    min-width: 160px;
    color: var(--color-text);
}

.contact-line span {
    color: var(--color-text-light);
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.team-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.team-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.team-role {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.team-contact {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
    padding: 32px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-inner p + p {
    margin-top: 4px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--color-border);
}

.tab {
    padding: 14px 32px;
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
    color: var(--color-text);
}

.tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Photographers grid */
.photographers-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.photographer-card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 28px;
    padding: 28px;
    transition: transform 0.2s;
}

.photographer-card:hover {
    transform: translateY(-3px);
}

.photographer-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.photographer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photographer-card-info {
    flex: 1;
}

.photographer-card-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.photographer-specialty {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.photographer-exp {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.photographer-bio-short {
    color: var(--color-text-light);
    font-size: 0.93rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-sm {
    padding: 8px 24px;
    font-size: 0.9rem;
}

/* Work author link */
.work-author {
    display: inline-block;
    margin-top: 10px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.work-author:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

/* Photographer detail */
.photographer-detail {
    padding: 64px 24px;
}

.photographer-detail h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 28px;
    margin-top: 48px;
}

.photographer-profile {
    display: flex;
    gap: 40px;
    margin-bottom: 16px;
}

.photographer-profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.photographer-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photographer-profile-info {
    flex: 1;
}

.photographer-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-badge {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.photographer-bio {
    color: var(--color-text-light);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.photographer-profile-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.certificates-list {
    list-style: none;
    padding: 0;
}

.certificates-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.certificates-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* Chat widget */
.chat-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.2s, opacity 0.2s;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 370px;
    max-height: 480px;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.chat-widget.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-msg-system {
    background: var(--color-bg);
    color: var(--color-text-light);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg-user {
    background: var(--color-accent);
    color: var(--color-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-form {
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--color-accent);
}

.chat-input-name {
    font-size: 0.85rem;
    padding: 8px 14px;
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

.chat-send {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    width: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-send:hover {
    background: var(--color-accent-dark);
}

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero {
        height: 400px;
    }

    nav {
        gap: 20px;
    }

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

    .contact-line {
        flex-direction: column;
        gap: 4px;
    }

    .contact-line strong {
        min-width: auto;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .photographer-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .photographer-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .photographer-meta {
        justify-content: center;
    }

    .certificates-list {
        text-align: left;
    }

    .tabs {
        justify-content: center;
    }

    .tab {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .chat-widget {
        width: calc(100% - 24px);
        right: 12px;
        bottom: 12px;
    }

    .chat-toggle {
        right: 16px;
        bottom: 16px;
    }
}
