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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Color Variables */
:root {
    --primary-bg: #AEC0CC;
    --secondary-bg: #1A1A1A;
    --accent-color: #F7C7A3;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --header-gradient-start: #eaf0f4;
    --header-gradient-end: #fef6f1;
    --accent-strong: #f2a26a;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 2rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-white);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #e6a88a;
    border-color: #e6a88a;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border-color: var(--text-dark);
}

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

.btn-white {
    background-color: var(--text-white);
    color: var(--text-dark);
    border-color: var(--text-white);
}

.btn-white:hover {
    background-color: var(--primary-bg);
    color: var(--text-white);
    border-color: var(--primary-bg);
}

/* Header */
.header {
    background-color: var(--secondary-bg);
    box-shadow: none; /* убираем светлую линию/тень под меню */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header::after { display: none; }

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0; /* чуть больше воздуха на десктопе */
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-white);
}

.logo-icon { display: none; }

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 3rem; /* больше интервалов между пунктами */
}

.nav-link {
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

.nav-link.is-active {
    background-color: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
}

.header-actions {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.header-actions .btn {
    border-radius: 9999px;
}

.header .btn-outline {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 2px solid #ffffff;
    font-weight: 600;
    padding: 10px 18px;
}

.header .btn-outline:hover {
    background: #ffffff;
    color: var(--secondary-bg);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    background-color: var(--secondary-bg);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-list {
    list-style: none;
    padding: 1rem 0;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link {
    display: block;
    padding: 1rem 20px;
    text-decoration: none;
    color: var(--text-white);
    font-weight: 500;
}

.mobile-nav-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: var(--text-white);
}

/* Hero Section */
.hero {
    background: url('../images/contact-office.jpg') center center / cover no-repeat fixed; /* единое изображение на всех страницах */
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 640px; /* одинаковая высота как на главной */
}

@media (min-width: 1024px) {
    .hero { padding-top: 160px; }
}

@media (max-width: 1024px) {
    .hero { min-height: 520px; }
}

@media (max-width: 600px) {
    .hero { min-height: 420px; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') no-repeat;
    background-size: contain;
    opacity: 0.3;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35); /* лёгкое затемнение для читаемости текста */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-white);
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Contact layout refinement */
.contact-section .cards-grid {
    grid-template-columns: 1fr 1.5fr; /* левая колонка уже, форма шире */
}

@media (max-width: 900px) {
    .contact-section .cards-grid {
        grid-template-columns: 1fr; /* на планшете/мобиле — в столбик */
    }
}

.contact-section .card {
    border-radius: 16px;
}

.contact-section .card:first-child .card-content {
    padding-bottom: 1.25rem;
}

.contact-aside .opening-hours {
    list-style: none;
    padding: 0;
    margin: .5rem 0 0;
}

.contact-aside .opening-hours li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.contact-aside .opening-hours li:last-child { border-bottom: none; }

/* Цвета текста в блоке контактов: делаем сопроводительный текст серым,
   а сами контактные данные (ссылки/ярлыки) оставляем как есть */
.contact-aside .card-description,
.contact-aside .contact-text {
    color: var(--text-light) !important;
}

.card {
    background-color: var(--text-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
    width: 100%;
    height: 200px;
    background-color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 500;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-bg);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 90,90 10,90" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat;
    background-size: contain;
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: var(--secondary-bg);
    color: var(--text-white);
    padding: 60px 0 20px;
    position: relative;
}

.footer::before {
    content: 'Budgeno';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.footer-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-item {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    font-weight: 500;
    color: var(--text-white);
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

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

.footer-nav {
    list-style: none;
}

.footer-nav-item {
    margin-bottom: 0.5rem;
}

.footer-nav-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.footer-copyright,
.footer-address,
.footer-experience {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Course pages */
.course-header .course-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.course-header .course-image {
    flex: 0 1 520px;
    max-width: 520px;
}

.course-header .course-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.course-articles .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.course-articles .article-card {
    background-color: var(--text-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.course-articles .article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.course-articles .article-card .article-content {
    padding: 1rem 1.25rem 1.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--text-white);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

/* Responsive Design */
@media (max-width: 1100px) {
    .nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .mobile-menu { display: none; }
    .header-actions { display: none; }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .header-actions {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-heading {
        font-size: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer::before {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer::before {
        font-size: 3rem;
    }
}

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

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

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}