:root {
    --primary-blue: #0077be;
    --light-blue: #00a8e8;
    --white: #ffffff;
    --light-bg: #f8fdff;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --dark-blue: #005a8c;
    --border-color: #e6f7ff;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 119, 190, 0.1);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 119, 190, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary-blue);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text h1 {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Navigation */
.main-nav {
    display: flex;
    margin: 0 auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
}

/* Header Contacts with Social Icons */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.header-phone {
    text-align: right;
}

.phone-number {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    white-space: nowrap;
}

.phone-number:hover {
    color: var(--light-blue);
    transform: translateY(-1px);
}

.phone-mobile {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 3px;
}

.phone-mobile a {
    color: var(--dark-blue);
    text-decoration: none;
    white-space: nowrap;
}

.phone-mobile a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.phone-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 3px;
    opacity: 0.8;
}

/* Social Icons */
.header-social {
    display: flex;
    gap: 0.8rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    color: var(--primary-blue);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border: 1px solid rgba(0, 119, 190, 0.1);
}

.social-icon:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 119, 190, 0.2);
}

/* Mobile Contacts in Menu */
.mobile-contacts {
    display: none;
    text-align: center;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

.mobile-contacts .phone-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.mobile-contacts .phone-mobile {
    font-size: 1rem;
    margin: 0.5rem 0;
}

.mobile-contacts .phone-label {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--text-gray);
}

.mobile-contacts .header-social {
    justify-content: center;
    margin-top: 1.5rem;
}

/* Content Wrapper */
/* Раньше здесь была margin-top: var(--header-height) + padding-top: 20px —
   компенсация под header с position: fixed. Сейчас шапка (includes/header.php)
   уже sticky и сама занимает место в потоке документа, поэтому эта компенсация
   создавала лишний пустой отступ под шапкой (двойной отступ). См. также
   .content-wrapper в includes/header.php — там уже учтено, что шапка sticky. */
.content-wrapper {
    min-height: calc(100vh - 200px);
}

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 120, 190, 0.3);
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 190, 0.4);
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* Page Title */
.page-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 2.2rem;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #005a8c 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-contacts p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-contacts a {
    color: var(--white);
    text-decoration: none;
}

.footer-contacts a:hover {
    text-decoration: underline;
}

/* Social Icons in Footer */
.footer-social {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social .social-link:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: black;
}

.callback-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.callback-info {
    padding-right: 1rem;
    border-right: 1px solid #eee;
}

.callback-info p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.phone-display {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.phone-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.callback-form {
    padding-left: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 119, 190, 0.1);
}

/* Additional Info Sections */
.additional-info {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.additional-info h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.additional-info p {
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-content {
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .header-contacts {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-end;
    }
    
    .header-social {
        order: -1;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 110px;
    }
    
    .header-content {
        grid-template-columns: 1fr auto auto;
        display: grid;
        gap: 1rem;
    }
    
    .logo {
        grid-column: 1;
    }
    
    .mobile-menu-toggle {
        grid-column: 2;
    }
    
    .header-contacts {
        display: none;
    }
    
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        padding: 0 2rem;
    }
    
    .main-nav a {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
        display: block;
        text-align: center;
        border-radius: 8px;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: var(--light-bg);
        transform: none;
    }
    
    .main-nav a.active::after {
        display: none;
    }
    
    .mobile-contacts {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .content-wrapper {
        /* margin-top/padding-top убраны — см. комментарий у базового .content-wrapper выше */
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .callback-content {
        grid-template-columns: 1fr;
    }
    
    .callback-info {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 1rem;
    }
    
    .callback-form {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 120px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        grid-template-columns: 1fr auto auto;
        gap: 0.5rem;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .main-nav {
        width: 280px;
        right: -280px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        /* margin-top/padding-top убраны — см. комментарий у базового .content-wrapper выше */
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.hidden {
    display: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}