/* assets/css/style.css */
:root {
    --header-red: #cc0000;
    --nav-blue: #004488;
    --grid-header: #333333;
    --bg-light: #f5f5f5;
    --text-main: #222222;
    --text-muted: #666666;
    --border-color: #dddddd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
/* Mobile-Friendly Native CSS Marquee Animation */
@keyframes cssMarquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

body { margin: 0; padding: 0; background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

header { background: var(--header-red); color: #fff; padding: 15px 0; }
.logo-circle { border-radius: 50%; border: 2px solid #fff; }
.header-text h1 { font-size: 2rem; font-weight: 800; }

/* Ultra 3D Recruitment Button (The Premium Standard) */
.ultra-3d-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #0044cc !important;
    background: linear-gradient(to bottom, #0055ff 0%, #0033aa 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    padding: 14px 35px !important;
    margin: 10px 5px !important;
    border-radius: 15px !important; /* Pronounced Rounding for Premium Feel */
    text-transform: uppercase !important;
    text-decoration: none !important;
    font-size: 1.1rem !important;
    border: 1.5px solid #0055ff !important;
    border-bottom: 6px solid #001a33 !important; /* Thick 3D Base */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    min-width: 190px !important;
    letter-spacing: 1px !important;
    transition: all 0.05s linear !important;
    position: relative;
    top: 0;
}
.ultra-3d-btn:hover {
    transform: translateY(3px) !important; /* Sinks into page */
    border-bottom: 3px solid #001a33 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
.ultra-3d-btn:active {
    transform: translateY(5px) !important;
    border-bottom: 1px solid #001a33 !important;
}

/* Animated Header Search Box inline */
.header-search-wrapper {
    position: relative;
    display: inline-block;
    z-index: 100;
}
.header-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 0;

    width: 38px;
    height: 38px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.header-search-form:hover, 
.header-search-form:focus-within,
.header-search-form.active {
    width: 220px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    color: #333;
    font-weight: 700;
    font-size: 0.95rem;
    width: 0;
    opacity: 0;

}
.header-search-form:hover .header-search-input, 
.header-search-form:focus-within .header-search-input,
.header-search-form.active .header-search-input {
    width: 100%;
    opacity: 1;
    padding: 0 5px 0 15px;
}
.header-search-btn {
    border: none;
    background: #00cc00;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 204, 0, 0.8);
}
.header-search-form:hover .header-search-btn, 
.header-search-form:focus-within .header-search-btn,
.header-search-form.active .header-search-btn {
    color: #00cc00;
    background: transparent;
    box-shadow: none;
}

.nav-bar { background: var(--nav-blue); }

/* Horizontal Scroller Menu Styles */
.nav-wrapper-scroll {
    display: flex;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 12px 10px;
    
    gap: 12px;
    outline: none;
}
.nav-wrapper-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar for sleek minimal look */
}
.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 24px;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 30px;
    background: rgba(255,255,255,0.08); /* Faint glass background */
    border: 2px solid transparent;

    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    letter-spacing: 0.3px;
}
body { margin: 0; padding: 0; background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; }

main.container { margin-top: 30px; min-height: 60vh; }

table { 
    width: 100% !important; 
    max-width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    margin-bottom: 20px; 
    border-radius: 8px; 
    border: 1px solid var(--border-color); 
}

@media (max-width: 768px) {
    table, tbody, th, td, tr { 
        display: block; 
    }
    .post-content-area table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    .post-content-area table tbody, .post-content-area table tr, .post-content-area table td {
        display: table-cell; /* Revert back for internal post tables to scroll correctly instead of stacking vertically */
    }
    .post-content-area table tr {
        display: table-row;
    }
    .post-content-area table tbody {
        display: table-row-group;
    }
}
th, td { border: 1px solid var(--border-color); padding: 12px 14px; font-size: 0.95rem; }
th { background: linear-gradient(135deg, var(--nav-blue), #002244); color: #fff; font-weight: 800; letter-spacing: 0.5px; border-color: rgba(255,255,255,0.1); text-transform: uppercase; }
.post-content-area tr:nth-child(even) td { background-color: #f8fafd; }
.post-content-area tr:hover td { background-color: #eef3fc; transition: all 0.2s; }

@keyframes rotateBorderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Post Content Media Glowing Images */
.post-content-area img {
    border-radius: 12px;
    border: 3px solid #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.6);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
}

/* Simplified Global Table Styling for Content */
.post-content-area td { vertical-align: middle; }

/* Recruitment Summary Box Flag Animation */
.summary-box-animated {
    position: relative;
    border-radius: 8px; 
    margin-bottom: 30px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
    animation: fadeIn 0.8s ease-in 0.3s both;
    overflow: hidden;
    z-index: 1;
    padding: 2px; /* Controls Flag Border Thickness */
}

.summary-box-animated::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; width: 300%; height: 300%;
    /* Indian Flag Colors: Saffron, White, Green */
    background: conic-gradient(#FF9933 0deg, #FFFFFF 90deg, #138808 180deg, #FFFFFF 270deg, #FF9933 360deg);
    animation: rotateBorderSpin 4s linear infinite;
    z-index: -2;
}

.summary-box-inner {
    border-radius: 6px; /* Inner radius */
    overflow: hidden;
    background: #fff;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Circular Logo Box Flag Animation */
.logo-flag-animated {
    position: relative;
    display: inline-block;
    border-radius: 50%; 
    overflow: hidden;
    z-index: 1;
    padding: 3px; /* Controls Flag Border Thickness */
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.logo-flag-animated::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    /* Indian Flag Colors: Saffron, White, Green */
    background: conic-gradient(#FF9933 0deg, #FFFFFF 90deg, #138808 180deg, #FFFFFF 270deg, #FF9933 360deg);
    animation: rotateBorderSpin 3s linear infinite;
    z-index: -2;
}

.logo-flag-animated img {
    position: relative;
    border-radius: 50%;
    z-index: 1;
    background: #fff;
    display: block;
    max-width: 90px;
    height: auto;
    border: 2px solid #fff; /* Inner white ring */
}

/* Index Category Box Flag Animation */
.category-box-animated {
    position: relative;
    border-radius: 12px; 
    overflow: hidden;
    z-index: 1;
    padding: 2px; /* Flag Border Thickness */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.category-box-animated::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; width: 300%; height: 300%;
    background: conic-gradient(#FF9933 0deg, #FFFFFF 90deg, #138808 180deg, #FFFFFF 270deg, #FF9933 360deg);
    animation: rotateBorderSpin 5s linear infinite;
    z-index: -2;
}

.category-box-inner {
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
    position: relative;
}

/* Original Homepage Index Post Pill Buttons (Referencing User's Screenshot) */
.index-post-btn {
    display: block !important;
    background: #fff !important;
    border: 1px solid #2ecc71 !important; /* Standard Green/Info border from similar archetypes */
    padding: 6px 15px !important;
    border-radius: 30px !important;
    margin-bottom: 8px !important;
    text-decoration: none !important;
    color: #004488 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease-in-out !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.index-post-btn:hover {
    background: #f8fcf9 !important;
    transform: translateX(5px) scale(1.01) !important;
    border-color: #27ae60 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

/* Red Border Variant for certain categories if needed */
.index-post-btn.btn-red { border-color: #e74c3c !important; }
.index-post-btn.btn-blue { border-color: #3498db !important; }

/* Pulse Tags matching image precisely */
.pulseNew { 
    background: #e74c3c !important; 
    color: #fff !important; 
    font-size: 0.65rem !important; 
    padding: 1px 5px !important; 
    border-radius: 3px !important; 
    margin-left: 5px !important; 
    font-weight: bold !important;
    display: inline-block;
    vertical-align: middle;
}

.pulseUpdated { 
    background: #17a2b8 !important; 
    color: #fff !important; 
    font-size: 0.65rem !important; 
    padding: 1px 5px !important; 
    border-radius: 3px !important; 
    margin-left: 5px !important; 
    font-weight: bold !important;
    display: inline-block;
    vertical-align: middle;
}


/* Classic Pulsing Join Buttons */
.sarkari-animated-btn {
    display: inline-flex !important;
    align-items: center;
    background: #FF9933 !important;
    background: linear-gradient(135deg, #FF9933 0%, #cc0000 100%) !important;
    color: #fff !important;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: 0.3s;
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Featured Box Premium Split Glow */
.featured-box {
    display: flex; align-items: center; justify-content: center; text-align: center; 
    font-weight: 800; font-family: 'Segoe UI', Arial, sans-serif;
    text-decoration: none; padding: 6px 12px; font-size: 0.9rem; line-height: 1.3; min-height: 55px; 
    border-radius: 12px;
    border: 2px solid transparent; 
    --box-bg: #333;
    background-image: linear-gradient(var(--box-bg), var(--box-bg)), linear-gradient(90deg, #ff0000 50%, #00cc00 50%);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    color: #fff !important;
    box-shadow: -4px 0 8px rgba(255, 0, 0, 0.3), 4px 0 8px rgba(0, 204, 0, 0.3);
    transition: all 0.2s ease-in-out;
}

.featured-box:hover {
    transform: translateY(-2px);
    box-shadow: -6px 0 12px rgba(255, 0, 0, 0.6), 6px 0 12px rgba(0, 204, 0, 0.6);
}

/* Premium Post Content Styles */
.table-responsive-container {
    width: 100%;
    margin: 25px 0;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.premium-sarkari-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.95rem;
    background: #fff;
    min-width: 600px;
}

.premium-sarkari-table th, 
.premium-sarkari-table td {
    border: 1px solid #ddd !important;
    padding: 12px 15px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.premium-sarkari-table th,
.premium-sarkari-table tr:first-child td {
    background: var(--nav-blue) !important;
    color: #fff !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

.premium-sarkari-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.premium-sarkari-table tr:hover {
    background-color: #f0f7ff;
}

.post-content-area h2, 
.post-content-area h3 {
    color: var(--header-red);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin: 30px 0 15px;
    font-weight: 900;
}

.post-content-area p {
    margin-bottom: 15px;
}

/* Featured Box Grid Layout and Color Mappings */
.top-featured-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 25px; }

@media (max-width: 768px) {
    .top-featured-boxes { grid-template-columns: repeat(2, 1fr); }
}

.box-red { --box-bg: #d92550; }
.box-orange { --box-bg: #f57c00; }
.box-pink { --box-bg: #ff00ff; }
.box-blue { --box-bg: #000099; }
.box-olive { --box-bg: #808000; }
.box-cyan { --box-bg: #0080ff; }
.box-maroon { --box-bg: #800000; }
.box-green { --box-bg: #008000; }
