/* Custom styles for vihreapoliitikko.my */

/* Global Styles */
:root {
    --color-green-700: #15803d;
    --color-green-800: #166534;
    --color-white: #ffffff;
    --color-gray-900: #111827;
    --color-gray-700: #374151;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--color-gray-900);
}

/* Accessibility: Focus states */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--color-green-700);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    body {
        --color-gray-900: #000000;
    }
    button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-green-700);
    color: var(--color-white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* Links underline on hover */
a:not([class]) {
    color: var(--color-green-700);
}

a:not([class]):hover,
a:not([class]):focus {
    text-decoration: underline;
}

/* Hero title animation */
h1 {
    animation: fadeInDown 0.6s ease-out;
}

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

/* Smooth button transitions */
button,
a[class*="btn"],
a[class*="px-8 py-3"] {
    transition: all 0.3s ease;
}

/* Loading skeleton animation */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Blog card hover effect */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Form labels - bold for clarity */
label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Input fields - better visibility */
input[type="text"],
input[type="email"],
textarea {
    border: 1.5px solid #d1d5db;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--color-green-700);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Print styles */
@media print {
    header,
    #ota-yhteytta,
    footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    .no-print {
        display: none;
    }
}

/* Mobile optimization */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    button,
    a[class*="px-8 py-3"] {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Dark mode support (for future use) */
@media (prefers-color-scheme: dark) {
    /* Can be extended for dark mode in the future */
}

/* Emoji support */
.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Page load fade-in */
body {
    animation: fadeIn 0.5s ease-in;
}

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