﻿/* Caption styling */
.carousel-caption {
    bottom: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.25rem;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* Responsive consistent height for slideshow and logo section */
.top-row,
.carousel,
.carousel-inner,
.carousel-item,
.logo-card {
    height: clamp(280px, 22vw, 380px);
    max-height: clamp(280px, 22vw, 380px);
}

    /* Slideshow image */
    .carousel-item img {
        height: 100% !important;
        width: 100%;
        object-fit: cover;
        display: block;
    }

/* Prevent visual jitter from vertical overflow */
.carousel-inner,
.carousel-item {
    overflow: hidden;
}


.logo-card img {
    max-height: 220px;
}


.carousel-caption {
    bottom: 3rem; /* Pushes it higher from indicator dots */
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.25rem;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}



.card-title {
    font-size: 1.25rem;
}

.card-text {
    font-size: 0.95rem;
}

figcaption {
    font-size: 0.85rem;
    color: #666;
}


.institution-header {
    background: linear-gradient(to right, #21374C, #38506B); 
    color: white;
}

.info-row:hover {
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s;
}


.list-group-item {
    transition: background-color 0.2s ease;
}

    .list-group-item:hover {
        background-color: #f8f9fa;
    }


.hover-lift {
    transition: transform 0.2s ease-in-out;
    position: relative;
}

    .hover-lift:hover {
        transform: scale(1.015);
        z-index: 10;
    }

        .hover-lift:hover .card {
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        }

a.rounded-circle:hover {
    transform: scale(1.1);
    transition: all 0.2s ease;
}
.x-letter {
    color: #fff !important;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}


.btn-outline-primary {
    border-radius: 0.4rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn-outline-primary:hover {
        background-color: #21374C; 
        color: #fff;
        border-color: #21374C;
    }

/* Back button inside card header */
.card-header .back-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    line-height: 1;
}

    .card-header .back-btn:hover,
    .card-header .back-btn:focus {
        text-decoration: none;
        color: #fff;
        opacity: 0.85;
    }




.welcome-card {
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
}

    .welcome-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

.caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 55, 76, 0.6); /* Elimys navy with transparency */
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .welcome-card img {
        /*height: 220px !important;*/
    }

    .welcome-card .card-body {
        padding: 1rem 0.85rem;
    }
}


/* Instagram gradient */
.bg-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
}

/* Wrapper row tweaks */
.social-icons-row {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

/* Base icon box */
.social-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    box-shadow: none !important; /* Remove jitter caused by hover */
    border: none;
}

/* Larger on md+ devices */
@media (min-width: 768px) {
    .social-icon {
        width: 48px;
        height: 48px;
    }
}

/* Internal content stability */
.social-icon i,
.social-icon .x-letter {
    display: block;
    line-height: 1;
    transition: none;
}

/* X color fix */
.x-letter {
    color: #fff !important;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}
