/* =============================
   CSS Variables (Light Theme)
   ============================= */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #707579;
    --border-color: #e0e0e0;
    --accent-color: #0088cc;
    --accent-hover: #0077b3;
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-dark: rgba(0, 0, 0, 0.4);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================
   Dark Theme
   ============================= */
.dark-theme {
    --bg-primary: #212121;
    --bg-secondary: #2c2c2c;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #3a3a3a;
    --accent-color: #0088cc;
    --accent-hover: #0099dd;
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-dark: rgba(0, 0, 0, 0.6);
}

/* =============================
   Reset & Base Styles
   ============================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* =============================
   Header
   ============================= */
.contacts-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--header-bg, var(--bg-primary));
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.nav-link.active {
    color: var(--accent-color);
    background-color: var(--bg-secondary);
}

.nav-link.lang-switch {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
}

/* =============================
   Main Content
   ============================= */
.contacts-main {
    flex: 1;
    padding: 40px 16px;
}

.contacts-container {
    max-width: 960px;
    margin: 0 auto;
}

/* =============================
   Hero Section
   ============================= */
.contacts-hero {
    text-align: center;
    margin-bottom: 64px;
    padding: 32px 0;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =============================
   Contact Info Section
   ============================= */
.contact-info {
    margin-bottom: 64px;
    padding: 40px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-info-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.contact-info-item {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-label {
    font-weight: 600;
    color: var(--text-primary);
    display: inline-block;
    min-width: 120px;
}

/* =============================
   Form Section
   ============================= */
.contacts-form-section {
    margin-bottom: 64px;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-field {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707579' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 36px;
}

.dark-theme .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-top: 16px;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #dc3545;
    font-size: 14px;
}

.dark-theme .form-error {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    color: #28a745;
    font-size: 16px;
    font-weight: 500;
}

.dark-theme .form-success {
    background-color: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.4);
}

.form-success-icon {
    font-size: 48px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.form-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-button-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.form-button-secondary:hover:not(:disabled) {
    background-color: var(--bg-primary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.form-button-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.form-button-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-button:active:not(:disabled) {
    transform: translateY(0);
}

/* =============================
   Footer
   ============================= */
.contacts-footer {
    margin-top: auto;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 16px 24px;
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* =============================
   Responsive Design
   ============================= */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .header-nav {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .contacts-main {
        padding: 24px 12px;
    }

    .contacts-hero {
        margin-bottom: 48px;
        padding: 24px 0;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 16px;
    }

    .contact-info {
        padding: 24px;
    }

    .contact-info-title {
        font-size: 20px;
    }

    .contact-info-label {
        display: block;
        margin-bottom: 4px;
        min-width: auto;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .feedback-form {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-button {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .contacts-hero {
        margin-bottom: 40px;
    }

    .header-nav {
        gap: 10px;
    }

    .nav-link {
        padding: 8px 4px;
    }

    .hero-title {
        font-size: 28px;
    }

    .contact-info {
        padding: 20px;
    }

    .section-title {
        font-size: 24px;
    }

    .feedback-form {
        padding: 20px;
    }
}

