﻿/* ========================================
    PREVIOUS PRESIDENTS CARDS - FULLY RESPONSIVE
    Blue & Gold Theme - Matching Other Views
    ======================================== */
/* Card wrapper */
.previous-pres-card {
    padding: 15px !important;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Inner row */
.previous-pres-card .president-row {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 15px;
    box-shadow: 0 5px 20px rgba(0, 112, 183, 0.08);
    border: 1px solid rgba(0, 112, 183, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

    /* Decorative side line - Blue to Gold gradient */
    .previous-pres-card .president-row::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #0070b7, #0099cc, #d4a843, #c9952f);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.4s ease;
    }

    /* Top accent line - appears on hover */
    .previous-pres-card .president-row::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #0070b7, #0099cc, #d4a843, #c9952f);
        border-radius: 0 0 3px 3px;
        transition: width 0.4s ease;
        z-index: 2;
    }

/* Hover effects */
.previous-pres-card:hover .president-row {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 112, 183, 0.15);
    border-color: rgba(212, 168, 67, 0.3);
    background: linear-gradient(145deg, #ffffff 0%, #fefaf3 100%);
}

    .previous-pres-card:hover .president-row::before {
        transform: scaleY(1);
    }

    .previous-pres-card:hover .president-row::after {
        width: 60%;
    }

/* Image */
.previous-pres-image {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid rgba(0, 112, 183, 0.1);
    object-fit: cover;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1;
    max-width: 100px;
}

.previous-pres-card:hover .previous-pres-image {
    box-shadow: 0 8px 20px rgba(0, 112, 183, 0.25);
    transform: scale(1.03);
    border-color: #d4a843;
}

/* Info section */
.previous-pres-info {
    padding: 5px 0;
}

    .previous-pres-info a {
        text-decoration: none !important;
        display: inline-block;
    }

/* Name - Blue color with gold hover */
.previous-pres-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0070b7 !important;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

    /* Name underline - Blue to Gold gradient */
    .previous-pres-name::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 30px;
        height: 2px;
        background: linear-gradient(90deg, #0070b7, #d4a843);
        transition: width 0.3s ease;
        border-radius: 2px;
    }

.previous-pres-card:hover .previous-pres-name::after {
    width: 100%;
    background: linear-gradient(90deg, #0070b7, #0099cc, #d4a843);
}

.previous-pres-info a:hover .previous-pres-name {
    color: #d4a843 !important;
}

/* Period badge - Blue to Gold gradient on hover */
.previous-pres-period {
    font-size: 0.85rem;
    color: #0070b7;
    margin-top: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(0, 112, 183, 0.08), rgba(212, 168, 67, 0.05));
    display: inline-block;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 112, 183, 0.15);
}

.previous-pres-card:hover .previous-pres-period {
    background: linear-gradient(135deg, #0070b7, #0099cc);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 112, 183, 0.3);
    border-color: transparent;
}

/* Shine sweep effect on hover */
.previous-pres-card .president-row .shine-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient( 45deg, transparent 40%, rgba(212, 168, 67, 0.05) 45%, rgba(212, 168, 67, 0.1) 50%, rgba(212, 168, 67, 0.05) 55%, transparent 60% );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.previous-pres-card:hover .shine-effect {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Entrance animation */
@keyframes presidentsCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.previous-pres-card {
    animation: presidentsCardFadeIn 0.5s ease forwards;
    opacity: 0;
}

    /* Staggered delays */
    .previous-pres-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .previous-pres-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .previous-pres-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .previous-pres-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .previous-pres-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .previous-pres-card:nth-child(6) {
        animation-delay: 0.6s;
    }

    .previous-pres-card:nth-child(7) {
        animation-delay: 0.7s;
    }

    .previous-pres-card:nth-child(8) {
        animation-delay: 0.8s;
    }

/* ======================================== */
/* TABLET - 992px and below */
/* ======================================== */
@media (max-width: 992px) {
    .previous-pres-card {
        padding: 12px !important;
        margin-bottom: 20px;
    }

        .previous-pres-card .president-row {
            padding: 16px 12px;
            border-radius: 10px;
        }

    .previous-pres-image {
        max-width: 85px;
        border-radius: 8px;
    }

    .previous-pres-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .previous-pres-period {
        font-size: 0.78rem;
        padding: 3px 10px;
        margin-top: 8px;
    }
}

/* ======================================== */
/* MOBILE - 768px and below */
/* ======================================== */
@media (max-width: 768px) {
    .previous-pres-card {
        padding: 8px !important;
        margin-bottom: 12px;
    }

        .previous-pres-card .president-row {
            padding: 12px 10px;
            border-radius: 10px;
            gap: 10px;
        }

    .previous-pres-image {
        max-width: 65px !important;
        border-radius: 8px;
        border-width: 1.5px;
    }

    .previous-pres-name {
        font-size: 0.82rem;
        margin-bottom: 5px;
        line-height: 1.3;
    }

        .previous-pres-name::after {
            bottom: -3px;
            width: 20px;
            height: 1.5px;
        }

    .previous-pres-card:hover .previous-pres-name::after {
        width: 80%;
    }

    .previous-pres-period {
        font-size: 0.7rem;
        padding: 2px 8px;
        margin-top: 5px;
        border-radius: 15px;
    }

    .previous-pres-info {
        padding: 2px 0;
    }
}

/* ======================================== */
/* SMALL MOBILE - 576px and below */
/* ======================================== */
@media (max-width: 576px) {
    .previous-pres-card {
        padding: 6px !important;
        margin-bottom: 10px;
    }

        .previous-pres-card .president-row {
            padding: 14px 10px;
            border-radius: 8px;
            flex-direction: row;
            gap: 12px;
        }

        .previous-pres-card .col-sm-4,
        .previous-pres-card .col-xs-4 {
            flex: 0 0 60px !important;
            max-width: 60px !important;
        }

        .previous-pres-card .col-sm-8,
        .previous-pres-card .col-xs-8 {
            flex: 1 !important;
            max-width: none !important;
        }

    .previous-pres-image {
        max-width: 55px !important;
        border-radius: 6px;
        border-width: 1px;
    }

    .previous-pres-name {
        font-size: 0.78rem;
        margin-bottom: 4px;
    }

    .previous-pres-period {
        font-size: 0.68rem;
        padding: 2px 7px;
        margin-top: 4px;
        border-radius: 12px;
    }
}

/* ======================================== */
/* VERY SMALL MOBILE - 400px and below */
/* ======================================== */
@media (max-width: 400px) {
    .previous-pres-card {
        padding: 5px !important;
        margin-bottom: 8px;
    }

        .previous-pres-card .president-row {
            padding: 10px 8px;
            border-radius: 8px;
            gap: 8px;
        }

        .previous-pres-card .col-sm-4,
        .previous-pres-card .col-xs-4 {
            flex: 0 0 50px !important;
            max-width: 50px !important;
        }

    .previous-pres-image {
        max-width: 45px !important;
        border-radius: 6px;
    }

    .previous-pres-name {
        font-size: 0.72rem;
        margin-bottom: 3px;
    }

        .previous-pres-name::after {
            width: 15px;
        }

    .previous-pres-card:hover .previous-pres-name::after {
        width: 60%;
    }

    .previous-pres-period {
        font-size: 0.62rem;
        padding: 2px 6px;
        margin-top: 3px;
        border-radius: 10px;
    }
}

/* ======================================== */
/* EXTREME SMALL - 320px and below */
/* ======================================== */
@media (max-width: 320px) {
    .previous-pres-card .president-row {
        padding: 8px 6px;
        gap: 6px;
    }

    .previous-pres-card .col-sm-4,
    .previous-pres-card .col-xs-4 {
        flex: 0 0 40px !important;
        max-width: 40px !important;
    }

    .previous-pres-image {
        max-width: 38px !important;
    }

    .previous-pres-name {
        font-size: 0.68rem;
    }

    .previous-pres-period {
        font-size: 0.58rem;
        padding: 1px 5px;
    }
}

/* ======================================== */
/* RTL Support for Arabic */
/* ======================================== */
html[lang="ar"] .previous-pres-card .president-row::before {
    left: auto;
    right: 0;
}

html[lang="ar"] .previous-pres-name::after {
    left: auto;
    right: 0;
}

