/*
 * style.css
 * Theme: 'комп'ютерна техніка 2025'
 * Design System: Retro with Adaptive Typography
 * Color Scheme: Gradient
 * Animation Style: Drawn animations
 */

/* ==========================================================================
   1. CSS Variables & Base Setup
   ========================================================================== */

:root {
    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Colors */
    --color-text-dark: #222222;
    --color-text-light: #f7fafc;
    --color-text-muted: #718096;
    --color-bg-dark: #1a202c;
    --color-bg-light: #f9fafb;
    --color-bg-white: #ffffff;
    --color-purple: #805AD5;
    --color-indigo: #5a67d8;
    --color-teal: #319795;
    --color-pink: #d53f8c;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-purple) 0%, var(--color-indigo) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-teal) 0%, #4fd1c5 100%);
    
    /* Transitions & Shadows */
    --transition-smooth: all 0.3s ease-in-out;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   2. Base & Typography Styles
   ========================================================================== */

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Adaptive Typography */
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw + 1rem, 3.2rem); }
h3 { font-size: clamp(1.4rem, 3vw + 0.8rem, 1.8rem); }
p, a, li, span, label, input, textarea { font-size: clamp(1rem, 1.5vw + 0.5rem, 1.125rem); }

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

a:hover {
    color: var(--color-purple);
}

/* ==========================================================================
   3. Layout & Reusable Components
   ========================================================================== */

/* Card base styles (used in multiple sections) */
.card {
    display: flex;
    flex-direction: column;
    text-align: center; /* Center content within the card */
    background-color: var(--color-bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card .card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
    position: relative;
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Specific centering for team cards with round images */
.card.text-center .image-container {
    margin-left: auto;
    margin-right: auto;
    height: auto;
}

/* ==========================================================================
   4. Global Button & Form Styles
   ========================================================================== */

button,
.btn,
input[type='submit'] {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-text-light);
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
    letter-spacing: 1px;
}

button:hover,
.btn:hover,
input[type='submit']:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.15);
}

/* Form Styles */
form input,
form textarea {
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

form input:focus,
form textarea:focus {
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.4);
    border-color: var(--color-purple);
    background-color: var(--color-bg-white);
}


/* ==========================================================================
   5. Section-Specific Styles
   ========================================================================== */

/* --- Header --- */
.header-nav a {
    position: relative;
    padding-bottom: 5px;
}

.header-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    background-attachment: fixed; /* Parallax-like effect */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#hero h1,
#hero p {
    color: var(--color-text-light) !important; /* Enforce white text */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* Stronger shadow for readability */
}

/* --- Statistics Section --- */
#statistics .stat-number {
    font-weight: 700;
    transition: all 0.3s ease;
}

#statistics > div > div:hover .stat-number {
    transform: scale(1.1);
}

/* --- Process Section (Timeline) --- */
/* Tailwind classes in HTML handle the structure. This is for fine-tuning. */
.right-timeline .order-1.bg-white { transform: translateX(20px); }
.left-timeline .order-1.bg-white { transform: translateX(-20px); }

/* --- Webinars (Accordion) --- */
.accordion-header svg {
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-header svg {
    transform: rotate(180deg);
}

.accordion-content {
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.3s ease-out;
}


/* --- Footer --- */
footer a {
    position: relative;
    text-decoration: none;
}

footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-accent);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Social Links in Footer --- */
footer .flex a {
    font-family: var(--font-body);
    font-weight: 700;
}
footer .flex a:hover {
    color: white;
}

/* ==========================================================================
   6. Page-Specific Styles (success, privacy, terms)
   ========================================================================== */

/* --- Success Page --- */
.success-page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gradient-primary);
    padding: 2rem;
}
.success-page-container .success-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 3rem 4rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}
.success-page-container .success-box h1 {
    color: var(--color-purple);
}
.success-page-container .success-box p {
    color: var(--color-text-dark);
}

/* --- Legal Pages (Privacy & Terms) & About page --- */
.legal-page-container, .page-container {
    padding-top: 120px; /* Space for sticky header */
    padding-bottom: 4rem;
}

.legal-page-container .content-wrapper, .page-container .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-bg-white);
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.legal-page-container h1, .page-container h1 {
    margin-bottom: 2rem;
    color: var(--color-text-dark);
    text-align: center;
}

.legal-page-container h2, .page-container h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-indigo);
    border-left: 4px solid var(--color-indigo);
    padding-left: 1rem;
}

.legal-page-container p, .legal-page-container li,
.page-container p, .page-container li {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.legal-page-container ul, .page-container ul {
    list-style-type: disc;
    padding-left: 2rem;
}

/* ==========================================================================
   7. Animations
   ========================================================================== */

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* "Drawn" effect on hover for certain elements */
@keyframes sketch-border {
    0% { transform: scale(1); }
    50% { transform: scale(1.02) rotate(0.5deg); }
    100% { transform: scale(1); }
}

#team .card:hover .card-image.image-container {
    animation: sketch-border 0.4s ease-in-out;
}

/* ==========================================================================
   8. Responsive Overrides
   ========================================================================== */
@media (max-width: 768px) {
    /* Timeline adjustments for mobile */
    .right-timeline .order-1.bg-white,
    .left-timeline .order-1.bg-white {
        transform: translateX(0);
    }
    #process .relative .border {
        display: none; /* Hide central line on mobile */
    }
    #process > div > div > div {
        width: 100%; /* Make timeline items full width */
    }
     #process > div > div > .z-20 {
        display: none; /* Hide dots on mobile */
    }

    .legal-page-container, .page-container {
        padding-top: 100px;
    }

    .legal-page-container .content-wrapper, .page-container .content-wrapper {
        padding: 1.5rem;
    }
}