/* Global styles for IFG Progress website */

body {
    font-family: "Montserrat";
    color: #333;
}

.parallelogram {
    width: 250px;
    height: 5px;
    transform: skew(-30deg);
    background: #ea0b2b;
    padding: 0;
    margin: 0;
}

/* Header styles */
.navbar {
    font-size: 16px;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: #333 !important;
}

.navbar .nav-link:hover {
    color: #e60013 !important;
}

.bg-primary-light {
    background: #FFF9F9 !important;
}

.bg-primary-light-2 {
    background: #FFEDEF !important;
}

/* Topic List Hover Effect */
.topic-list {
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.topic-list:hover {
    background-color: #FFEDEF !important;
    border-bottom: 2px solid #e60013 !important;
}

.border-dark-subtle {
    border-color: #7f7f7f !important;
    border-bottom: 2px solid #7f7f7f !important;
}

.navbar .dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #e60013;
}

.btn-outline-secondary {
    border-color: #ced4da;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #333;
}

/* Search box styling */
.form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Footer styles */
footer {
    font-size: 14px;
}

footer h5 {
    font-weight: 600;
    font-size: 16px;
}

footer a:hover {
    color: #f8f9fa !important;
}

/* Primary brand color */
.text-ifg-gray-hover:hover {
    color: #ea0b2b !important;
}

.text-primary {
    color: #ea0b2b !important;
}

.text-dark {
    columns: #000000 !important;
}

.text-ifg-gray {
    color: #686868 !important;
}

.text-ifg-p {
    color: #333333 !important;
}

.border-bottom-red {
    border-bottom: 5px solid #ea0b2b !important;
}

.border-red {
    border: 3px solid #ea0b2b !important;
}

.border-red-bottom {
    border-bottom: 10px solid #ea0b2b !important;
}

.border-red-bottom-sm {
    border-bottom: 4px solid #ea0b2b !important;
}

.bg-light-gray {
    background: #F4F4F4 !important;
}

.bg-primary {
    background-color: #e60013 !important;
}

.btn-primary {
    background-color: #e60013;
    border-color: #e60013;
}

.btn-primary:hover {
    background-color: #cc0011;
    border-color: #cc0011;
}

.bg-linear-red-2 {
    background: #8f0000;
    background: linear-gradient(242deg,
            rgba(143, 0, 0, 1) 0%,
            rgba(230, 0, 19, 1) 100%);
}

.vr-2 {
    display: inline-block;
    align-self: stretch;
    width: var(--bs-border-width);
    min-height: 1em;
    background-color: currentcolor;
    opacity: 1;
}

.carousel-overlay,
.card-overlay-3 {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.5) 25%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.1) 75%,
            rgba(0, 0, 0, 0) 100%);
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
}

/* Image swap on hover */
.icon-normal {
    display: inline-block;
}

.icon-hover {
    display: none;
}

.btn-outline-light:hover .icon-normal {
    display: none;
}

.btn-outline-light:hover .icon-hover {
    display: inline-block;
}

.btn-outline-dark .icon-normal {
    display: none;
}

.btn-outline-dark .icon-hover {
    display: inline-block;
}

.btn-outline-dark:hover .icon-normal {
    display: inline-block;
}

.btn-outline-dark:hover .icon-hover {
    display: none;
}

.btn-red-primary {
    background: #e60013;
    color: #fff;
}

.btn-red-primary:hover {
    background: #cc0011;
    color: #fff;
}

/* Custom red checkboxes */
.form-check-input:checked {
    background-color: #FFEAEA !important;
    border-color: #e60013 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23e60013' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* Make radio buttons square instead of round */
.form-check-input[type="radio"] {
    border-radius: 0.25rem !important;
}

.form-check-input:focus {
    border-color: #e60013;
    box-shadow: 0 0 0 0.25rem rgba(230, 0, 19, 0.25);
}

/* Category Navigation */
.category-nav,
.news-card-red,
.bg-linear-red {
    background-color: #e60013 !important;
    background: linear-gradient(to bottom left,
            #ed1c24 0%,
            #f3131b 18%,
            #ea1a22 28%,
            #e61e26 52%,
            #bd1d23 80%) !important;
    padding: 0;
}

.news-card-white {
    background-color: #f7f7f7 !important;
    background: linear-gradient(240deg, #ffffff 28%, #e0e0e0 88%) !important;
    padding: 0;
}

.category-nav .nav-link {
    padding: 0.75rem 0.5rem;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.category-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 576px) {
    .w-sm-100 {
        width: 100% !important;
    }
}

@media (max-width: 992px) {
    .category-nav .nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: start !important;
    }

    .category-nav .nav-item {
        flex-shrink: 0;
    }
}

@media (min-width: 1400px) {
    .w-lg-75 {
        width: 75% !important;
    }

    .w-lg-85 {
        width: 85% !important;
    }

    .px-lg-3 {
        padding-left: 3.5rem !important;
        padding-right: 3.5rem !important;
    }

    .px-lg-4 {
        padding-left: 5rem !important;
        padding-right: 5rem !important;
    }

    .px-lg-5 {
        padding-left: 8rem !important;
        padding-right: 8rem !important;
    }

    .p-lg-3 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .p-lg-5 {
        padding: 3rem;
    }
}

.btn-primary-linear {
    background-color: #e60013 !important;
    background: linear-gradient(240deg, #941818 3%, #dd1f26 28%) !important;
    color: #fff !important;
    display: block;
    position: relative;
    transition: none !important;
}

.btn-primary-linear img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    z-index: 0;
}

.btn-primary-linear p {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease !important;
}

.btn-primary-linear:hover {
    background: #333 !important;
    color: #e60013 !important;
}

.btn-primary-linear:hover p {
    color: #e60013 !important;
}

.footer-section {
    position: relative;
    z-index: 0;
    background: linear-gradient(242deg,
            rgba(132, 7, 25, 1) 0%,
            rgba(234, 12, 44, 1) 100%);
    overflow: hidden;
}

.footer-section::after {
    content: "";
    position: absolute;
    float: right;
    top: 10px;
    right: 0;
    height: 100%;
    width: 950px;
    background-image: url("../../images/ifg-progress/extras/IFG-WHITE-1.svg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 50% auto;
    z-index: -1;
    opacity: 1;
}

.footer-logo {
    height: 90px;
}

@media (max-width: 767.98px) {
    .footer-logo {
        height: auto;
        max-height: 70px;
    }
}

.hover-red:hover {
    color: #dc3545 !important;
}

.hero-section {
    position: relative;
    height: 50rem;
}

.hero-section2 {
    position: relative;
    height: 8rem !important;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;

}

.hero-image-detail {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.hero-overlay,
.hero-overlay-detail {
    padding-top: 6%;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Smoother vertical fade */
    background: linear-gradient(to top,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.98) 10%,
            rgba(255, 255, 255, 0.92) 20%,
            rgba(255, 255, 255, 0.85) 30%,
            rgba(255, 255, 255, 0.70) 45%,
            rgba(255, 255, 255, 0.50) 60%,
            rgba(255, 255, 255, 0.30) 75%,
            rgba(255, 255, 255, 0.15) 88%,
            rgba(255, 255, 255, 0) 100%);
}

.hero-overlay-detail {
    height: 100%;
}

.text-ifg-gray {
    color: #333333;
}

.text-ifg-p {
    color: #333333;
}

.content-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-ifg p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.bg-light-gray {
    background-color: #f8f9fa;
}

.bg-light-gray-2 {
    background-color: #F4F4F4;
}

.btn-red-light {
    background-color: #FFEAEA;
    color: #ea0b2b;
}

.btn-red-light:hover {
    background-color: #ffd6d6;
    color: #ea0b2b;
}

.red-bottom-line {
    width: 100%;
    height: 5px;
    background-color: #ea0b2b;
}

@media (max-width: 767px) {
    .hero-section {
        height: 550px;
    }

    .hero-overlay .row>div {
        margin-bottom: 1rem;
    }
}

/* White placeholder text */
.white-placeholder::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* For Firefox */
.white-placeholder::-moz-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1;
}

/* For Chrome/Safari/Opera */
.white-placeholder::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* For IE/Edge */
.white-placeholder:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Unify thumbnail ratio across lists (publication, article, topic) */
.ifg-thumb-16x9,
.publication-thumb-img,
.article-thumb-img,
.topic-thumb-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
}