/**
 * Classic Layout CSS — Sarkari Result / FreeJobAlert Style
 * File: /wp-content/themes/xila/assets/css/classic.css
 *
 * Classes: cc-* prefix
 * Used by: classic-core.php (both classic view & keyword pages)
 */

/* ════════════════════════════════════════════════════
   1. WRAP & PAGE HEADER
════════════════════════════════════════════════════ */

.cc-wrap {
    width: 100%;
    padding: 0 0 24px;
}

/* Classic view: feed controls ke neeche thoda space */
.cc-mode-classic .cc-wrap {
    padding-top: 0;
}

.cc-page-header {
    background: linear-gradient(135deg, #1a3c6e 0%, #1d56b0 50%, #2266cc 100%);
    color: #fff;
    padding: 20px 20px 18px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid #1a4a9a;
    position: relative;
    overflow: hidden;
}

.cc-page-header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}

.cc-page-header::after {
    content: '';
    position: absolute;
    bottom: -30px; left: 20%;
    width: 120px; height: 120px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}

.cc-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    text-align: center;
}

.cc-page-desc {
    font-size: 13px;
    color: rgba(255,255,255,.80);
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    text-align: center;
}

/*
.cc-page-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.cc-page-desc {
    font-size: 13px;
    color: rgba(255,255,255,.80);
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
*/ 
/* ════════════════════════════════════════════════════
   2. COLUMNS GRID
════════════════════════════════════════════════════ */

.cc-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1100px) {
    .cc-columns-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .cc-columns-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ════════════════════════════════════════════════════
   3. COLUMN CARD
════════════════════════════════════════════════════ */

.cc-col {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    /* Animation: fade-in from bottom */
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .4s ease, transform .4s ease, box-shadow .2s;
}

.cc-col--visible {
    opacity: 1;
    transform: translateY(0);
}

.cc-col:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.10);
}

/* Column Header — gradient from CSS variables */
.cc-col-header {
    background: linear-gradient(135deg, var(--cc-h1), var(--cc-h2));
    padding: 10px 14px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cc-col-title {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
}

.cc-col-count {
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   4. COLUMN LIST — items
════════════════════════════════════════════════════ */

.cc-col-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 0;
}

/* Individual item — animation delay via inline style */
.cc-col--visible .cc-item {
    opacity: 1;
    transform: translateX(0);
}

.cc-item {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity .35s ease both, transform .35s ease both;
    border-bottom: 1px solid #f3f4f6;
}

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

.cc-item-link {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 7px 12px 7px 10px;
    text-decoration: none;
    color: inherit;
    transition: background .12s;
    position: relative;
}

.cc-item-link:hover {
    background: var(--cc-acc, #eff6ff);
}

/* Left colored dot */
.cc-item-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cc-dot, #3b82f6);
    flex-shrink: 0;
    margin-top: 5px;
    margin-right: 8px;
}

/* Parent post — normal dot */
.cc-item--parent .cc-item-dot {
    background: var(--cc-dot, #3b82f6);
}

/* Update post — slightly different style */
.cc-item--update .cc-item-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,.2);
}

.cc-item--update .cc-item-link {
    background: #fffbf0;
}

.cc-item--update .cc-item-link:hover {
    background: #fef3c7;
}

.cc-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cc-item-title {
    font-size: 12.5px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .12s;
}

.cc-item-link:hover .cc-item-title {
    color: var(--cc-h1, #1a56db);
}

.cc-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.cc-item-date {
    font-size: 10px;
    color: #9ca3af;
    margin-left: auto;
    white-space: nowrap;
    padding-left: 4px;
}

/* Badges */
.cc-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.5;
}

.cc-badge--update  { background: #fef3c7; color: #92400e; }
.cc-s-active       { background: #dcfce7; color: #166534; }
.cc-s-upcoming     { background: #dbeafe; color: #1e40af; }
.cc-s-closed       { background: #fee2e2; color: #991b1b; }
.cc-s-archived     { background: #f3f4f6; color: #6b7280; }

/* ════════════════════════════════════════════════════
   5. COLUMN FOOTER — View More
════════════════════════════════════════════════════ */

.cc-col-footer {
    padding: 8px 12px 10px;
    background: linear-gradient(to bottom, #fafbfc, #f5f7fa);
    border-top: 1px solid #f1f5f9;
}

.cc-viewmore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    background: var(--cc-acc, #eff6ff);
    color: var(--cc-h1, #1a56db);
    border: 1px solid currentColor;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all .15s;
    opacity: .85;
}

.cc-viewmore:hover {
    opacity: 1;
    background: var(--cc-h1, #1a56db);
    color: #fff;
    border-color: var(--cc-h1, #1a56db);
    transform: translateY(-1px);
}

.cc-viewmore svg {
    transition: transform .15s;
    flex-shrink: 0;
}

.cc-viewmore:hover svg {
    transform: translateX(3px);
}

/* ════════════════════════════════════════════════════
   6. SEO SECTION (keyword mode only)
════════════════════════════════════════════════════ */

.cc-seo-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

/* Content blocks */
.cc-seo-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .cc-seo-content { grid-template-columns: 1fr; }
}

.cc-seo-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.cc-seo-block h2 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    line-height: 1.35;
    padding-bottom: 7px;
    border-bottom: 2px solid #eff6ff;
}

.cc-seo-block p {
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* FAQs */
.cc-faq-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.cc-faq-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #1a3c6e 0%, #2266cc 100%);
    margin: 0;
    padding: 14px 18px;
    letter-spacing: -.2px;
}

.cc-faq-list {
    padding: 6px 0;
}

.cc-faq-item {
    border-bottom: 1px solid #f3f4f6;
}

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

.cc-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    text-align: left;
    transition: background .12s, color .12s;
    line-height: 1.4;
}

.cc-faq-q:hover {
    background: #f8fafc;
    color: #1a56db;
}

.cc-faq-item.is-open .cc-faq-q {
    color: #1a56db;
    background: #eff6ff;
}

.cc-faq-icon {
    flex-shrink: 0;
    transition: transform .25s ease;
    color: #94a3b8;
}

.cc-faq-item.is-open .cc-faq-icon {
    transform: rotate(180deg);
    color: #1a56db;
}

.cc-faq-a {
    display: none;
    padding: 0 18px 14px 18px;
    background: #f8fafc;
    animation: ccFaqSlide .2s ease;
}

@keyframes ccFaqSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cc-faq-item.is-open .cc-faq-a { display: block; }

.cc-faq-a p {
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* ════════════════════════════════════════════════════
   7. KEYWORD PAGE LAYOUT overrides
   (xila-layout--keyword — right sidebar हटाना)
════════════════════════════════════════════════════ */

.xila-layout--keyword {
    grid-template-columns: 220px 1fr !important;
    grid-template-areas: "left center" !important;
}

/* right sidebar को keyword layout में hide */
.xila-layout--keyword .xila-sidebar-right {
    display: none !important;
}

/* Keyword page main area — थोड़ी ज़्यादा width */
.xila-main-feed--keyword {
    padding: 16px 20px;
    min-width: 0;
}

@media (max-width: 1024px) {
    .xila-layout--keyword {
        grid-template-columns: 1fr !important;
        grid-template-areas: "center" !important;
    }
}

@media (max-width: 768px) {
    .xila-main-feed--keyword {
        padding: 12px 10px;
    }
}

/* ════════════════════════════════════════════════════
   8. CLASSIC VIEW in index.php (right sidebar hidden)
   index.php में view=classic पर right sidebar नहीं है
   इसलिए layout adjust करना है
════════════════════════════════════════════════════ */

.xila-layout:has(.cc-mode-classic) {
    grid-template-columns: 220px 1fr !important;
    grid-template-areas: "left center" !important;
}

/* Fallback for browsers without :has() support */
.xila-classic-active {
    grid-template-columns: 220px 1fr !important;
    grid-template-areas: "left center" !important;
}

@media (max-width: 1100px) {
    .xila-layout:has(.cc-mode-classic) {
        grid-template-columns: 1fr !important;
        grid-template-areas: "center" !important;
    }
}

/* ════════════════════════════════════════════════════
   9. MOBILE ADJUSTMENTS
════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .cc-page-title { font-size: 15px; }
    .cc-page-desc  { font-size: 12px; }
    .cc-col-title  { font-size: 12px; }
    .cc-item-title { font-size: 12px; }
    .cc-faq-q      { font-size: 13px; padding: 11px 14px; }
    .cc-faq-a      { padding: 0 14px 12px; }
    .cc-seo-block h2 { font-size: 13px; }
    .cc-seo-block p  { font-size: 12.5px; }
}