/* ===================================
   Sarkari Result - Main Stylesheet
   Mobile-First Responsive Design
   Red & White Color Scheme
   =================================== */

/* CSS Variables for Easy Customization */
:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --light-red: #ef5350;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --light-gray: #e0e0e0;
    --medium-gray: #757575;
    --dark-gray: #424242;
    --text-dark: #212121;
    --text-light: #666666;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--off-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ===================================
   HEADER STYLES
   =================================== */

.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Header Top */
.header-top {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    display: inline-block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.logo-text span {
    font-size: 0.875rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-toggle,
.menu-toggle {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Search Bar */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.search-bar.active {
    max-height: 100px;
    padding: 1rem 0;
}

.search-bar form {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9375rem;
}

.search-bar button {
    padding: 0.75rem 1.5rem;
    background: var(--dark-red);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: #8b0000;
}

/* Main Navigation */
.main-nav {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-red);
    background: var(--off-white);
}

/* Mega Menu */
.megamenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    box-shadow: var(--shadow-hover);
    min-width: 750px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border-top: 3px solid var(--primary-red);
}

.nav-item:hover .megamenu {
    opacity: 1;
    visibility: visible;
}

.megamenu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.megamenu-column h3 {
    font-size: 1rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.megamenu-column ul {
    list-style: none;
}

.megamenu-column ul li {
    margin-bottom: 0.5rem;
}

.megamenu-column ul li a {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.25rem 0;
    display: block;
    transition: var(--transition);
}

.megamenu-column ul li a:hover {
    color: var(--primary-red);
    padding-left: 0.5rem;
}

/* ===================================
   MAIN CONTENT STYLES
   =================================== */

main {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--white);
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--medium-gray);
}

/* Section Heading */
.section-heading {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-heading h2 {
    font-size: 1.375rem;
    margin: 0;
    color: var(--white);
}

.section-heading a {
    color: var(--white);
    font-size: 0.875rem;
    text-decoration: underline;
}

/* Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-badge {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.card-title a {
    color: var(--text-dark);
}

.card-title a:hover {
    color: var(--primary-red);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-description {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--primary-red);
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background: var(--dark-red);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* List Style */
.job-list,
.result-list,
.admit-card-list {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.list-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--off-white);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.list-item-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.list-item-title a {
    color: var(--text-dark);
}

.list-item-title a:hover {
    color: var(--primary-red);
}

.list-item-date {
    font-size: 0.8125rem;
    color: var(--white);
    background: var(--primary-red);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.list-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.list-item-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Update Badge */
.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #4caf50;
    color: var(--white);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.update-badge.new {
    background: #ff9800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===================================
   FOOTER STYLES
   =================================== */

.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding-top: 3rem;
    margin-top: 3rem;
}

.footer-main {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column {
}

.footer-heading {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-red);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

/* Footer Bottom */
.footer-bottom {
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-info {
    text-align: center;
}

.footer-tagline {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: var(--white);
}

.footer-social {
    text-align: center;
}

.footer-social p {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

/* ===================================
   RESPONSIVE DESIGN - TABLET
   =================================== */

@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Navigation */
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
        padding-top: 4rem;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-item {
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
    }
    
    /* Mega Menu Mobile */
    .megamenu {
        position: static;
        transform: none;
        min-width: auto;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: var(--off-white);
    }
    
    .nav-item.active .megamenu {
        max-height: 1000px;
    }
    
    .megamenu-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Card Grid */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .list-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .list-item-date {
        align-self: flex-start;
    }
    
    .footer-bottom-content {
        text-align: center;
    }
    
    .footer-legal ul {
        flex-direction: column;
        align-items: center;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus styles */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #c00;
        --dark-red: #900;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .search-bar,
    .btn {
        display: none;
    }
    
    body {
        background: var(--white);
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
}
