/* Основные стили для блога ИИ и Интеллектуальная Собственность */

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Переменные цветов и размеров */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333333;
    --light-text-color: #666666;
    --background-color: #ffffff;
    --light-background: #f9f9f9;
    --border-color: #eeeeee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --container-width: 1200px;
    --header-height: 80px;
}

/* Основные стили */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

p {
    margin-bottom: 1.5rem;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

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

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--light-background);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-tertiary {
    background-color: #fff;
    color: var(--light-text-color);
    border: 1px solid var(--border-color);
}

.btn-tertiary:hover {
    background-color: var(--light-background);
    color: var(--text-color);
}

/* Хедер */
header {
    background-color: var(--background-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 60px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

nav ul li a.active {
    color: var(--primary-color);
}

/* Главная страница */
.hero {
    background-color: var(--primary-color);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.admin-preview {
    background-color: var(--light-background);
    padding: 30px;
    margin-bottom: 50px;
    border-radius: 8px;
}

.admin-preview h3 {
    margin-bottom: 20px;
}

.admin-frame {
    width: 100%;
    height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: url('images/admin.jpg') center/cover no-repeat;
}

.tip-of-day {
    background-color: var(--light-background);
    padding: 30px;
    margin-bottom: 50px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.tip-content {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.tip-date {
    font-style: italic;
    color: var(--light-text-color);
    text-align: right;
    margin-bottom: 0;
}

/* Карточки блога */
.blog-posts {
    padding: 50px 0;
}

.blog-posts h2 {
    margin-bottom: 30px;
    text-align: center;
}

.post-card {
    display: flex;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-image {
    flex: 0 0 40%;
    overflow: hidden;
}

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

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

.post-content {
    flex: 0 0 60%;
    padding: 25px;
    background-color: white;
}

.post-content h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.post-meta {
    color: var(--light-text-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-excerpt {
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
    padding-right: 20px;
}

.read-more:after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right 0.3s ease;
}

.read-more:hover:after {
    right: -5px;
}

/* Страница поста блога */
.blog-post {
    padding: 50px 0;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 30px;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 10px;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags h4 {
    margin-bottom: 10px;
}

.post-tags ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-tags ul li {
    margin-right: 10px;
    margin-bottom: 10px;
}

.post-tags ul li a {
    display: block;
    padding: 5px 15px;
    background-color: var(--light-background);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.post-tags ul li a:hover {
    background-color: var(--primary-color);
    color: white;
}

.post-share {
    margin-top: 30px;
}

.post-share h4 {
    margin-bottom: 10px;
}

.social-share {
    display: flex;
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background-color: var(--light-background);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-share a:hover {
    background-color: var(--primary-color);
}

.social-share a svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    transition: stroke 0.3s ease;
}

.social-share a:hover svg {
    stroke: white;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.post-prev,
.post-next {
    flex: 0 0 48%;
}

.post-next {
    text-align: right;
}

.post-navigation span {
    display: block;
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-bottom: 5px;
}

.post-navigation h4 {
    font-size: 1.1rem;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.post-navigation a:hover h4 {
    color: var(--primary-color);
}

/* Страница о нас */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0;
    text-align: center;
    margin-bottom: 50px;
}

.page-header h2 {
    color: white;
    margin-bottom: 10px;
}

.about-intro {
    margin-bottom: 50px;
}

.about-content {
    display: flex;
    align-items: center;
}

.about-image {
    flex: 0 0 40%;
    margin-right: 40px;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.about-text {
    flex: 0 0 60%;
}

.team {
    background-color: var(--light-background);
    padding: 50px 0;
    margin-bottom: 50px;
}

.team h2 {
    text-align: center;
    margin-bottom: 30px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center;
}

.team-member img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-member h3 {
    margin: 20px 0 5px;
}

.team-member p {
    padding: 0 20px;
}

.team-member p:first-of-type {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.team-member .social-icons {
    display: flex;
    justify-content: center;
    margin: 15px 0 20px;
}

.team-member .social-icons a {
    margin: 0 5px;
}

.our-values {
    padding: 50px 0;
}

.our-values h2 {
    text-align: center;
    margin-bottom: 30px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.value-item {
    padding: 30px;
    border-radius: 8px;
    background-color: var(--light-background);
    text-align: center;
}

.value-icon {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.value-item h3 {
    margin-bottom: 15px;
}

.value-item p {
    margin-bottom: 0;
}

/* Страница контактов */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.contact-details {
    padding: 30px;
    background-color: var(--light-background);
    border-radius: 8px;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    flex: 0 0 40px;
    color: var(--primary-color);
}

.contact-item h4 {
    margin-bottom: 5px;
}

.contact-item p {
    margin-bottom: 5px;
}

.social-media {
    margin-top: 30px;
}

.contact-form {
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.map-placeholder {
    width: 100%;
    height: 400px;
    background-color: var(--light-background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Модальное окно благодарности */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.modal h3 {
    margin-bottom: 15px;
}

.modal p {
    margin-bottom: 20px;
}

/* Футер */
footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

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

.footer-logo img {
    max-height: 60px;
    margin-bottom: 15px;
}

.footer-links h3,
.footer-contact h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3:after,
.footer-contact h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover,
.footer-contact a:hover {
    color: white;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

.social-icons a svg {
    stroke: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Cookie уведомление */
.cookie-notice {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -4px 10px var(--shadow-color);
    z-index: 1050;
    padding: 20px;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cookie-content p {
    margin-bottom: 20px;
    text-align: center;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cookie-policy-link {
    font-size: 0.9rem;
    color: var(--light-text-color);
}

/* Иконки */
.icon-location,
.icon-phone,
.icon-email {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.icon-location:before {
    content: '📍';
}

.icon-phone:before {
    content: '📞';
}

.icon-email:before {
    content: '✉️';
}

/* Адаптивный дизайн */
@media (max-width: 992px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .post-card {
        flex-direction: column;
    }
    
    .post-image,
    .post-content {
        flex: 0 0 100%;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }
    
    .about-text {
        flex: 0 0 100%;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        height: auto;
        padding: 15px 0;
    }
    
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .post-prev,
    .post-next {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    
    .post-next {
        text-align: left;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons button {
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links h3:after,
    .footer-contact h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}
