/* ============================================================
   Homepage Redesign — uvelir.info
   Bootstrap 5.3 compatible, no jQuery dependencies
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --uv-gold: #c8a84e;
    --uv-gold-light: #e8d48b;
    --uv-gold-dark: #9a7b2f;
    --uv-dark: #1a1a2e;
    --uv-dark-soft: #2d2d44;
    --uv-text: #2c2c2c;
    --uv-text-muted: #6c6c7a;
    --uv-bg-warm: #faf8f5;
    --uv-border: #e8e4dc;
    --uv-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --uv-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --uv-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --uv-radius: 6px;
    --uv-transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Section Titles --- */
.uv-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--uv-border);
    position: relative;
}

.uv-section-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--uv-gold), var(--uv-gold-light));
}

.uv-section-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--uv-dark);
    margin: 0;
    white-space: nowrap;
}

.uv-section-links {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.uv-section-links a {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--uv-text-muted);
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--uv-border);
    border-radius: 3px;
    transition: all var(--uv-transition);
}

.uv-section-links a:hover {
    color: var(--uv-gold-dark);
    border-color: var(--uv-gold);
    background: rgba(200, 168, 78, 0.06);
}

/* --- Hero Section --- */

/* Featured (large) card */
.uv-hero-featured {
    position: relative;
    border-radius: var(--uv-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.uv-hero-featured a {
    display: block;
    text-decoration: none;
    color: #fff;
}

.uv-hero-featured img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.uv-hero-featured:hover img {
    transform: scale(1.03);
}

.uv-hero-featured .uv-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(10, 10, 20, 0.85) 0%,
        rgba(10, 10, 20, 0.4) 40%,
        transparent 70%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.uv-hero-featured .uv-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.85;
}

.uv-hero-featured .uv-hero-meta time {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    backdrop-filter: blur(4px);
}

.uv-hero-featured .uv-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Small hero cards (2x2 grid) */
.uv-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.uv-hero-card {
    position: relative;
    border-radius: var(--uv-radius);
    overflow: hidden;
}

.uv-hero-card a {
    display: block;
    text-decoration: none;
    color: #fff;
}

.uv-hero-card img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.uv-hero-card .uv-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(10, 10, 20, 0.82) 0%,
        rgba(10, 10, 20, 0.25) 50%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.85rem;
}

.uv-hero-card .uv-card-meta {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.uv-hero-card .uv-card-meta time {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

.uv-hero-card .uv-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- News Feed --- */
.uv-feed-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--uv-border);
    transition: background var(--uv-transition);
}

.uv-feed-item:first-child {
    padding-top: 0;
}

.uv-feed-item:last-child {
    border-bottom: none;
}

.uv-feed-item:hover {
    background: var(--uv-bg-warm);
    margin-inline: -0.5rem;
    padding-inline: 0.5rem;
    border-radius: var(--uv-radius);
}

.uv-feed-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 110px;
    border-radius: var(--uv-radius);
    overflow: hidden;
}

.uv-feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--uv-transition);
}

.uv-feed-item:hover .uv-feed-thumb img {
    transform: scale(1.05);
}

.uv-feed-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.uv-feed-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--uv-text-muted);
    margin-bottom: 0.35rem;
}

.uv-feed-meta .uv-category {
    color: var(--uv-gold-dark);
    font-weight: 600;
}

.uv-feed-meta .uv-views {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.uv-feed-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.uv-feed-title a {
    color: var(--uv-text);
    text-decoration: none;
    transition: color var(--uv-transition);
}

.uv-feed-title a:hover {
    color: var(--uv-gold-dark);
}

.uv-feed-excerpt {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--uv-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* --- Events Sidebar --- */
.uv-event-card {
    border: 1px solid var(--uv-border);
    border-left: 3px solid var(--uv-gold);
    border-radius: var(--uv-radius);
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    transition: all var(--uv-transition);
    background: #fff;
}

.uv-event-card:hover {
    border-left-color: var(--uv-gold-dark);
    box-shadow: var(--uv-shadow-sm);
    transform: translateX(2px);
}

.uv-event-card .uv-event-banner {
    text-align: center;
    margin-bottom: 0.6rem;
    padding: 0.5rem;
    background: var(--uv-bg-warm);
    border-radius: 4px;
}

.uv-event-card .uv-event-banner img {
    max-height: 80px;
    width: auto;
}

.uv-event-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.uv-event-card h3 a {
    color: var(--uv-text);
    text-decoration: none;
    transition: color var(--uv-transition);
}

.uv-event-card h3 a:hover {
    color: var(--uv-gold-dark);
}

.uv-event-detail {
    font-size: 0.8rem;
    color: var(--uv-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.uv-event-detail i {
    color: var(--uv-gold);
    width: 1rem;
    text-align: center;
}

/* --- Company Teasers: styles are inline in the inclusion_tag template --- */

/* --- Scroll Animations (progressive enhancement) --- */
/* Content is always visible by default.
   JS adds .uv-anim-ready to <body>, then elements animate in. */
.uv-animate {
    opacity: 1;
    transform: none;
}

body.uv-anim-ready .uv-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body.uv-anim-ready .uv-animate.uv-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(1) { transition-delay: 0.05s; }
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(2) { transition-delay: 0.1s; }
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(3) { transition-delay: 0.15s; }
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(4) { transition-delay: 0.2s; }
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(5) { transition-delay: 0.25s; }
body.uv-anim-ready .uv-stagger > .uv-animate:nth-child(6) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 767.98px) {
    .uv-hero-featured img {
        height: 240px;
    }

    .uv-hero-featured .uv-hero-title {
        font-size: 1.15rem;
    }

    .uv-hero-grid {
        grid-template-columns: 1fr;
    }

    .uv-hero-card img {
        height: 200px;
    }

    .uv-feed-item {
        flex-direction: column;
        gap: 0.6rem;
    }

    .uv-feed-thumb {
        width: 100%;
        height: 180px;
    }

}

@media (min-width: 768px) and (max-width: 991.98px) {
    .uv-hero-featured img {
        height: 300px;
    }

    .uv-hero-card img {
        height: 150px;
    }

    .uv-hero-card .uv-card-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
}
