/* Documents Page Styles */

/* Hero Section */
.documents-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
    text-align: center;
    padding: clamp(1rem, 3vw, 2rem);
}

@supports (height: 100dvh) {
    .documents-hero {
        min-height: 100dvh;
    }
}

.documents-hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.documents-hero__video iframe,
.documents-hero__video video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%) scale(1.1);
    transform-origin: center;
    object-fit: cover;
    border: none;
    pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
    .documents-hero__video iframe,
    .documents-hero__video video {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .documents-hero__video iframe,
    .documents-hero__video video {
        width: 177.78vh;
    }
}

@supports (height: 100dvh) {
    .documents-hero__video iframe,
    .documents-hero__video video {
        height: 100dvh;
        min-height: 100dvh;
    }
}

.documents-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: var(--hero-text-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hero-gap);
}

.documents-hero__title {
    font-size: var(--hero-title-size);
    font-weight: var(--hero-title-weight);
    line-height: var(--hero-title-line-height);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: var(--hero-letter-spacing);
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

.documents-hero__subtitle {
    font-size: var(--hero-subtitle-size);
    font-weight: var(--hero-subtitle-weight);
    line-height: var(--hero-subtitle-line-height);
    margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
    color: #ffffff;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* Filter Navigation */
.documents-filters {
    margin-top: clamp(1.5rem, 3vw, 3rem);
    position: relative;
    z-index: 2;
    width: 100%;
}

.documents-filter-grid {
    display: flex;
    gap: clamp(1.25rem, 2vw, 1.75rem);
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 2rem;
    overflow-x: auto;
    padding: 0 clamp(0.5rem, 1vw, 1.25rem);
    -webkit-overflow-scrolling: touch;
}

.documents-hero .documents-filter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: clamp(1.05rem, 2vw, 1.3rem);
    min-width: 130px;
    flex: 0 1 160px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    appearance: none;
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.documents-hero .documents-filter-card::before {
    content: none;
}

.documents-hero .documents-filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.documents-hero .documents-filter-icon i {
    font-size: 1.3rem;
    color: #ffffff;
}

.documents-filter-text {
    font-size: clamp(0.65rem, 0.95vw, 0.9rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    width: 100%;
    text-transform: capitalize;
}

.documents-hero .documents-filter-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.documents-hero .documents-filter-card:hover .documents-filter-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.documents-hero .documents-filter-card.active,
.documents-hero .documents-filter-card[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.documents-hero .documents-filter-card.active .documents-filter-icon,
.documents-hero .documents-filter-card[aria-pressed="true"] .documents-filter-icon {
    background: rgba(255, 255, 255, 0.3);
}

.documents-hero .documents-filter-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Documents Section */
.documents-section {
    position: relative;
    padding: 4rem 0;
    background: #f4f7fb;
}

.documents-section .container {
    position: relative;
    z-index: 2;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.75rem;
    }
}

@media (max-width: 900px) {
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Document Card */
.document-card {
    background: linear-gradient(135deg, #14497c 0%, #1a5590 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    padding-top: clamp(2.5rem, 4vw, 3.25rem);
    transition: all 0.3s ease;
    box-shadow: 0 12px 32px rgba(20, 73, 124, 0.35);
    color: #ffffff;
    opacity: 0;
    transform: translateY(40px);
    animation: none;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays for each card */
.document-card:nth-child(1) { animation-delay: 0.2s; }
.document-card:nth-child(2) { animation-delay: 0.45s; }
.document-card:nth-child(3) { animation-delay: 0.7s; }
.document-card:nth-child(4) { animation-delay: 0.95s; }
.document-card:nth-child(5) { animation-delay: 1.2s; }
.document-card:nth-child(6) { animation-delay: 1.45s; }
.document-card:nth-child(7) { animation-delay: 1.7s; }
.document-card:nth-child(8) { animation-delay: 1.95s; }

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(20, 73, 124, 0.45);
}

.document-content {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 1.6vw, 1.1rem);
    min-height: 100%;
    align-items: stretch;
}

.document-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.document-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: center;
  line-height: 1.3;
  /* Reserve space so descriptions start consistently across cards even when titles wrap */
  min-height: clamp(4.4rem, 7vw, 5.8rem);
}

.document-date {
    position: absolute;
    top: clamp(0.75rem, 2vw, 1.25rem);
    left: clamp(0.75rem, 2vw, 1.25rem);
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.document-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: center;
    margin-top: clamp(0.8rem, 1.8vw, 1.2rem);
    flex: 1 1 auto;
}

.document-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 768px) {
  .document-title {
    /* Slightly smaller reserve on mobile to avoid excessive vertical space */
    min-height: clamp(3rem, 6vw, 4rem);
  }
}

.document-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.document-btn::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
}

.document-btn.primary {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.document-btn.primary:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.document-btn.secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.document-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.document-btn.primary::before {
    content: "\f019"; /* download */
}

.document-btn.secondary::before {
    content: "\f06e"; /* eye (view) */
}

/* Responsive Design */
@media (max-width: 768px) {
    .documents-hero {
        min-height: 400px;
        padding: var(--spacing-2xl) var(--spacing-md);
    }
    
    .documents-hero__title {
        font-size: var(--hero-title-size);
    }
    
    .documents-hero__subtitle {
        font-size: var(--hero-subtitle-size);
    }
    
    .documents-filter-grid {
        gap: 1.1rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 clamp(0.5rem, 2vw, 1.25rem);
        -webkit-overflow-scrolling: touch;
    }
    
    .documents-hero .documents-filter-card {
        height: auto;
        padding: clamp(1rem, 3vw, 1.25rem);
        min-width: 130px;
        max-width: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .documents-hero .documents-filter-icon {
        width: 40px;
        height: 40px;
    }
    
    .documents-hero .documents-filter-icon i {
        font-size: 1.2rem;
    }
    
    .documents-filter-text {
        font-size: 0.95rem;
    }
    
    .documents-section {
        padding: 2.5rem 0;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    .document-card {
        padding: 1.5rem;
    }
    
    .document-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .documents-hero {
        padding: var(--spacing-xl) var(--spacing-sm);
    }

    .documents-hero__content {
        padding: var(--spacing-lg) var(--spacing-sm);
        background: none;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .documents-filter-grid {
        gap: 1rem;
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .documents-hero .documents-filter-card {
        height: auto;
        padding: clamp(0.9rem, 3vw, 1.15rem);
        min-width: 130px;
        flex-direction: column;
        gap: 0.65rem;
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        align-items: center;
        box-sizing: border-box;
    }
    
    .documents-hero .documents-filter-icon {
        width: 36px;
        height: 36px;
    }
    
    .documents-hero .documents-filter-icon i {
        font-size: 1.1rem;
    }
    
    .documents-filter-text {
        font-size: 0.9rem;
    }
}
