/* ==========================================================================
   1. Imports and Root Variables
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

:root {
    --primary-color: #0d6b74;
    --primary-color-900: #394c4e;
    --primary-color-50: #d8e5e6;
    --secondary-color: #c59a45;
    --secondary-color-100: #f0ebe1;
    --grey-color: #9a9a9a;
    --border-light: #ddd;
    --shadow-soft: 2px 2px 12px rgba(0, 0, 0, 0.1);
    --border-radius-md: 8px;
    --border-radius-lg: 1rem;
    --transition-fast: all 0.3s ease;
}

/* ==========================================================================
   2. Base & Global Styles
   ========================================================================== */

* {
    padding: 0;
    margin: 0;
    border: none;
    text-decoration: none;
    box-sizing: border-box;
}

html {
    font-family: 'Tajawal', Arial, Helvetica, sans-serif;
}

/* Utility class for flex centering */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   3. Layout Structure
   ========================================================================== */

#page {
    max-width: 950px;
    margin: 0 auto;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.3rem 0;
}

header h3 {
    color: var(--primary-color);
}

.content {
    display: none; /* Controlled by .active class */
    padding: 2rem 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.content.active {
    display: grid;
}

/* ==========================================================================
   4. Components: Tabs, Cards, Buttons, etc.
   ========================================================================== */

/* --- Tabs Component --- */
.tabs ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tabs ul li a {
    display: block;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    /* Inactive State */
    color: var(--grey-color);
    border: 1px solid var(--grey-color);
    background-color: transparent;
    filter: drop-shadow(2px 2px 4px #98989848);
}

.tabs ul li a.active {
    /* Active State */
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    filter: drop-shadow(2px 2px 4px #0d6b7454);
}

.tabs ul li a.active svg path {
    fill: #fff;
}


/* --- Card Component --- */
.card-thumbnail,
.card-content {
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}

.card-thumbnail {
    height: 200px;
    position: relative;
    padding: 0.5rem;
    overflow: hidden;
}

.card-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
    background-image: linear-gradient(225deg, rgba(0, 0, 0, 0), rgb(13 107 116 / 0.3));
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
}

.card-content {
    padding: 1.5rem 1rem;
    margin-top: 0.5rem;
}

.card-content h3 {
    font-size: 1.1rem; /* Added for consistency */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
}

/* --- Buttons & Links --- */
.apply {
    position: absolute;
    bottom: 24px;
    left: 24px;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4));
    transition: var(--transition-fast);
    animation: pulse-animation 1s alternate ease-in-out infinite;
}

.apply:hover {
    background-color: var(--primary-color);
}

.files h3 a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 10rem;
    background-color: var(--primary-color-50);
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.files h3 a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.files h3 a:hover svg {
    fill: #fff;
}


/* --- Details & Info Sections --- */
.details span {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    column-gap: 0.3rem;
    border-radius: 3rem;
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    box-shadow: 4px 4px 12px #c59a4553;
}

.details ul,
.dates ul,
.pagination ul {
    list-style: none;
}

.details ul {
padding: 0.5rem 0;
li {
    display: flex;
    align-items: center;
    column-gap: 0.3rem;
    line-height: 1.8;
}

}

.info {
    border-top: 1px solid #dedede;
    border-bottom: 1px solid #dedede;
    padding: 0.5rem 0;
}

.info h2 {
    font-size: 1.1rem;
    color: var(--primary-color);
    padding: 0.5rem 0 1rem;
}

ul.dates {
    display: flex;
    justify-content: space-evenly;
    text-align: center;
    li {list-style: none;}
}

ul.dates li span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background-color: var(--primary-color-50);
    outline: 1px solid #0d6b742d;
    outline-offset: 3px;
    box-shadow: 2px 2px 8px #0d6b7469;
}

ul.dates li:last-child span {
    background-color: var(--secondary-color-100);
    outline-color: #c59a454e;
    box-shadow: 2px 2px 8px #c59a4567;
}

ul.dates li span img {
    
}

ul.dates h4 {
    font-size: 0.85rem;
    font-weight: normal;
}

/* --- Other Components --- */
span.state {
    position: absolute;
    top: 24px;
    right: 16px;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.2));
}

span.no b {
    color: var(--primary-color-900);
}

.files {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
}

.files h3 {
    font-size: 1rem;
    display: flex; /* Changed for alignment */
    align-items: center;
    gap: 0.5rem;
}

.pagination ul {
    display: flex;
    justify-content: center; /* Added for centering */
    gap: 0.5rem;
}

.pagination ul li a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 45px;
    border-radius: 4px;
    font-size: 1.1rem;
    background-color: var(--primary-color-50);
    color: var(--primary-color);
    border: 1px solid #bbced0b5;
    box-shadow: 2px 2px 8px #0d6b7428;
    transition: var(--transition-fast);
}

.pagination ul li.active a,
.pagination ul li a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.old {
    filter: grayscale(1);
}

.old .apply {
    display: none;
}

/* ==========================================================================
   5. Animations & Media Queries
   ========================================================================== */

@keyframes pulse-animation {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.03);
    }
}

@media screen and (max-width: 468px) {
    .content {
        grid-template-columns: 1fr;
    }
}