/* ============================================
   Stadin Juhannus - Styles
   Modern, elegant design with CSS tricks
   ============================================ */

/* ============================================
   Custom Properties & Reset
   ============================================ */
:root {
    --primary-color: #2c5f8d;
    --secondary-color: #f4a261;
    --accent-color: #e76f51;
    --dark-color: #264653;
    --light-color: #f8f9fa;
    --text-dark: #2a2a2a;
    --text-light: #6c757d;
    --gradient-primary: linear-gradient(135deg, #2c5f8d 0%, #457b9d 100%);
    --gradient-secondary: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(44, 95, 141, 0.85) 0%, rgba(38, 70, 83, 0.9) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar.scrolled .nav-link {
    color: var(--text-dark) !important;
}

.navbar.scrolled .navbar-brand {
    filter: brightness(0.5);
}

.navbar-brand .logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}

.navbar.scrolled .navbar-brand .logo {
    height: 45px;
    filter: none;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ============================================
   Hero Section with Background Image
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

/* Усиленный оверлей для лучшей читаемости текста поверх изображения */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(44, 95, 141, 0.65) 0%, 
        rgba(38, 70, 83, 0.75) 50%,
        rgba(28, 46, 60, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    color: white;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--gradient-secondary);
    border: none;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(244, 162, 97, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-hero:hover::before {
    left: 100%;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(244, 162, 97, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    position: relative;
    animation: scroll-bounce 2s infinite;
}

.mouse::before {
    content: '';
    width: 6px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

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

@keyframes scroll-wheel {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s backwards;
}

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

/* ============================================
   Section Styles
   ============================================ */
section {
    position: relative;
}

.section-about {
    background: linear-gradient(180deg, var(--light-color) 0%, white 100%);
}

.section-traditions {
    background: white;
}

.section-location {
    background: linear-gradient(180deg, white 0%, var(--light-color) 100%);
}

.section-experience {
    background: white;
}

.section-values {
    background: var(--gradient-primary);
    color: white;
}

.section-cta {
    background: var(--light-color);
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 40px;
}

.section-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--dark-color);
    margin-bottom: 1rem;
}

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

/* ============================================
   About Section
   ============================================ */
.content-text {
    font-size: 1.05rem;
}

.content-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1rem;
}

.image-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.image-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: var(--transition);
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.rounded-custom {
    border-radius: var(--border-radius);
}

/* ============================================
   Traditions Section
   ============================================ */
.tradition-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tradition-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.tradition-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: var(--transition);
}

.tradition-card:hover .tradition-icon {
    transform: scale(1.2) rotate(5deg);
}

.tradition-card h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.tradition-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.traditions-detailed {
    margin-top: 4rem;
}

.tradition-subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-box,
.highlight-box {
    background: linear-gradient(135deg, var(--light-color) 0%, white 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
}

.info-box h4,
.highlight-box h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.custom-list {
    list-style: none;
    padding: 0;
}

.custom-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
}

.custom-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.custom-list li strong {
    color: var(--primary-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 70px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary-color);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-year {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 60px;
    position: relative;
}

.timeline-year::after {
    content: '';
    position: absolute;
    right: -17px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.timeline-content {
    flex: 1;
    padding: 0.5rem 0;
    color: var(--text-dark);
}

/* ============================================
   Location Section
   ============================================ */
.location-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.location-content .lead {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 1rem;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-text h5 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.info-text p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.location-features {
    margin-top: 4rem;
}

.feature-box {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: var(--transition);
}

.feature-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.feature-box h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.feature-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-box li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 1.5rem;
}

.feature-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ============================================
   Experience Section
   ============================================ */
.experience-card {
    background: linear-gradient(135deg, white 0%, var(--light-color) 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.experience-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-image {
    background: var(--gradient-primary);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-icon {
    font-size: 3rem;
    position: relative;
    z-index: 1;
    filter: grayscale(1) brightness(10);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Testimonial */
.testimonial-section {
    padding: 3rem 0;
}

.testimonial {
    background: var(--gradient-primary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 120px;
    font-family: Georgia, serif;
    opacity: 0.1;
    line-height: 1;
}

.quote {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.quote-author {
    font-size: 1rem;
    font-weight: 600;
    font-style: normal;
    opacity: 0.9;
}

/* ============================================
   Values Section
   ============================================ */
.section-values .values-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-values .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.value-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.value-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.value-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.value-text h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.value-text p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-box {
    background: white;
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box .lead {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.btn-social:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.social-icon {
    font-size: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
}

.footer-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer h5 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom p {
    margin: 0.25rem 0;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(44, 95, 141, 0.98);
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 1rem;
        backdrop-filter: blur(10px);
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        background-position: center top;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tradition-card,
    .experience-card,
    .feature-box {
        margin-bottom: 1rem;
    }

    .timeline::before {
        left: 50px;
    }

    .timeline-year {
        min-width: 45px;
        font-size: 0.95rem;
    }

    .cta-box {
        padding: 2rem 1rem;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gradient {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

/* ============================================
   Animations & Effects
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Selection Color */
::selection {
    background: var(--secondary-color);
    color: white;
}

::-moz-selection {
    background: var(--secondary-color);
    color: white;
}