/**
 * Components Styles
 * Hero section, cards, buttons, forms, and reusable components
 */

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    background-color: #ffffff;
}

.hero-section img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(75%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    padding: 2rem;
    margin-bottom: 10%;
    margin-left: 5%;
    max-width: 600px;
}

.hero-content h1,
.hero-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Hero Title with Background Image - Default White Text with Shadow */
.hero-section[style*="background-image"] .hero-title,
.hero-section .hero-background + * .hero-title {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Dynamic Contrast Optimization for Hero Titles */
.hero-section.bright-background .hero-title {
    color: #1a1a1a !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8) !important;
}

.hero-section.dark-background .hero-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.hero-section.contrast-fallback .hero-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8) !important;
}

.hero-content .accent-text {
    color: #b71c1c;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background-color: #b71c1c;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #111;
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: #111;
    border: 2px solid #111;
}

.btn-outline:hover {
    background-color: #111;
    color: #ffffff;
}

/* Button enhancements */
.uk-button-primary {
    background-color: #b71c1c;
    border-color: #b71c1c;
    transition: all 0.3s ease;
}

.uk-button-primary:hover {
    background-color: #111;
    border-color: #111;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
}

.uk-button-secondary {
    background-color: transparent;
    color: #b71c1c;
    border: 2px solid #b71c1c;
}

.uk-button-secondary:hover {
    background-color: #b71c1c;
    color: #ffffff;
}

/* Event Cards */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.event-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.event-card h3 {
    margin-bottom: 1rem;
}

.event-card .event-date {
    color: #b71c1c;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.event-card .learn-more {
    color: #b71c1c;
    text-decoration: none;
    font-weight: 500;
}

.event-card .learn-more:hover {
    text-decoration: underline;
}

/* News Card Styles - UIKit Card with Media Top */
.news-section .uk-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(183, 28, 28, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-section .uk-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.news-section .uk-card-media-top {
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

.news-section .uk-card-media-top a {
    display: block;
    width: 100%;
}

.news-section .uk-card-media-top img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    margin: 0;
    padding: 0;
}

.news-section .uk-card:hover .uk-card-media-top img {
    transform: scale(1.05);
}

.news-section .uk-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-section .uk-card-title {
    font-family: 'Playfair Display', 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #111;
}

.news-section .uk-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-section .uk-card-title a:hover {
    color: #b71c1c;
}

.news-section .news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666666;
}

.news-section .news-date {
    color: #b71c1c;
    font-weight: 500;
}

.news-section .news-category {
    background-color: rgba(183, 28, 28, 0.1);
    color: #b71c1c;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-section .uk-card-text {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.news-section .news-read-more {
    color: #b71c1c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    margin-top: auto;
}

.news-section .news-read-more:hover {
    color: #111;
    text-decoration: none;
}

.news-section .news-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.news-section .news-read-more:hover::after {
    transform: translateX(2px);
}

/* News Slider Styles */
.news-slider-container {
    position: relative;
}

.news-section .slider-navigation {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.news-section .uk-slidenav {
    background: #b71c1c;
    color: #ffffff !important;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.news-section .uk-slidenav:hover {
    background: #111;
    color: #ffffff !important;
    transform: scale(1.1);
    text-decoration: none;
}

.news-section .uk-slidenav:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.3);
}

.news-section .uk-slidenav svg {
    width: 18px;
    height: 18px;
}

.news-section .slider-info {
    font-size: 0.875rem;
    color: #666666;
}

/* Dot Navigation Styles */
.news-section .uk-slider-nav {
    margin-top: 1.5rem;
    justify-content: center;
    display: flex;
    list-style: none;
    padding: 0;
    align-items: center;
}

.news-section .uk-slider-nav > li {
    margin: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-section .uk-slider-nav > li > a {
    background: rgba(183, 28, 28, 0.3);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.news-section .uk-slider-nav > li.uk-active > a {
    background: #b71c1c;
    transform: scale(1.3);
}

.news-section .uk-slider-nav > li > a:hover {
    background: #b71c1c;
    transform: scale(1.2);
}

/* Ensure slider items maintain card heights */
.news-section .uk-slider-items {
    align-items: stretch;
}

.news-section .uk-slider-items .uk-card {
    height: 100%;
}

/* Hide navigation when not needed */
.news-section [uk-slider] .uk-slidenav[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.news-section [uk-slider] .uk-slidenav[disabled]:hover {
    background: #b71c1c;
    transform: none;
}

/* Abstract Image Styles */
.abstract-image {
    background: var(--background-color);
    border: 1px solid rgba(183, 28, 28, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.abstract-image:hover {
    transform: scale(1.02);
    filter: brightness(1.05) contrast(1.05);
}

.uk-card-media-top .abstract-image {
    width: 100%;
    height: 200px;
    display: block;
}

/* Ensure abstract images scale properly */
.uk-card-media-top .abstract-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Add subtle animation for abstract images */
@keyframes abstractFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.abstract-image {
    animation: abstractFadeIn 0.5s ease-out;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #b71c1c;
    box-shadow: 0 0 0 2px rgba(212, 0, 0, 0.1);
}

/* Form field enhancements */
.uk-input:focus,
.uk-textarea:focus,
.uk-select:focus {
    border-color: #b71c1c;
    box-shadow: 0 0 0 2px rgba(183, 28, 28, 0.1);
}