/* ============================================
   AstroGuide — Основные стили
   ============================================ */

/* — Сброс и базовые настройки — */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #e8e8f0;
    background-color: #0b0c1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: #d4a853;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e6c06a;
}

ul {
    list-style: none;
}

/* — Контейнер — */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* — Кнопки — */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #d4a853;
    color: #0b0c1a;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #d4a853;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #e6c06a;
    border-color: #e6c06a;
    color: #0b0c1a;
}

.btn--outline {
    background-color: transparent;
    color: #d4a853;
}

.btn--outline:hover {
    background-color: #d4a853;
    color: #0b0c1a;
}

/* — Шапка (Header) — */
.header {
    background-color: #1a1b2f;
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* — Логотип — */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4a853;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.85;
    color: #d4a853;
}

.logo__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.logo--footer {
    font-size: 1.25rem;
}

/* — Навигация — */
.nav__list {
    display: flex;
    gap: 8px;
}

.nav__link {
    display: block;
    padding: 8px 16px;
    color: #8a8b9a;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav__link:hover {
    color: #e8e8f0;
    background-color: rgba(212, 168, 83, 0.1);
}

.nav__link--active {
    color: #d4a853;
    background-color: rgba(212, 168, 83, 0.15);
}

/* — Гамбургер (скрыт на десктопе) — */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__toggle-line {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #e8e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация гамбургера — превращение в крестик */
.nav--open .nav__toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav--open .nav__toggle-line:nth-child(2) {
    opacity: 0;
}

.nav--open .nav__toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* — Hero (главная страница) — */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #0b0c1a 0%, #1a1b2f 50%, #0b0c1a 100%);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.hero__container {
    max-width: 700px;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: #8a8b9a;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero__btn {
    font-size: 1.1rem;
    padding: 14px 36px;
}

/* — Секции — */
.section {
    padding: 60px 0;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    color: #e8e8f0;
    text-align: center;
    margin-bottom: 12px;
}

.section__subtitle {
    font-size: 1.05rem;
    color: #8a8b9a;
    text-align: center;
    margin-bottom: 40px;
}

.section__footer {
    text-align: center;
    margin-top: 40px;
}

/* — Сетка знаков (Signs Grid) — */
.signs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* — Карточка знака — */
.sign-card {
    background-color: #1a1b2f;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 168, 83, 0.1);
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.sign-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(212, 168, 83, 0.4);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.15);
}

.sign-card__symbol {
    font-size: 2.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.sign-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 8px;
}

.sign-card__dates {
    font-size: 0.9rem;
    color: #8a8b9a;
    margin-bottom: 8px;
}

.sign-card__element {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(212, 168, 83, 0.15);
    color: #d4a853;
    font-size: 0.8rem;
    border-radius: 20px;
}

/* — Модальное окно — */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal--open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal__content {
    position: relative;
    background-color: #1a1b2f;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(212, 168, 83, 0.2);
    animation: fadeIn 0.3s ease;
    z-index: 1;
}

.modal__content--small {
    max-width: 420px;
    text-align: center;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #8a8b9a;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal__close:hover {
    color: #e8e8f0;
}

.modal__icon {
    font-size: 3rem;
    color: #d4a853;
    margin-bottom: 16px;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 12px;
}

.modal__text {
    color: #8a8b9a;
    line-height: 1.7;
}

/* — Детали знака в модалке — */
.sign-detail__header {
    text-align: center;
    margin-bottom: 24px;
}

.sign-detail__symbol {
    font-size: 3rem;
    margin-bottom: 8px;
}

.sign-detail__name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 4px;
}

.sign-detail__dates {
    color: #8a8b9a;
    margin-bottom: 8px;
}

.sign-detail__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.sign-detail__info-item {
    background-color: rgba(11, 12, 26, 0.5);
    padding: 12px;
    border-radius: 8px;
}

.sign-detail__info-label {
    font-size: 0.8rem;
    color: #8a8b9a;
    display: block;
    margin-bottom: 4px;
}

.sign-detail__info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #e8e8f0;
}

.sign-detail__section {
    margin-bottom: 20px;
}

.sign-detail__section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d4a853;
    margin-bottom: 8px;
}

.sign-detail__text {
    color: #8a8b9a;
    line-height: 1.7;
}

.sign-detail__list {
    list-style: disc;
    padding-left: 20px;
    color: #8a8b9a;
}

.sign-detail__list li {
    margin-bottom: 4px;
}

.sign-detail__compatibility {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sign-detail__compat-item {
    background-color: rgba(212, 168, 83, 0.15);
    color: #d4a853;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* — Ежедневный гороскоп (главная страница) — */
.daily-horoscope {
    background: linear-gradient(135deg, #0b0c1a 0%, #1a1b2f 50%, #0b0c1a 100%);
    border-top: 1px solid rgba(212, 168, 83, 0.1);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.daily-horoscope__content {
    background-color: #1a1b2f;
    border-radius: 10px;
    padding: 32px;
    border: 1px solid rgba(212, 168, 83, 0.1);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.daily-horoscope__placeholder {
    color: #8a8b9a;
    font-size: 1.05rem;
}

.daily-horoscope__text {
    color: #e8e8f0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.daily-horoscope__sign-name {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #d4a853;
    margin-bottom: 16px;
}

/* — Гороскоп (horoscope page) — */
.horoscope__controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 40px;
}

.horoscope__control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.horoscope__label {
    font-size: 0.9rem;
    color: #8a8b9a;
    font-weight: 500;
}

.horoscope__select {
    padding: 10px 16px;
    background-color: #1a1b2f;
    color: #e8e8f0;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.3s ease;
}

.horoscope__select:focus {
    outline: none;
    border-color: #d4a853;
}

.horoscope__result {
    background-color: #1a1b2f;
    border-radius: 10px;
    padding: 32px;
    border: 1px solid rgba(212, 168, 83, 0.1);
    text-align: center;
}

.horoscope__placeholder {
    color: #8a8b9a;
    font-size: 1.05rem;
}

.horoscope__text {
    color: #e8e8f0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.horoscope__sign-name {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #d4a853;
    margin-bottom: 16px;
}

/* — Форма «Вопрос астрологу» — */
.ask__form {
    max-width: 600px;
    margin: 0 auto;
}

.ask__field {
    margin-bottom: 20px;
}

.ask__label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e8e8f0;
    margin-bottom: 8px;
}

.ask__required {
    color: #d4a853;
}

.ask__input,
.ask__textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: #1a1b2f;
    color: #e8e8f0;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.ask__input:focus,
.ask__textarea:focus {
    outline: none;
    border-color: #d4a853;
}

.ask__input::placeholder,
.ask__textarea::placeholder {
    color: #555;
}

.ask__input--error,
.ask__textarea--error {
    border-color: #e74c3c;
}

.ask__error {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
    min-height: 1.2em;
}

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

.ask__actions {
    text-align: center;
    margin-top: 8px;
}

.ask__submit {
    font-size: 1.05rem;
    padding: 14px 40px;
}

/* — Страница «О проекте» — */
.about__block {
    max-width: 800px;
    margin: 0 auto 40px;
}

.about__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4a853;
    margin-bottom: 16px;
}

.about__text {
    color: #8a8b9a;
    line-height: 1.8;
    margin-bottom: 12px;
}

.about__resources {
    display: grid;
    gap: 12px;
}

.about__resource-item {
    background-color: #1a1b2f;
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 83, 0.1);
    transition: all 0.3s ease;
}

.about__resource-item:hover {
    border-color: rgba(212, 168, 83, 0.3);
    transform: translateX(4px);
}

.about__resource-link {
    display: block;
    padding: 16px 20px;
    color: #e8e8f0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.about__resource-link:hover {
    color: #d4a853;
}

/* — Подвал (Footer) — */
.footer {
    background-color: #1a1b2f;
    border-top: 1px solid rgba(212, 168, 83, 0.15);
    margin-top: auto;
    padding-top: 40px;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}

.footer__heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 16px;
}

.footer__description {
    color: #8a8b9a;
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer__list li {
    margin-bottom: 8px;
}

.footer__link {
    color: #8a8b9a;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer__link:hover {
    color: #d4a853;
}

.footer__social-list {
    display: flex;
    gap: 12px;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(212, 168, 83, 0.1);
    color: #d4a853;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.footer__social-link:hover {
    background-color: #d4a853;
    color: #0b0c1a;
}

.footer__bottom {
    border-top: 1px solid rgba(212, 168, 83, 0.1);
    padding: 16px 0;
    text-align: center;
}

.footer__copyright {
    color: #555;
    font-size: 0.85rem;
}

/* — Анимации — */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
