/* styles.css - Стили для страницы "Красоты Адыгеи" */

/* Основные переменные и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1e3e2a;
    --color-secondary: #4f7a4b;
    --color-accent: #c5783b;
    --color-light: #faf3dd;
    --color-mountain: #7d8f70;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px rgba(0, 20, 5, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 20, 5, 0.4);
    --border-radius-main: 40px;
    --transition-speed: 0.3s;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Segoe UI', 'Roboto', Tahoma, Verdana, Arial, sans-serif;
}

/* Базовые стили */
html {
    background: linear-gradient(145deg, 
        #2b5a3a 0%, 
        #4f7a4b 30%, 
        #9bb87f 70%, 
        #e0e9d9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    padding: 20px;
}

body {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-main) var(--border-radius-main) 30px 30px;
    box-shadow: var(--shadow-lg), inset 0 1px 4px rgba(255, 255, 255, 0.8);
    padding: 40px 45px 50px 45px;
    border: 2px solid rgba(255, 245, 215, 0.7);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

/* Декоративная гора */
body::before {
    content: '';
    display: block;
    width: 120px;
    height: 120px;
    background: linear-gradient(170deg, 
        #e3dcc0 0%, 
        #b8a88b 50%, 
        var(--color-mountain) 100%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    position: relative;
    top: -85px;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -60px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    border: 2px solid #f8f0d5;
    border-bottom: none;
    transition: transform var(--transition-speed) ease;
}

body:hover::before {
    transform: translateX(-50%) scale(1.02);
}

/* Заголовок */
h1 {
    color: var(--color-primary);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #d6cca3, 6px 6px 0 rgba(60, 80, 50, 0.2);
    font-family: var(--font-serif);
    border-bottom: 3px dashed #a1b888;
    padding-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

/* Подзаголовок */
.subhead {
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: #335533;
    margin-bottom: 30px;
    font-style: italic;
    background: rgba(215, 245, 195, 0.5);
    border-radius: 60px;
    padding: 10px 20px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid #a1c08a;
    animation: fadeIn 1s ease-out 0.3s both;
}

/* Параграфы */
p {
    color: #1f3b2c;
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 5px 15px;
    background: rgba(250, 255, 240, 0.6);
    border-radius: 50px 15px 50px 15px;
    border-left: 8px solid var(--color-secondary);
    transition: transform var(--transition-speed), 
                background var(--transition-speed),
                border-color var(--transition-speed);
    animation: slideIn 0.8s ease-out;
}

p:hover {
    transform: scale(1.01);
    background: rgba(255, 255, 240, 0.9);
    border-left-color: var(--color-accent);
}

/* Карточки достопримечательностей */
.highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 35px 0 30px;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.card {
    flex: 1 1 200px;
    min-width: 160px;
    background: linear-gradient(145deg, #faf3dd, #f0e7ce);
    border-radius: 35px 15px 35px 15px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 8px 8px 0 #4f6d46, 12px 12px 15px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover {
    box-shadow: 4px 4px 0 #2d512d, 8px 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-6px);
}

.card:hover::after {
    opacity: 1;
}

.card:active {
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 #2d512d;
}

.card h3 {
    font-size: 1.9rem;
    margin-bottom: 5px;
}

.card p {
    background: none;
    border: none;
    padding: 0;
    margin: 8px 0 0;
    font-weight: bold;
    color: #3c5e34;
    font-size: 1.2rem;
    border-radius: 0;
    animation: none;
}

.card small {
    display: block;
    margin-top: 8px;
    color: #5c4e3c;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Блок со ссылками */
.info-links {
    text-align: center;
    background: #d9e0c5;
    padding: 25px;
    border-radius: 70px 20px 70px 20px;
    margin: 40px 0 20px;
    border: 2px solid white;
    animation: fadeIn 1s ease-out 0.7s both;
}

.info-links p {
    background: none;
    border: none;
    font-size: 1.3rem;
    border-radius: 0;
    padding: 5px;
    margin: 10px 0;
    animation: none;
}

.info-links p:hover {
    background: none;
    transform: none;
}

/* Ссылки */
a {
    color: #27632e;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #e0b354;
    transition: all 0.2s ease;
    padding: 3px 5px;
    position: relative;
    display: inline-block;
}

a::after {
    content: '→';
    opacity: 0;
    margin-left: -10px;
    transition: all 0.2s ease;
}

a:hover {
    color: #a55117;
    border-bottom-color: #a55117;
    background-color: #fffacd;
    border-radius: 12px;
    padding-right: 25px;
}

a:hover::after {
    opacity: 1;
    margin-left: 5px;
}

/* Благодарность */
.thank-you {
    font-size: clamp(1.3rem, 5vw, 1.9rem);
    text-align: center;
    color: #1d421d;
    background: linear-gradient(130deg, #f8efc0, #f0dea0);
    border-radius: 50px 10px 50px 10px;
    padding: 25px 15px;
    margin-top: 35px;
    border: 3px solid white;
    font-weight: bold;
    box-shadow: inset 0 -3px 0 #9ba87b;
    animation: pulse 2s infinite;
    cursor: pointer;
    transition: transform 0.2s;
}

.thank-you:hover {
    transform: scale(1.02);
    background: linear-gradient(130deg, #f5e6b0, #f8d88c);
}

.thank-you em {
    color: #a52a2a;
    font-style: normal;
    text-shadow: 0 2px 5px #f5e56b;
}

/* Разделитель */
hr {
    border: 3px solid #d2b48c;
    border-radius: 10px;
    margin: 30px 0 10px;
    background-color: #b59d74;
    height: 5px;
    border: none;
    animation: widthGrow 1s ease-out;
}

/* Футер */
footer {
    text-align: center;
    font-size: 1rem;
    color: #4c694c;
    margin-top: 20px;
    font-style: italic;
    animation: fadeIn 1s ease-out 1s both;
}

/* Эмодзи гор */
.mountain-emoji {
    font-size: 2.2rem;
    display: inline-block;
    filter: drop-shadow(2px 4px 4px #3f5835);
    margin: 0 5px;
    animation: bounce 3s infinite ease-in-out;
}

.mountain-emoji:nth-child(2) {
    animation-delay: 0.5s;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: inset 0 -3px 0 #9ba87b, 0 0 0 0 rgba(197, 120, 59, 0.4);
    }
    50% {
        box-shadow: inset 0 -3px 0 #9ba87b, 0 0 20px 5px rgba(197, 120, 59, 0.3);
    }
    100% {
        box-shadow: inset 0 -3px 0 #9ba87b, 0 0 0 0 rgba(197, 120, 59, 0.4);
    }
}

@keyframes widthGrow {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    body {
        padding: 20px 20px 30px 20px;
    }
    
    h1 {
        font-size: 2.2rem;
        text-shadow: 2px 2px 0 #d6cca3;
    }
    
    p {
        font-size: 1.1rem;
    }
    
    .card {
        flex: 1 1 140px;
        min-width: 130px;
    }
    
    .info-links {
        padding: 15px;
    }
    
    .info-links p {
        font-size: 1rem;
    }
    
    body::before {
        width: 80px;
        height: 80px;
        top: -60px;
    }
}

@media (max-width: 400px) {
    .highlights {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 100%;
        max-width: 250px;
    }
}

/* Класс для активных состояний при клике */
.card.active {
    background: linear-gradient(145deg, #f0e7ce, #e6d8b5);
    transform: scale(0.98);
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    body {
        background-color: rgba(30, 40, 30, 0.95);
        border-color: #5a6b4a;
    }
    
    h1 {
        color: #b8d9a8;
        text-shadow: 3px 3px 0 #2d3a2d;
    }
    
    p {
        color: #d4e0d0;
        background: rgba(40, 60, 40, 0.7);
    }
    
    .card {
        background: linear-gradient(145deg, #4a5a4a, #3a483a);
        border-color: #7f8f7f;
    }
    
    .card p {
        color: #c0d8b0;
    }
    
    .info-links {
        background: #4a5e4a;
    }
    
    .thank-you {
        background: linear-gradient(130deg, #5a6b4a, #4a5a3a);
        color: #e0e8d0;
    }
}
