/* ============================================
   IRANSANS FONT INTEGRATION
   ============================================ */
@import url('custom.css');

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: IranSans, Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    transition: opacity ease-in 0.3s;
    background-color: #f1f5f9; /* Adjusted to screenshot's exact cool gray tone */
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0;
}

body[unresolved] {
    opacity: 0;
    overflow: hidden;
}

/* Main Container */
.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 1024px) {
    .container {
        max-width: 1100px;
    }
}

/* ============================================
   HEADER SECTION
   ============================================ */
.header-section {
    width: 100%;
    text-align: center;
    padding: 25px 0 15px 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.logo-img {
    display: inline-block;
    height: 72px;
    width: auto;
    margin-bottom: 10px;
    border: none;
}

.university-name-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e4a76;
    margin-top: 5px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.content-area {
    width: 100%;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

/* ============================================
   UNIVERSAL CARD STYLES
   ============================================ */
.card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 850px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02); /* Adjusted soft elevation shadow */
    border: 1px solid #e2e8f0;
}

/* ============================================
   CARD 1: STATUS & QUERY INFO
   ============================================ */
.status-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.valid-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f0fdf4; /* More accurate lighter green tint */
    color: #16a34a; /* Precise emerald text green */
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    border: 1px solid #bbf7d0;
}

.valid-badge svg {
    width: 16px;
    height: 16px;
}

.main-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a; /* Closer to the dark charcoal/black title tint */
    margin-bottom: 15px;
}

.organization-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f6ff;
    color: #1d4ed8; 
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
    margin-bottom: 24px;
}

/* Query Details Row (Fixed Border, Style & Font Size) */
.basic-info-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.query-info-box {
    background-color: #ffffff;
    border: 1px solid #cbd5e1; /* Matched border intensity */
    border-radius: 8px; /* Balanced box radius */
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

/* 1. Added Hover Shadow Effect for Query Boxes */
.query-info-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    border-color: #94a3b8;
}

.info-tag-label {
    color: #64748b;
    font-weight: 400;
}

.info-tag-value {
    color: #0f172a;
    font-weight: 700;
}

/* ============================================
   CARDS 2 & 3: 4-COLUMN DATA GRID (Fixed Width)
   ============================================ */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0369a1; /* Refined academic blue color */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    width: 100%;
}

.info-grid.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns in a row on Desktop */
    gap: 12px;
}

.info-item {
    background-color: #f8fafc; /* Original precise light background value */
    border: 1px solid #e2e8f0; /* Perfect subtle edge outline */
    border-radius: 12px; /* Fixed border-radius for modern panel styling */
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.25s ease; /* Fluid transition configuration for shadow */
}

/* 1. Added Hover Shadow Effect for Info Panels */
.info-item:hover {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

/* For items needing extra space without breaking the 4-column layout */
.double-span {
    grid-column: span 2;
}

.info-label {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 6px;
    text-align: right;
    font-weight: 400;
}

.info-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a; /* Solid slate charcoal value text */
    text-align: right;
}

/* ============================================
   MAIN FOOTER STYLES
   ============================================ */
.main-footer {
    width: 100%;
    background-color: #1e4a76;
    color: #ffffff;
    padding: 35px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section {
    flex: 1;
}

.right-footer {
    text-align: right;
}

.unique-code-label {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 3px;
}

.unique-code-value {
    font-size: 0.9rem;
    font-weight: 700;
    font-family: monospace, sans-serif;
}

.verification-date {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 5px;
}

.center-footer {
    text-align: center;
}

.digital-stamp {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.digital-stamp svg {
    margin-bottom: 5px;
}

.left-footer {
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.5;
}

.credibility-code {
    font-weight: 700;
    margin-top: 3px;
}

.footer-bottom-note {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 15px;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

/* ============================================
   RESPONSIVE LAYOUTS
   ============================================ */
/* Tablets and small screens (Falls back to 2 Columns) */
@media (max-width: 1023px) {
    .info-grid.four-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    .double-span {
        grid-column: span 2;
    }
}

/* Mobile Devices (Falls back to 1 Column) */
@media (max-width: 640px) {
    .content-area {
        padding: 0 16px;
    }

    .card {
        padding: 20px;
    }

    .main-title {
        font-size: 1.35rem;
    }

    .info-grid.four-cols {
        grid-template-columns: 1fr;
    }
    
    .double-span {
        grid-column: span 1;
    }
    
    .basic-info-row {
        flex-direction: column;
        width: 100%;
    }
    
    .query-info-box {
        width: 100%;
        justify-content: space-between;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .right-footer, .left-footer {
        text-align: center;
    }

    .center-footer {
        order: -1;
    }
}