/* style.css */

:root {
    /* Bright Retro Color Palette */
    --primary-color: #FF4081; /* Hot Pink */
    --primary-color-darker: #D81B60;
    --primary-color-rgb: 255, 64, 129;

    --secondary-color: #40C4FF; /* Electric Blue */
    --secondary-color-darker: #0091EA;
    --secondary-color-rgb: 64, 196, 255;

    --accent-color-1: #76FF03; /* Neon Green */
    --accent-color-1-darker: #64DD17;
    --accent-color-1-rgb: 118, 255, 3;

    --accent-color-2: #FFD740; /* Sunny Yellow */
    --accent-color-2-darker: #FFC400;

    --text-color-dark: #222222;
    --text-color-light: #FFFFFF;
    --text-color-medium: #4a4a4a; /* Bulma's default text color for consistency */
    --text-color-subtle: #7a7a7a;
    --text-color-footer: #cccccc;

    --background-light: #f9f9f9;
    --background-dark-section: #1e1e1e;
    --background-card: #FFFFFF;
    --background-footer: #282c34;


    /* Dynamic Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
    --gradient-button-hover: linear-gradient(135deg, var(--primary-color-darker), var(--secondary-color-darker));
    --gradient-retro-bg: linear-gradient(45deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.1), rgba(var(--accent-color-1-rgb), 0.1));

    /* Typography */
    --font-family-headings: 'Playfair Display', serif;
    --font-family-body: 'Source Sans Pro', sans-serif;

    /* UI Elements */
    --border-radius-small: 5px;
    --border-radius-medium: 10px;
    --border-radius-large: 20px;
    --box-shadow-light: 0 3px 8px rgba(0, 0, 0, 0.08);
    --box-shadow-medium: 0 6px 15px rgba(0, 0, 0, 0.12);
    --box-shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-speed-fast: 0.2s ease-in-out;
    --transition-speed-normal: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Non-linear feel */
    --transition-speed-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Header Height for Page Content Offset */
    --header-height: 70px; /* Adjust based on actual header height */
}

/* Global Styles */
html {
    scroll-behavior: smooth;
    background-color: var(--background-light); /* Fallback background */
}

body {
    font-family: var(--font-family-body);
    color: var(--text-color-medium);
    line-height: 1.7;
    font-size: 16px; /* Base font size */
    overflow-x: hidden; /* Prevent horizontal scroll */
    background: var(--gradient-retro-bg); /* Subtle overall retro gradient */
    background-attachment: fixed;
}

/* Headings */
h1, h2, h3, h4, h5, h6, .title, .subtitle {
    font-family: var(--font-family-headings);
    color: var(--text-color-dark);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); /* Subtle shadow for headings */
}

.title {
    font-weight: 700;
}
.subtitle {
    font-family: var(--font-family-body); /* Subtitles often better with body font */
    color: var(--text-color-subtle);
    font-weight: 400;
}

.section-title {
    margin-bottom: 1.5rem !important; /* More space after main section title */
    color: var(--text-color-dark);
    font-size: 2.8em; /* Larger section titles */
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.section-title::after { /* Underline retro effect */
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color-medium);
}

a {
    color: var(--secondary-color);
    transition: color var(--transition-speed-fast);
    text-decoration: none;
}
a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Global Button Styles (Overrides Bulma where needed) */
.button, button, input[type='submit'], input[type='button'], input[type='reset'] {
    font-family: var(--font-family-body);
    font-weight: 600;
    padding: 0.9em 2em; /* Slightly larger padding */
    border-radius: var(--border-radius-medium);
    transition: all var(--transition-speed-normal);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none; /* Remove Bulma's default border if we use background/shadow */
    box-shadow: var(--box-shadow-medium);
    line-height: 1.5; /* Ensure text is vertically centered */
}

.button.is-primary,
button.is-primary,
input[type='submit'].is-primary {
    background: var(--gradient-primary);
    color: var(--text-color-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.25);
}
.button.is-primary:hover,
button.is-primary:hover,
input[type='submit'].is-primary:hover {
    background: var(--gradient-button-hover);
    box-shadow: var(--box-shadow-heavy);
    transform: translateY(-3px) scale(1.03); /* More dynamic hover */
    color: var(--text-color-light) ;
}
.button.is-primary:active,
button.is-primary:active,
input[type='submit'].is-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: var(--box-shadow-light);
}

.button.is-secondary {
    background: var(--gradient-accent);
    color: var(--text-color-dark);
}
.button.is-secondary:hover {
    background: linear-gradient(135deg, var(--accent-color-1-darker), var(--accent-color-2-darker));
    box-shadow: var(--box-shadow-heavy);
    transform: translateY(-3px) scale(1.03);
}

.button.is-outlined { /* Generic outlined */
    background-color: transparent;
    text-shadow: none;
    border-width: 2px;
    border-style: solid;
}
.button.is-outlined.is-primary {
    border-color: var(--primary-color);
    color: #fff;
}
.button.is-outlined.is-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-3px) scale(1.03);
}

/* Section Base */
.section {
    padding: 4rem 1.5rem; /* Standard section padding */
}

/* Header / Navbar */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color var(--transition-speed-normal), box-shadow var(--transition-speed-normal);
}
.navbar-item .logo-text {
    font-family: var(--font-family-headings);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}
.navbar-item, .navbar-link {
    font-family: var(--font-family-body);
    font-weight: 600;
    color: var(--text-color-medium);
    padding: 0.5rem 1rem;
    transition: color var(--transition-speed-fast);
}
.navbar-item:hover, .navbar-link:hover, .navbar-item.is-active {
    background-color: transparent !important; /* Override Bulma blue */
    color: var(--primary-color) !important;
}
.navbar-burger {
    color: var(--primary-color);
    height: var(--header-height);
    width: var(--header-height);
}
.navbar-burger span {
    background-color: var(--primary-color);
    height: 3px;
    width: 20px;
    left: calc(50% - 10px);
}
.navbar-menu.is-active { /* Mobile menu */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

/* Hero Section */
.hero { /* Background set in HTML */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero-title {
    font-size: 3.5em;
    margin-bottom: 0.5em;
    color: var(--text-color-light) !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.hero-subtitle {
    font-size: 1.8em;
    margin-bottom: 1.5em;
    color: var(--text-color-light) !important;
    font-family: var(--font-family-body);
    font-weight: 400;
    opacity: 0.9;
}
.hero .is-size-5 {
    color: var(--text-color-light) !important;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero .button.is-large {
    padding: 1em 2.5em;
    font-size: 1.2em;
}

/* Card Styles (Services, Case Studies, Events) */
.card {
    background-color: var(--background-card);
    border-radius: var(--border-radius-large);
    box-shadow: var(--box-shadow-medium);
    overflow: hidden; /* Important for border-radius on child elements */
    transition: transform var(--transition-speed-normal), box-shadow var(--transition-speed-normal);
    height: 100%; /* For equal height columns in Bulma */
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-8px) scale(1.02); /* More pronounced retro hover */
    box-shadow: var(--box-shadow-heavy);
}

/* СТРОГО: Все карточки с изображениями должны иметь свойства display: flex, flex-direction: column, align-items: center для центрирования изображений. */
/* This is already set for .card. The image centering is handled by .image-container */

.card .image-container {
    height: 220px; /* Fixed height for image area */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #e0e0e0; /* Placeholder bg for images */
}
.card .image-container figure.image {
    width: 100%;
    height: 100%;
    margin: 0;
}
.card .image-container figure.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-speed-slow); /* Zoom effect on image hover */
}
.card:hover .image-container figure.image img {
    transform: scale(1.1);
}

.card .card-content {
    padding: 2rem; /* More padding in cards */
    flex-grow: 1; /* Allows content to fill space if card heights are equalized */
    display: flex;
    flex-direction: column;
}
.card .card-content .title.card-title, .card .card-content .title { /* Bulma might use .title directly */
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center; /* Center card titles */
    line-height: 1.3;
}
.card .card-content .content {
    font-size: 0.95em;
    color: var(--text-color-medium);
    text-align: left; /* Keep main text aligned left for readability */
}
.card .card-content .content p {
    margin-bottom: 0.75rem;
}
.card .button.is-small { /* For "Детальніше" if used */
    margin-top: auto; /* Push button to bottom of card content */
    align-self: center;
}

/* Methodology Section - Timeline */
.methodology-section { background-color: rgba(255,255,255,0.7); border-radius: var(--border-radius-large); margin: 2rem auto; padding: 3rem 1.5rem;}
.timeline .timeline-header .tag {
    background: var(--gradient-primary);
    color: var(--text-color-light);
    font-weight: bold;
    font-size: 1em;
    padding: 0.5em 1em;
    border-radius: var(--border-radius-small);
}
.timeline .timeline-item .timeline-marker {
    width: 20px;
    height: 20px;
}
.timeline .timeline-item .timeline-marker.is-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
}
.timeline .timeline-item.is-primary .timeline-marker:not(.is-icon) { background-color: var(--primary-color); border-color: var(--primary-color); }
.timeline .timeline-item.is-warning .timeline-marker:not(.is-icon) { background-color: var(--accent-color-2); border-color: var(--accent-color-2); }
.timeline .timeline-item.is-danger .timeline-marker:not(.is-icon) { background-color: #FF6B6B; border-color: #FF6B6B; }
.timeline .timeline-item.is-success .timeline-marker:not(.is-icon) { background-color: var(--accent-color-1); border-color: var(--accent-color-1); }

.timeline .timeline-content {
    padding: 1.5em 2em;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--box-shadow-light);
}
.timeline .timeline-content .heading {
    font-family: var(--font-family-headings);
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5em;
    font-size: 1.1em;
}
.timeline .timeline-content p:not(.heading) {
    color: var(--text-color-medium);
    font-size: 0.95em;
}

/* Features Section */
.features-section { background-color: rgba(var(--secondary-color-rgb), 0.08); border-radius: var(--border-radius-large); margin-top: 2rem; }
.feature-box {
    background: var(--background-card);
    padding: 2rem;
    border-radius: var(--border-radius-medium);
    box-shadow: var(--box-shadow-medium);
    transition: all var(--transition-speed-normal);
    border-left: 5px solid var(--accent-color-1);
}
.feature-box:hover {
    transform: scale(1.03);
    box-shadow: var(--box-shadow-heavy);
}
.feature-box strong {
    color: var(--secondary-color);
    font-size: 1.1em;
}
.stat-widget .stat-number {
    font-size: 3.5em;
    font-weight: 700;
    color: var(--primary-color); /* Use primary or accent */
    line-height: 1;
}
.stat-widget .stat-label {
    font-size: 1.1em;
    color: var(--text-color-subtle);
    font-family: var(--font-family-body);
}

/* External Resources Section */
.external-resources-section { background-color: var(--background-light); border-radius: var(--border-radius-large); margin-top:2rem; padding-bottom: 3rem;}
.external-links-list { list-style: none; padding: 0; margin: 0; }
.external-links-list li { margin-bottom: 1.5rem; }
.external-link-item {
    display: block;
    padding: 1.5rem 2rem;
    background-color: var(--background-card);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-left: 5px solid var(--primary-color);
    border-radius: var(--border-radius-medium);
    color: var(--text-color-dark);
    text-decoration: none;
    transition: all var(--transition-speed-normal);
    box-shadow: var(--box-shadow-light);
}
.external-link-item:hover {
    transform: translateX(5px) scale(1.01);
    box-shadow: var(--box-shadow-medium);
    border-left-color: var(--accent-color-1);
    background-color: #fff;
}
.external-link-item strong {
    display: block;
    font-family: var(--font-family-headings);
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}
.external-link-item p {
    font-size: 0.9em;
    color: var(--text-color-subtle);
    line-height: 1.6;
}

/* Community Section */
.community-section { /* Background set in HTML */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 1.5rem;
    border-radius: var(--border-radius-large);
    margin-top:2rem;
}
.community-section .section-title,
.community-section .subtitle,
.community-section .content p {
    color: var(--text-color-light) !important;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}
.community-section .subtitle { opacity: 0.85; }
.community-section .content {
    background-color: rgba(0,0,0,0.3);
    padding: 2rem;
    border-radius: var(--border-radius-medium);
}

/* Contact Section */
.contact-section { background-color: rgba(255,255,255,0.8); border-radius: var(--border-radius-large); margin-top:2rem;}
#contact-form .label {
    color: var(--text-color-dark);
    font-weight: 600;
    font-size: 1.05em;
}
#contact-form .input, #contact-form .textarea {
    border-radius: var(--border-radius-small);
    border: 1px solid #dbdbdb; /* Bulma's default border */
    box-shadow: inset 0 1px 2px rgba(10,10,10,.1);
    padding: 0.8em 1em;
    transition: border-color var(--transition-speed-fast), box-shadow var(--transition-speed-fast);
}
#contact-form .input:focus, #contact-form .textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-color-rgb), 0.25); /* Bulma focus style with theme color */
}
#contact-form .checkbox + a, #contact-form .checkbox + span { /* Adjust for structure: label > input + text */
    color: var(--text-color-medium);
}
#contact-form .checkbox input[type="checkbox"] {
    margin-right: 0.5em;
}
#contact-form .field.is-grouped.is-centered .control {
    margin-top: 1.5rem;
}
.contact-details { margin-top: 2.5rem; }
.contact-details p {
    font-size: 1.1em;
    color: var(--text-color-medium);
    margin-bottom: 0.5rem;
}
.contact-details a {
    color: var(--primary-color);
    font-weight: 600;
}
.contact-details a:hover {
    color: var(--secondary-color);
}


/* Footer */
.footer {
    background-color: var(--background-footer);
    color: var(--text-color-footer);
    padding: 4rem 1.5rem 2rem; /* More top padding */
    margin-top: 3rem;
}
.footer .title.footer-title {
    color: var(--accent-color-2); /* Bright yellow for footer titles */
    font-size: 1.3em;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer p, .footer li {
    font-size: 0.95em;
    color: var(--text-color-footer);
    margin-bottom: 0.6rem;
}
.footer a {
    color: var(--text-color-footer);
    text-decoration: none;
    transition: color var(--transition-speed-fast), padding-left var(--transition-speed-fast);
}
.footer a:hover {
    color: var(--accent-color-1); /* Neon green hover for footer links */
    padding-left: 5px; /* Subtle movement */
}
.footer .column ul { /* For nav links and social links */
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}
/* Textual social media links in footer */
.footer .column:last-child ul li a { /* Target social links specifically if in last column */
    display: inline-block;
    padding: 0.3em 0;
}
.footer .column:last-child ul li a:hover {
    color: var(--accent-color-1);
}

/* Specific Page Styles */
/* success.html */
.success-page-container { /* Assume this class wraps content on success.html */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--gradient-accent);
}
.success-page-container h1 {
    color: var(--text-color-dark); /* Or light if gradient is very dark */
    font-size: 3em;
    margin-bottom: 1rem;
}
.success-page-container p {
    color: var(--text-color-dark);
    font-size: 1.2em;
    margin-bottom: 2rem;
}

/* privacy.html & terms.html */
.privacy-page-container, .terms-page-container, .about-page-container, .contacts-page-container { /* Wrappers for content on these pages */
    padding-top: calc(var(--header-height) + 30px); /* Offset for fixed header + some margin */
    padding-bottom: 3rem;
    background-color: #fff; /* Standard page background */
    min-height: calc(100vh - var(--header-height)); /* Ensure content can fill screen under header */
}
.privacy-page-container .content, .terms-page-container .content { /* Bulma .content class */
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--background-card);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--box-shadow-light);
}
.privacy-page-container .content h1, .terms-page-container .content h1,
.about-page-container .content h1, .contacts-page-container .content h1 {
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px); /* Slightly more pronounced starting offset */
    transition: opacity var(--transition-speed-slow), transform var(--transition-speed-slow);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Non-linear movement example (subtle parallax for background) - requires JS to update variable */
.parallax-bg-section {
    background-attachment: fixed; /* Simple parallax, can be jittery */
    /* For JS-driven: style="background-position-y: var(--bg-y-offset);" */
}


/* Helper for images inside columns needing centering if not full width */
.column .centered-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%; /* Ensure it's responsive */
}


/* Responsive Adjustments (Bulma handles most, these are fine-tunes) */
@media screen and (max-width: 768px) {
    .section-title {
        font-size: 2.2em;
    }
    .hero-title {
        font-size: 2.5em;
    }
    .hero-subtitle {
        font-size: 1.4em;
    }
    .card .card-content {
        padding: 1.5rem;
    }
    .card .image-container {
        height: 180px; /* Adjust card image height for mobile */
    }
    .footer { text-align: center; }
    .footer .columns { display: block; } /* Stack footer columns */
    .footer .column { margin-bottom: 2rem; }
}

/* Cookie Popup - already styled inline in HTML, but if moved to CSS: */
#cookie-popup {
    /* Styles from HTML:
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: rgba(0,0,0,0.85); color: white;
    padding: 15px 20px; text-align: center; z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    */
}
#cookie-popup p {
    /* margin: 0 0 10px 0; font-size: 14px; color: white; */
}
#cookie-popup p a {
    /* color: #48C774; text-decoration: underline; */
}
#accept-cookie {
    /*
    background-color: #48C774; color: white; border: none;
    padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 14px;
    */
    /* Add themed variables if desired */
    background-color: var(--accent-color-1);
}
#accept-cookie:hover {
    background-color: var(--accent-color-1-darker);
}

/* Ensure high contrast for text on dynamic backgrounds */
.has-text-on-gradient { /* Apply this class to text on gradient backgrounds */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* Read More link style example */
a.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    padding-bottom: 2px;
    position: relative;
    transition: color var(--transition-speed-fast), letter-spacing var(--transition-speed-fast);
}
a.read-more-link::after {
    content: '→';
    margin-left: 0.5em;
    display: inline-block;
    transition: transform var(--transition-speed-fast);
}
a.read-more-link:hover {
    color: var(--primary-color);
    letter-spacing: 0.5px; /* Dynamic feel */
}
a.read-more-link:hover::after {
    transform: translateX(4px);
}

/* Final check for card content centering (titles were done) */
.card.has-centered-content .card-content {
    text-align: center;
}
.card.has-centered-content .card-content .content p {
    text-align: center; /* If all paragraphs in such cards should be centered */
}
/* Use .has-centered-content on specific cards if needed */