/*
* File: style.css
* Description: Stylesheet for 'Торгівля іноземною валютою для початківців' website.
* Design System: Retro + Neo-brutalism
* Color Scheme: Tetradic
* Animation Style: Particle Animation
*/

/* ---------------------------------- */
/*          CSS Variables             */
/* ---------------------------------- */
:root {
    /* Color Palette (Tetradic) */
    --color-primary: #FF5733; /* Vibrant Orange/Red */
    --color-secondary: #33AFFF; /* Bright Blue */
    --color-accent-1: #33FF57; /* Lime Green */
    --color-accent-2: #AF33FF; /* Bright Purple */

    /* Backgrounds & Text */
    --color-bg-light: #F5F5F5;
    --color-bg-dark: #1A1A1A;
    --color-text-light: #F5F5F5;
    --color-text-dark: #222222;
    --color-text-muted: #666666;

    /* Neo-Brutalism Elements */
    --border-strong: 2px solid var(--color-text-dark);
    --shadow-strong: 4px 4px 0px var(--color-text-dark);
    --shadow-strong-light: 4px 4px 0px var(--color-primary);
    --border-radius-sharp: 5px;
    --border-radius-soft: 8px;

    /* Fonts */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Rubik', sans-serif;

    /* Spacing & Sizing */
    --header-height: 80px;
    --spacing-unit: 1rem;
}

/* ---------------------------------- */
/*          Global & Reset            */
/* ---------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 1.5);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

section {
    padding: calc(var(--spacing-unit) * 4) 0;
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* Utility Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------- */
/*         Global Components          */
/* ---------------------------------- */

/* --- Buttons --- */
.btn, button, input[type='submit'] {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    border: var(--border-strong);
    padding: 12px 28px;
    border-radius: var(--border-radius-sharp);
    box-shadow: var(--shadow-strong);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover, button:hover, input[type='submit']:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--color-text-dark);
    text-decoration: none;
}

.btn:active, button:active, input[type='submit']:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}
.btn-primary:hover {
    background-color: #e64a19;
    color: var(--color-text-light);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}
.btn-secondary:hover {
    background-color: #1e90ff;
    color: var(--color-text-light);
}

/* --- Cards --- */
.card {
    background-color: #fff;
    border: var(--border-strong);
    border-radius: var(--border-radius-sharp);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-unit);
    height: 100%;
}

.card .card-image {
    width: 100%;
    margin-bottom: var(--spacing-unit);
}

.card .image-container {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
    border-radius: var(--border-radius-sharp);
    border: var(--border-strong);
    margin-bottom: var(--spacing-unit);
}

.card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.card .card-content {
    padding: var(--spacing-unit);
}

.card .card-content h3 {
    margin-bottom: 0.5rem;
}

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

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: var(--border-strong);
    border-radius: var(--border-radius-sharp);
    background-color: var(--color-bg-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-secondary);
}

/* ---------------------------------- */
/*          Layout: Header            */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: var(--border-strong);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text-dark);
}
.logo .accent {
    color: var(--color-primary);
}
.logo:hover {
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-dark);
    padding: 0.5rem;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    box-shadow: none;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--color-text-dark);
    border-radius: 3px;
    left: 0;
    transition: all 0.25s ease-in-out;
}

.burger-menu span:nth-child(1) { top: 0px; }
.burger-menu span:nth-child(2) { top: 9px; }
.burger-menu span:nth-child(3) { top: 18px; }

/* ---------------------------------- */
/*          Layout: Footer            */
/* ---------------------------------- */
.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: calc(var(--spacing-unit) * 3) 0;
}

.site-footer h4 {
    color: var(--color-text-light);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.site-footer a {
    color: var(--color-text-light);
    opacity: 0.8;
}
.site-footer a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column ul {
    list-style: none;
}
.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--color-text-muted);
    padding-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ---------------------------------- */
/*          Section Styles            */
/* ---------------------------------- */

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    text-align: center;
    padding-top: var(--header-height);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-title {
    color: #FFFFFF; /* STRICT REQUIREMENT */
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    color: #FFFFFF; /* STRICT REQUIREMENT */
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

/* --- Process Section --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.process-card .card-content { text-align: left; }

/* --- Innovation Section --- */
.innovation-section {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}
.innovation-section .section-title { color: var(--color-text-light); }

.innovation-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.innovation-text {
    flex: 1;
}

.innovation-image {
    flex: 1;
    max-width: 50%;
}
.innovation-image img {
    border: var(--border-strong);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-strong-light);
    border-radius: var(--border-radius-soft);
}

/* --- Statistics Section --- */
.statistics-section {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}
.statistics-section .section-title { color: var(--color-text-light); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    display: block;
}
.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* --- Success Stories (Slider) --- */
.stories-section { background-color: var(--color-bg-light); }
.slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.stories-slider {
    display: flex;
    overflow: hidden;
}
.slide {
    flex: 0 0 100%;
    transition: transform 0.5s ease-in-out;
}
.story-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    padding: 2rem;
}
.story-card .card-image {
    flex-shrink: 0;
}
.story-card .card-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}
.story-quote {
    font-style: italic;
    margin-bottom: 1rem;
}
cite {
    font-weight: 700;
    font-family: var(--font-heading);
}
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.slider-controls button {
    background: none;
    border: var(--border-strong);
    box-shadow: none;
    width: 40px;
    height: 40px;
    line-height: 36px;
    padding: 0;
    border-radius: 50%;
}
.slider-controls button:hover {
    background-color: var(--color-primary);
    color: white;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* --- Events Section --- */
.events-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.event-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border: var(--border-strong);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-strong);
}
.event-date {
    flex-shrink: 0;
    text-align: center;
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--border-radius-soft);
    padding: 1rem;
    width: 80px;
}
.event-date .month {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}
.event-date .day {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}
.event-details { flex-grow: 1; }
.event-details h3 { margin-bottom: 0.25rem; }

/* --- Sustainability Section --- */
.sustainability-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.sustainability-text { flex: 1; }
.sustainability-image { flex: 1; max-width: 45%;}
.sustainability-image img {
    border: var(--border-strong);
    border-radius: var(--border-radius-soft);
}

/* --- Resources Section --- */
.resources-section { background-color: var(--color-bg-dark); color: var(--color-text-light); }
.resources-section .section-title { color: var(--color-text-light); }
.resources-list .resource-item {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: var(--border-radius-soft);
    margin-bottom: 1rem;
    border: 2px solid #444;
}
.resources-list h4 a { color: var(--color-secondary); }
.resources-list p { opacity: 0.8; }

/* --- Contact Section --- */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border: var(--border-strong);
    box-shadow: var(--shadow-strong);
    border-radius: var(--border-radius-soft);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 2rem;
    border: var(--border-strong);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-strong);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slide-down 0.4s ease-out;
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover, .close-btn:focus {
    color: var(--color-text-dark);
}

@keyframes slide-down {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------------------------------- */
/*         Other Page Styles          */
/* ---------------------------------- */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}
.success-page-container h1 {
    color: var(--color-accent-1);
}
.success-page-container .btn {
    margin-top: 2rem;
}

.legal-page-content {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 40px;
}

.legal-page-content h1,
.legal-page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* ---------------------------------- */
/*          Responsive Design         */
/* ---------------------------------- */

@media (max-width: 1024px) {
    .innovation-content, .sustainability-content {
        flex-direction: column;
        text-align: center;
    }
    .innovation-image, .sustainability-image {
        max-width: 80%;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    /* --- Header & Nav --- */
    .main-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .main-nav.active {
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }
    .main-nav a {
        color: var(--color-text-light);
        font-size: 1.5rem;
    }

    .burger-menu {
        display: block;
    }

    .burger-menu.active span:nth-child(1) {
        top: 9px;
        transform: rotate(45deg);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        top: 9px;
        transform: rotate(-45deg);
    }

    /* --- Other Sections --- */
    .story-card {
        flex-direction: column;
        text-align: center;
    }

    .event-item {
        flex-direction: column;
        text-align: center;
    }

    .event-details {
        margin-bottom: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

}