/* ==========================================================================
   Home page sections, in page order.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    background: url("../images/backgrounds/hero.webp") center / cover no-repeat;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #fff 0%, rgba(141, 23, 57, 0.2) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero > .main-container {
    min-height: inherit;
    display: flex;
    flex-direction: column;
    padding-bottom: 30px;
}

.hero-content {
    z-index: 8;
    position: relative;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    flex: 1;
}

.hero-content .flags img {
    width: 350px;
    height: auto;
    border-radius: 8px;
}

.hero-content-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-direction: column;
}

.hero-content-text-desc {
    border-radius: 10px;
    background-color: var(--color-Primary1);
    color: var(--color-white);
    font-size: 24px;
    text-align: center;
    padding: 10px;
    width: fit-content;
}

.hero-content-text .ctm-btn1 {
    padding: 10px 30px;
}

/* ---------- Countdown ---------- */
.countdown {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.countdown .row {
    align-items: center;
    justify-content: space-between;
    width: 50%;
}

.count-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: var(--color-Primary3);
    border-radius: 10px;
    text-align: center;
    margin: 0 15px;
}

.count-container p {
    font-size: 12px;
    color: var(--color-white);
    background-color: var(--color-Primary1);
    padding: 4px;
    border-radius: 10px 10px 0 0;
}

.count-container span {
    font-size: 40px;
    color: var(--color-Primary1);
    font-family: var(--font-latin);
    font-weight: 900;
}

/* ---------- About the mission ---------- */
.about-section {
    padding: 70px 0;
}

.about-section .row {
    row-gap: 3rem;
}

.about-section .about-media {
    padding-inline-end: 30px;
}

.about-section .about-img {
    position: relative;
    display: flex;
    width: 100%;
}

.about-section .about-img::before,
.about-section .about-img::after {
    content: "";
    position: absolute;
    bottom: -14px;
    background-color: var(--color-Primary1);
    z-index: -1;
    border-radius: 10px;
}

.about-section .about-img::before {
    right: -14px;
    width: 4px;
    height: 50%;
    animation: about-frame-height 4s ease-in-out infinite;
}

.about-section .about-img::after {
    right: -12px;
    width: 80%;
    height: 4px;
    animation: about-frame-width 4s ease-in-out infinite;
}

@keyframes about-frame-height {
    0%,
    100% {
        height: 0;
    }
    50% {
        height: 50%;
    }
}

@keyframes about-frame-width {
    0%,
    100% {
        width: 0;
    }
    50% {
        width: 80%;
    }
}

.about-section .about-img img {
    box-shadow: 0 0 10px 10px rgba(141, 23, 57, 0.25);
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: cover;
}

.about-section .about-text {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.about-section .about-text .sub-title {
    text-align: start;
}

.about-section .about-text p {
    font-size: 18px;
    color: var(--color-gray);
}

/* ---------- About Qatar Exports ---------- */
.about-bank {
    padding: 70px 0;
    min-height: 500px;
    position: relative;
    background: url("../images/backgrounds/about-wide.jpg") center / cover no-repeat fixed;
    align-content: center;
    text-align: center;
}

.about-bank::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--color-Primary1);
    opacity: 0.7;
    z-index: 1;
}

.about-bank .about-bank-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-bank .sub-title {
    color: var(--color-white);
    font-weight: 500;
    line-height: 30px;
}

html[lang="en"] .about-bank .sub-title {
    font-weight: 800;
}

.about-bank .about-bank-text p {
    font-size: 20px;
    font-weight: 400;
    line-height: 40px;
    text-align: start;
    margin-top: 20px;
}

/* ---------- Agenda ---------- */
.event-details,
.content-qatar {
    padding: 70px 0;
}

.event-details .sub-title {
    margin-bottom: 40px;
}

.event-details-item {
    width: 100%;
    margin-bottom: 25px;
}

.event-item-header {
    background-color: var(--color-Primary1);
    color: white;
    padding: 10px;
    text-align: center;
}

.event-item-body {
    padding: 0 20px;
    border: 1px solid var(--color-gray);
    border-top: none;
}

.event-item-body p {
    color: black;
    padding: 10px;
}

.event-item-body .first-column,
.event-item-body .second-column {
    align-content: center;
}

.event-item-body .first-column {
    border-inline-end: 1px solid var(--color-gray);
}

/* ---------- Why Qatar ---------- */
.content-qatar .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.content-qatar .row {
    row-gap: 40px;
}

.content-qatar .statistics,
.content-qatar .statistics-features {
    justify-content: space-between;
    padding: 40px 10px;
    box-shadow: 0 0 10px 0 rgba(141, 23, 57, 0.25);
    border-radius: 20px;
    width: 100%;
    margin: 0 auto;
}

.content-qatar .statistic-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.content-qatar .statistic-item p {
    font-size: 16px;
    color: var(--color-gray);
    margin-top: 10px;
}

.statistics-features .statistic-item h3 {
    font-size: 24px;
    color: var(--color-Primary1);
}

.content-qatar .statistics-numbers {
    justify-content: space-between;
    align-items: center;
}

.statistics-numbers-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background-color: var(--color-Primary1);
    width: 100%;
    border-radius: 10px;
    min-height: 270px;
    padding: 20px;
    text-align: center;
}

.statistics-numbers-item-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.statistics-numbers-item-counter .progress-text {
    font-size: 60px;
    line-height: 1.5;
    color: var(--color-white);
    font-family: var(--font-latin);
    font-weight: 900;
}

/* "%" sits after the number in English, before it (logical order) in Arabic */
.statistics-numbers-item-counter .progress-text--percent {
    display: flex;
    justify-content: center;
    gap: 0.25em;
}

html[lang="en"] .statistics-numbers-item-counter .progress-text--percent {
    flex-direction: row-reverse;
    gap: 0;
}

.statistics-numbers-item-counter p {
    font-size: 14px;
}

.statistics-numbers-item-text p {
    font-size: 16px;
}

/* ---------- Sectors ---------- */
.sectors {
    padding: 70px 0;
}

.sectors .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sectors .row {
    row-gap: 40px;
}

.sectors-item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-Primary1);
    border-radius: 20px;
    overflow: hidden;
    height: 315px;
}

.sectors-item-img {
    height: 81%;
    position: relative;
    overflow: hidden;
}

.sectors-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* company list revealed on hover / keyboard focus */
.sectors-item-title {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--color-Primary1);
    z-index: 1;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 8px 0 4px 0;
    overflow: hidden;
}

.sectors-item:hover .sectors-item-title,
.sectors-item:focus-within .sectors-item-title {
    opacity: 0.8;
    height: 100%;
}

.sectors-item-title p {
    font-size: 12px;
    text-align: center;
    margin: 0 0 4px 0;
    flex-shrink: 0;
}

.sectors-item-title ul {
    margin: 0 10px 8px 10px;
    column-count: 2;
    column-gap: 10px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    list-style: none;
}

.sectors-item-title ul li {
    font-size: 10px;
    line-height: 1.3;
    color: var(--color-white);
    margin: 0 0 1px 0;
    margin-inline-end: 8px;
    break-inside: avoid;
    overflow-wrap: break-word;
}

.sectors-item-title ul li::before {
    content: "•";
    font-size: 12px;
    display: inline-block;
    width: 12px;
    margin-inline-end: 6px;
    vertical-align: top;
}

.sectors-item-title ul li a {
    font-size: 10px;
    color: var(--color-white);
}

.sectors-item-title ul li a:hover {
    text-decoration: underline;
}

.sectors-item-text {
    flex: 1;
}

.sectors-item-text h3 {
    font-size: 18px;
    color: var(--color-Primary1);
    text-align: center;
    height: 100%;
    line-height: 1.4;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
}

/* ---------- Companies ---------- */
.companies {
    padding: 70px 0;
    background-color: var(--color-Primary3);
}

.companies .row {
    row-gap: 20px;
}

.companies .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.company-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 5px;
    overflow: hidden;
    height: 208px;
    border: 1px solid var(--color-Primary1);
    padding: 10px;
    background-color: var(--color-white);
}

a.company-item:hover {
    box-shadow: 0 4px 8px rgba(141, 23, 57, 0.2);
    transform: translateY(-2px);
}

.company-item-img {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.company-item-img img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* room for four lines: some company names are long, and cards get narrow on small screens */
.company-item-text {
    padding: 4px 5px;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.company-item-text p {
    width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-Primary1);
    text-align: center;
    font-family: var(--font-ui);
}

/* ---------- Contact ---------- */
.contact {
    padding: 70px 0;
}

.contact .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact .row {
    row-gap: 40px;
}

.contact-item {
    border-radius: 20px;
    background-color: var(--color-Primary1);
    overflow: hidden;
}

.contact-item a,
.contact-item img {
    display: block;
    width: 100%;
}

.contact-item img {
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.contact-container-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--color-Primary1);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
}

.contact-container-card > p {
    font-size: 24px;
    color: var(--color-Primary1);
    text-align: center;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-card-item {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.contact-card-item p {
    font-size: 20px;
    color: var(--color-gray);
}

.contact-card-item p.latin {
    direction: ltr;
}

.contact-card-item a {
    color: inherit;
    font-size: inherit;
}

.contact-card-item a:hover {
    color: var(--color-Primary1);
}

.contact-action {
    display: flex;
    justify-content: center;
}

.contact-btn {
    padding: 0 30px;
    height: 50px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1395px) {
    .count-container span {
        font-size: 24px;
    }

    .hero-content-text-desc {
        font-size: 18px;
    }
}

@media (max-width: 1200px) {
    .countdown .row {
        width: 60%;
    }
}

@media (max-width: 1024px) {
    .count-container {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .about-section,
    .sectors,
    .companies,
    .contact,
    .content-qatar,
    .event-details {
        padding: 40px 0;
    }

    /* Small screens: no fixed background (janky on touch devices), and reuse the
       photo already downloaded for the "about" section instead of the wide version */
    .about-bank {
        background-image: url("../images/backgrounds/about.jpg");
        background-attachment: scroll;
    }

    .about-bank .sub-title {
        font-size: 28px;
        line-height: 28px;
    }

    .about-section .about-text p {
        font-size: 18px;
    }

    .about-bank .about-bank-text p {
        font-size: 18px;
        line-height: 36px;
    }

    .countdown {
        padding: 10px 0;
    }

    .countdown .row {
        width: 80%;
    }

    .count-container span {
        font-size: 22px;
    }

    .count-container p {
        font-size: 11px;
        padding: 2px;
    }

    .hero-content-text {
        gap: 40px;
    }

    .hero-content-text-desc {
        font-size: 16px;
    }

    .sectors-item-text h3 {
        font-size: 20px;
    }

    .contact-card-item p {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .hero-content-text {
        gap: 30px;
    }

    .hero-content-text-desc {
        font-size: 14px;
    }

    .count-container span {
        font-size: 20px;
    }

    .sectors-item-text h3 {
        font-size: 18px;
    }

    .content-qatar p {
        line-height: 24px;
    }

    .content-qatar .statistic-item p {
        font-size: 15px;
    }

    .statistics-features .statistic-item h3 {
        font-size: 17px;
    }

    .about-section .about-text p {
        font-size: 12px;
    }

    .about-bank .sub-title {
        font-size: 24px;
        line-height: 26px;
    }

    .about-bank .about-bank-text p {
        font-size: 16px;
        line-height: 32px;
        text-align: center;
    }
}

@media (max-width: 450px) {
    /* full width on phones so "Minutes" / "Seconds" fit in their boxes */
    .countdown,
    .countdown .row {
        width: 100%;
    }

    .count-container {
        gap: 0;
    }

    .sectors-item-text h3 {
        font-size: 16px;
    }

    .contact-card-item p {
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .count-container p {
        font-size: 10px;
    }

    .contact-card-item p {
        font-size: 14px;
    }
}
