/* Outfit @font-face */
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit/outfit-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

/* Bootstrap Icons Override for Correct Local Paths */
@font-face {
    font-family: 'bootstrap-icons';
    src: url('../fonts/bootstrap-icons/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6') format('woff2'),
         url('../fonts/bootstrap-icons/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --provedoria-teal: #2A9D8F;
    --provedoria-orange: #F4A261;
    --provedoria-red: #C1121F;
    --provedoria-dark: #264653;
    --provedoria-light: #F8F9FA;
    --glass-bg: rgba(255, 255, 255, 0.95);
}

body {
    background-color: var(--provedoria-light);
    font-family: 'Outfit', sans-serif;
    color: var(--provedoria-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Modern Header */
.top-bar {
    background: #f4a261; /* Orange from image */
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 8px 0;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
}

.top-bar a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.top-bar a:hover {
    opacity: 1;
}

.main-header {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dept-branding {
    flex-grow: 1;
    text-align: left; /* Left aligned as per image */
}

.dept-branding .en {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #334155;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.dept-branding .hi {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1;
}

.side-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.side-logos img {
    height: 60px;
    width: auto;
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 0;
    }
    .header-flex {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .dept-branding {
        text-align: center;
    }
    .dept-branding .en {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
    .dept-branding .hi {
        font-size: 1rem;
    }
    .main-logo img {
        height: 65px;
    }
    .side-logos {
        gap: 15px;
    }
    .side-logos img {
        height: 45px;
    }
}

.secondary-nav {
    background: #2a9d8f;
    height: 8px; /* Thinner teal bar as per image */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--provedoria-dark) 0%, #1a3641 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Search Card */
.search-container {
    margin-top: -60px;
    margin-bottom: 60px;
}

.search-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 3rem;
}

.search-input-group {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-group:focus-within {
    border-color: var(--provedoria-teal);
    box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.1);
    transform: translateY(-2px);
}

.search-input-group input {
    border: none;
    font-size: 1.25rem;
    font-weight: 600;
    width: 100%;
    outline: none;
    color: var(--provedoria-dark);
}

.search-btn {
    background: var(--provedoria-teal);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 700;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #238b7e;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(42, 157, 143, 0.3);
}

/* Result Card */
.result-card {
    display: none;
    border-left: 6px solid var(--provedoria-teal);
    background: #f0fdf4;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideUp 0.5s ease-out;
}

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

.download-link {
    background: var(--provedoria-orange);
    color: white !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(244, 162, 97, 0.2);
    white-space: nowrap;
    font-size: clamp(0.85rem, 2vw, 1rem); /* Dynamically scale font size */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    max-width: 100%; /* Never exceed parent */
}

@media (max-width: 768px) {
    .download-link {
        display: flex;
        width: 100%;
        margin-top: 15px;
    }
}

.download-link:hover {
    background: #e76f51;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(244, 162, 97, 0.3);
}

/* CAPTCHA Styles */
.captcha-box { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.captcha-img-compact {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    height: 48px;
    width: 100%;
    max-width: 130px;
    object-fit: cover;
}

.btn-reload-sm {
    height: 48px; 
    width: 48px; 
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--provedoria-teal);
    flex-shrink: 0;
}

.btn-reload-sm:hover { 
    background: #f1f5f9; 
    transform: rotate(180deg);
}

.search-btn {
    background: var(--provedoria-teal);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(42, 157, 143, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

.search-btn:hover {
    background: #238b7e;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(42, 157, 143, 0.3);
}

/* Footer Styles */
footer {
    background: white;
    color: #64748b;
    padding: 30px 0;
    margin-top: auto;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.footer-logo {
    height: 45px;
    margin-bottom: 15px;
    filter: none; /* Removed grayscale */
}
