﻿/* ==================== ROOT (add your colors if missing) ==================== */
:root {
    --primary: #0d6efd;
    --navy: #012970;
    --white: #ffffff;
    --text: #444444;
}

/* ==================== TEXT WRAPPING & TYPOGRAPHY ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Force long words to break */
h1, h2, h3, h4, h5, h6,
p, span, li, a,
.card-title, .card-text,
.btn {
    word-wrap: break-word; /* Legacy */
    overflow-wrap: break-word; /* Modern standard */
    hyphens: auto; /* Optional: hyphenate long words */
}

/* Truncate long single-line text with ellipsis */
.text-ellipsis,
.card-title,
.btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Multi-line truncation (e.g., card description) */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background-color: var(--primary);
    border: 2px solid var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--navy);
        border-color: var(--navy);
        transform: translateY(-2px);
        outline: none;
    }

/* ==================== CARDS ==================== */
.card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
/*    height: 100%;*/
    display: flex;
    flex-direction: column;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

.card-img-top {
    width: 100%;
    height: 300px;
    object-fit: contain; /* Use 'cover' if you want full bleed */
    background: #f8f9fa;
    transition: transform 0.4s ease;
}

    .card-img-top:hover {
        transform: scale(1.03);
    }

/* Card body text */
.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
/*    flex-grow: 1;*/
}

/* ==================== IMAGE ANIMATION ==================== */
.animate-img {
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block;
    overflow: hidden;
}

    .animate-img:hover {
        transform: scale(1.03);
        opacity: 0.97;
    }

/* ==================== FADE-IN ANIMATION ==================== */
.animate-card,
.animate-header {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

    .animate-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .animate-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .animate-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .animate-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .animate-card:nth-child(5) {
        animation-delay: 0.5s;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE TEXT CLAMPING ==================== */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }
}
