/* ============================================
   KHCB HERO SECTION
   Version: 10.0 - Упрощённая с <img>
   ============================================ */

/* ============================================
   ОСНОВА
   ============================================ */

.khcb-hero-section {
    position: relative;
    width: 100%;
    background-color: #132C54;
    margin: 0;
    padding: 0;
    display: block;
    overflow: hidden;
}

@media (max-width: 768px) {
    .khcb-hero-section {
        /* mobile styles if needed */
    }
}

/* ============================================
   INNER КОНТЕЙНЕР
   ============================================ */

.khcb-hero-section .hero-section-inner {
    position: relative;
    width: 100%;
}

/* Contained layout */
.khcb-hero-section .hero-section-inner.content-container {
    max-width: var(--global-content-width, 1290px);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   ФОНОВАЯ КАРТИНКА - <img>
   Ключ к адаптивности!
   ============================================ */

.khcb-hero-section .hero-bg-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Плейсхолдер для превью */
.khcb-hero-section .hero-bg-placeholder {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a5c 0%, #132C54 100%);
    color: rgba(255,255,255,0.5);
    font-size: 18px;
}

/* ============================================
   OVERLAY
   ============================================ */

.khcb-hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--khcb-hero-overlay-color, rgba(19, 44, 84, 0.7));
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   КОНТЕНТ - поверх картинки
   ============================================ */

.khcb-hero-section .hero-content-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: var(--khcb-hero-padding, 80px) 20px;
    max-width: var(--global-content-width, 1290px);
    margin: 0 auto;
    left: 0;
    right: 0;
}

/* Вертикальное выравнивание */
.khcb-hero-section.hero-valign-top .hero-content-wrap {
    justify-content: flex-start;
}

.khcb-hero-section.hero-valign-center .hero-content-wrap {
    justify-content: center;
}

.khcb-hero-section.hero-valign-bottom .hero-content-wrap {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .khcb-hero-section .hero-content-wrap {
        padding: var(--khcb-hero-padding-mobile, 40px) 20px;
    }
}

@media (max-width: 480px) {
    .khcb-hero-section .hero-content-wrap {
        padding: var(--khcb-hero-padding-mobile, 40px) 15px;
    }
}

.khcb-hero-section .hero-content {
    position: relative;
    animation: khcbFadeInUp 1s ease-out;
}

/* Горизонтальное выравнивание */
.khcb-hero-section .hero-content.align-left {
    text-align: left;
}

.khcb-hero-section .hero-content.align-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.khcb-hero-section .hero-content.align-right {
    text-align: right;
    margin-left: auto;
    max-width: 900px;
}

/* ============================================
   ТЕКСТ
   ============================================ */

.khcb-hero-section .hero-title {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--khcb-hero-title-color, var(--global-palette9, #FFFFFF));
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: khcbFadeInUp 1s ease-out 0.2s both;
    font-size: var(--khcb-hero-title-size, 3rem);
}

.khcb-hero-section .hero-subtitle {
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 30px 0;
    color: var(--khcb-hero-subtitle-color, var(--global-palette2, #E5D8A0));
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    animation: khcbFadeInUp 1s ease-out 0.4s both;
    font-size: var(--khcb-hero-subtitle-size, 1.25rem);
}

@media (max-width: 768px) {
    .khcb-hero-section .hero-title {
        font-size: var(--khcb-hero-title-size-mobile, 2rem);
        letter-spacing: 1px;
    }
    
    .khcb-hero-section .hero-subtitle {
        font-size: var(--khcb-hero-subtitle-size-mobile, 1rem);
        margin-bottom: 25px;
    }
}

/* ============================================
   КНОПКИ
   ============================================ */

.khcb-hero-section .hero-button-wrap {
    animation: khcbFadeInUp 1s ease-out 0.6s both;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.khcb-hero-section .hero-content.align-left .hero-button-wrap {
    justify-content: flex-start;
}

.khcb-hero-section .hero-content.align-center .hero-button-wrap {
    justify-content: center;
}

.khcb-hero-section .hero-content.align-right .hero-button-wrap {
    justify-content: flex-end;
}

.khcb-hero-section .hero-button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Стиль: filled */
.khcb-hero-section .hero-button.hero-button-style-filled {
    background-color: var(--khcb-hero-button-bg, var(--global-palette1, #A7925E));
    color: var(--khcb-hero-button-color, var(--global-palette3, #151824));
    border: 2px solid var(--khcb-hero-button-bg, var(--global-palette1, #A7925E));
    box-shadow: 0 4px 15px rgba(167, 146, 94, 0.3);
}

.khcb-hero-section .hero-button.hero-button-style-filled:hover {
    background-color: var(--khcb-hero-subtitle-color, var(--global-palette2, #E5D8A0));
    border-color: var(--khcb-hero-subtitle-color, var(--global-palette2, #E5D8A0));
    color: #132C54;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 216, 160, 0.4);
    text-decoration: none;
}

/* Стиль: outline */
.khcb-hero-section .hero-button.hero-button-style-outline {
    background-color: transparent;
    color: var(--khcb-hero-button-color, var(--global-palette9, #FFFFFF));
    border: 2px solid var(--khcb-hero-button-bg, var(--global-palette1, #A7925E));
    box-shadow: none;
}

.khcb-hero-section .hero-button.hero-button-style-outline:hover {
    background-color: var(--khcb-hero-button-bg, var(--global-palette1, #A7925E));
    color: var(--khcb-hero-button-color, var(--global-palette3, #151824));
    border-color: var(--khcb-hero-button-bg, #A7925E);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(167, 146, 94, 0.3);
    text-decoration: none;
}

/* Вторая кнопка - filled */
.khcb-hero-section .hero-button.hero-button-2.hero-button-style-filled {
    background-color: var(--khcb-hero-button2-bg, var(--global-palette2, #E5D8A0));
    color: var(--khcb-hero-button2-color, var(--global-palette3, #132C54));
    border-color: var(--khcb-hero-button2-bg, var(--global-palette2, #E5D8A0));
    box-shadow: 0 4px 15px rgba(229, 216, 160, 0.3);
}

.khcb-hero-section .hero-button.hero-button-2.hero-button-style-filled:hover {
    background-color: #A7925E;
    border-color: #A7925E;
    color: var(--khcb-hero-title-color, var(--global-palette9, #FFFFFF));
}

/* Вторая кнопка - outline */
.khcb-hero-section .hero-button.hero-button-2.hero-button-style-outline {
    background-color: transparent;
    color: var(--khcb-hero-button2-color, var(--global-palette2, #E5D8A0));
    border-color: var(--khcb-hero-button2-bg, var(--global-palette2, #E5D8A0));
}

.khcb-hero-section .hero-button.hero-button-2.hero-button-style-outline:hover {
    background-color: var(--khcb-hero-button2-bg, var(--global-palette2, #E5D8A0));
    color: var(--khcb-hero-button2-color, var(--global-palette3, #132C54));
}

@media (max-width: 768px) {
    .khcb-hero-section .hero-button {
        padding: 14px 30px;
        font-size: 14px;
    }
    
    .khcb-hero-section .hero-button-wrap {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .khcb-hero-section .hero-button {
        padding: 12px 25px;
        font-size: 13px;
    }
    
    .khcb-hero-section .hero-button-wrap {
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .khcb-hero-section .hero-button-wrap .hero-button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ГЕОМЕТРИЯ
   ============================================ */

.khcb-hero-section .hero-geometry {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 250px;
    border: 2px solid #A7925E;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.khcb-hero-section .hero-geometry-left {
    left: 50px;
    clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
    animation: khcbSlideInLeft 1s ease-out;
}

.khcb-hero-section .hero-geometry-right {
    right: 50px;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 20% 100%, 0 50%);
    animation: khcbSlideInRight 1s ease-out;
}

@media (max-width: 1200px) {
    .khcb-hero-section .hero-geometry {
        width: 200px;
        height: 180px;
    }
    
    .khcb-hero-section .hero-geometry-left {
        left: 20px;
    }
    
    .khcb-hero-section .hero-geometry-right {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .khcb-hero-section .hero-geometry {
        display: none;
    }
    
    .khcb-hero-section .hero-content {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .khcb-hero-section .hero-button-wrap {
        justify-content: center !important;
    }
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

@keyframes khcbFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes khcbSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) translateY(-50%);
    }
    to {
        opacity: 0.6;
        transform: translateX(0) translateY(-50%);
    }
}

@keyframes khcbSlideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) translateY(-50%);
    }
    to {
        opacity: 0.6;
        transform: translateX(0) translateY(-50%);
    }
}

/* ============================================
   KADENCE INTEGRATION
   ============================================ */

body.transparent-header .khcb-hero-section {
    margin-top: 0;
}

body.mobile-transparent-header .khcb-hero-section,
body.transparent-header .khcb-hero-section {
    padding-top: 0;
}
