/*
Theme Name: MyEduAlert
Theme URI: https://myedualert.com
Author: MyEduAlert Team
Description: Education News Portal - Jobs, Results, Admissions
Version: 1.0
License: GNU General Public License v2
Text Domain: myedualert
*/

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', 'Noto Sans Devanagari', Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
    font-size: 15px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #1a237e;
    color: #fff;
    padding: 6px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breaking-news {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.breaking-label {
    background: #e53935;
    color: #fff;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 700;
    white-space: nowrap;
    font-size: 12px;
}

.breaking-ticker {
    overflow: hidden;
    white-space: nowrap;
}

.breaking-ticker span {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== HEADER ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 12px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-size: 28px;
    font-weight: 800;
    color: #1a237e;
    letter-spacing: -1px;
}

.site-logo span {
    color: #e53935;
}

.header-search input {
    padding: 8px 15px;
    border: 2px solid #1a237e;
    border-radius: 25px 0 0 25px;
    outline: none;
    width: 220px;
    font-size: 14px;
}

.header-search button {
    padding: 8px 15px;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
}

/* ===== LOGO SIZE ===== */
.site-logo img,
.custom-logo {
    width: auto;
    height: 60px;        /* Height fix */
    max-width: 280px;    /* Max width */
    object-fit: contain;
}

/* Mobile par chota */
@media (max-width: 768px) {
    .site-logo img,
    .custom-logo {
        height: 45px;
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .site-logo img,
    .custom-logo {
        height: 38px;
        max-width: 150px;
    }
}


/* ===== NAVIGATION ===== */
.main-nav {
    background: #1a237e;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav ul li a {
    display: block;
    color: #fff;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    background: #e53935;
}

/* ===== HOMEPAGE LAYOUT ===== */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    padding: 20px 0;
}

/* ===== CATEGORY SECTIONS ===== */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a237e;
    border-left: 4px solid #e53935;
    padding-left: 10px;
    margin-bottom: 15px;
}

.post-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    padding: 10px;
    transition: box-shadow 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-card img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.post-card-content h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.post-card-content h3 a:hover {
    color: #e53935;
}

.post-meta {
    font-size: 12px;
    color: #888;
}

.category-badge {
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 5px;
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #1a237e;
    margin: -15px -15px 15px;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
}

/* ===== UNIVERSITY DIRECTORY ===== */
.university-page {
    padding: 20px 0;
}

.filter-bar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #1a237e;
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-btn {
    background: #1a237e;
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.state-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.state-tab {
    padding: 6px 16px;
    background: #fff;
    border: 2px solid #1a237e;
    border-radius: 25px;
    color: #1a237e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.state-tab:hover,
.state-tab.active {
    background: #1a237e;
    color: #fff;
}

.university-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.university-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-top: 4px solid #1a237e;
    transition: transform 0.3s, box-shadow 0.3s;
}

.university-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.university-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 10px;
}

.university-card .uni-meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.uni-meta span {
    font-weight: 600;
    color: #222;
}

.uni-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.type-central { background: #e3f2fd; color: #1565c0; }
.type-state { background: #e8f5e9; color: #2e7d32; }
.type-private { background: #fff3e0; color: #e65100; }
.type-deemed { background: #f3e5f5; color: #6a1b9a; }

.uni-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.uni-btn {
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.3s;
}

.uni-btn:hover { opacity: 0.85; }
.btn-result { background: #e53935; color: #fff; }
.btn-admission { background: #1a237e; color: #fff; }
.btn-detail { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
.btn-website { background: #43a047; color: #fff; }

/* ===== SINGLE UNIVERSITY PAGE ===== */
.university-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.university-detail h1 {
    font-size: 26px;
    color: #1a237e;
    margin-bottom: 5px;
}

.uni-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.uni-info-item label {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 3px;
}

.uni-info-item strong {
    font-size: 15px;
    color: #222;
}

.important-links {
    margin-top: 20px;
}

.important-links h2 {
    font-size: 18px;
    color: #1a237e;
    border-left: 4px solid #e53935;
    padding-left: 10px;
    margin-bottom: 15px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.link-card {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #1a237e;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.link-card:hover {
    border-color: #1a237e;
    background: #e8eaf6;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a237e;
    color: #fff;
    padding: 40px 0 0;
    margin-top: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e53935;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget ul li a {
    color: #ccc;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: #fff;
}

.footer-bottom {
    background: #0d1757;
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #aaa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .university-grid {
        grid-template-columns: 1fr;
    }

    .uni-info-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        flex-direction: column;
    }
}

/* ================================================
   MOBILE RESPONSIVE - COMPLETE FIX
   MyEduAlert Theme
   ================================================ */

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {

    .container { padding: 0 12px; }

    .home-layout {
        grid-template-columns: 1fr 280px;
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .university-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .uni-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE LARGE (max 768px) ===== */
@media (max-width: 768px) {

    /* ----- BODY ----- */
    body { font-size: 14px; }

    /* ----- TOP BAR ----- */
    .top-bar .container {
        flex-direction: column;
        gap: 5px;
        padding: 8px 12px;
        text-align: center;
    }

    .breaking-news { justify-content: center; }

    /* ----- HEADER ----- */
    .header-inner {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .site-logo a { font-size: 22px; }

    .header-search {
        width: 100%;
    }

    .header-search input {
        width: calc(100% - 50px);
        font-size: 13px;
        padding: 8px 12px;
    }

    .header-search button {
        padding: 8px 12px;
    }

    /* ----- NAVIGATION ----- */
    .main-nav ul {
        flex-direction: column;
        display: none;
    }

    .main-nav ul.nav-open {
        display: flex;
    }

    .main-nav ul li a {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 13px;
    }

    .nav-toggle-btn {
        display: flex !important;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        background: #1a237e;
        color: #fff;
        border: none;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    /* ----- HOME LAYOUT ----- */
    .home-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }

    /* Sidebar mobile mein neeche jayegi */
    .home-layout aside {
        order: 2;
    }

    .home-layout main {
        order: 1;
    }

    /* ----- POST CARDS ----- */
    .post-card {
        flex-direction: row;
        gap: 10px;
        padding: 8px;
    }

    .post-card img {
        width: 80px;
        height: 65px;
    }

    .post-card-content h3 {
        font-size: 13px;
    }

    /* ----- SECTION TITLE ----- */
    .section-title {
        font-size: 16px;
    }

    /* ----- UNIVERSITY GRID ----- */
    .university-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* ----- UNIVERSITY CARD ----- */
    .university-card {
        padding: 15px;
    }

    .university-card h3 {
        font-size: 15px;
    }

    .uni-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .uni-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* ----- FILTER BAR ----- */
    .filter-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .filter-bar input,
    .filter-bar select {
        width: 100%;
        font-size: 14px;
    }

    .filter-btn {
        width: 100%;
        padding: 10px;
    }

    /* ----- STATE TABS ----- */
    .state-tabs {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .state-tabs::-webkit-scrollbar { display: none; }

    .state-tab {
        white-space: nowrap;
        font-size: 12px;
        padding: 5px 12px;
        flex-shrink: 0;
    }

    /* ----- UNIVERSITY DETAIL PAGE ----- */
    .university-detail {
        padding: 15px;
    }

    .university-detail h1 {
        font-size: 20px;
    }

    .uni-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .uni-info-item label {
        font-size: 11px;
    }

    .uni-info-item strong {
        font-size: 14px;
    }

    /* Quick Action Buttons */
    .uni-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .uni-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        text-align: center;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    /* Important Links */
    .link-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .link-card {
        padding: 10px;
        font-size: 13px;
    }

    /* ----- RESULTS/ADMISSION TABLE ----- */
    /* Mobile par table scroll hogi */
    .table-responsive-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    /* Table columns adjust */
    table th:nth-child(1),
    table td:nth-child(1) {
        display: none; /* # column hide */
    }

    table th,
    table td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    table td a {
        font-size: 12px !important;
    }

    /* Status badge */
    table td span {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }

    /* Action button in table */
    table td a[style*="border-radius:5px"] {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }

    /* ----- HUB PAGE ----- */
    .hub-hero { padding: 30px 0 25px; }
    .hub-hero h1 { font-size: 20px; }
    .hub-hero p { font-size: 14px; }

    .hub-search-box {
        flex-direction: row;
        max-width: 100%;
    }

    .hub-search-box input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .hub-search-box button {
        padding: 10px 15px;
        font-size: 13px;
    }

    .hub-stats {
        gap: 15px;
        margin-top: 20px;
    }

    .hub-stat-item strong { font-size: 22px; }
    .hub-stat-item span   { font-size: 12px; }

    .hub-filter-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .hub-filter-bar select {
        width: 100%;
    }

    .result-count {
        margin-left: 0;
        text-align: center;
    }

    /* State Nav - Horizontal Scroll */
    .state-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .state-nav::-webkit-scrollbar { display: none; }

    .state-nav-btn {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 12px;
        padding: 6px 12px;
    }

    /* University Table - Mobile Card View */
    .uni-table thead { display: none; }

    .uni-table tbody tr {
        display: block;
        padding: 12px;
        margin-bottom: 10px;
        border: 1px solid #eee;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    .uni-table td {
        display: flex;
        align-items: flex-start;
        padding: 5px 0 !important;
        border: none !important;
        font-size: 13px !important;
    }

    .uni-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #555;
        min-width: 90px;
        font-size: 11px;
        padding-top: 2px;
        flex-shrink: 0;
    }

    .uni-name-cell { min-width: unset; }

    .action-links {
        flex-wrap: wrap;
        gap: 5px;
    }

    .action-links a {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* State Header */
    .state-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 12px 15px;
    }

    .state-header h2 { font-size: 16px; }

    /* ----- EEAT AUTHOR BOX ----- */
    .eeat-author-box { border-radius: 8px; }

    .eeat-meta-bar {
        flex-direction: column;
        gap: 6px;
        padding: 10px 15px;
        font-size: 12px;
    }

    .eeat-author-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
        gap: 12px;
    }

    .eeat-author-img {
        width: 80px;
        height: 80px;
    }

    .eeat-name-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .eeat-author-name { font-size: 17px; }

    .eeat-designation {
        justify-content: center;
        font-size: 13px;
    }

    .eeat-bio { font-size: 13px; }

    .eeat-expertise { justify-content: center; }

    .eeat-footer-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .eeat-social { justify-content: center; }

    .eeat-trust-bar {
        padding: 10px 15px;
        gap: 8px;
        justify-content: center;
    }

    .trust-item { font-size: 11px; }

    /* ----- FOOTER ----- */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-widget h4 { font-size: 14px; }
    .footer-widget ul li a { font-size: 12px; }

    .footer-bottom {
        font-size: 12px;
        padding: 12px;
    }

    /* ----- SIDEBAR WIDGETS ----- */
    .sidebar-widget { padding: 12px; }
    .widget-title { font-size: 14px; padding: 8px 12px; }

    /* ----- RELATED POSTS ----- */
    .related-posts-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* ----- BREADCRUMB ----- */
    .breadcrumb-wrap {
        font-size: 12px;
        white-space: nowrap;
        overflow-x: auto;
    }
}

/* ===== MOBILE SMALL (max 480px) ===== */
@media (max-width: 480px) {

    /* ----- HEADER ----- */
    .site-logo a { font-size: 20px; }

    /* ----- POST CARD ----- */
    .post-card img {
        width: 70px;
        height: 55px;
    }

    .post-card-content h3 { font-size: 12px; }

    /* ----- UNI BUTTONS ----- */
    .uni-btn {
        min-width: 100%;
        font-size: 13px !important;
    }

    /* ----- LINK GRID ----- */
    .link-grid {
        grid-template-columns: 1fr;
    }

    /* ----- HUB STATS ----- */
    .hub-stats { gap: 12px; }
    .hub-stat-item strong { font-size: 20px; }

    /* ----- FOOTER ----- */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* ----- TRUST BAR ----- */
    .eeat-trust-bar {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    /* ----- RELATED POSTS ----- */
    .related-posts-grid {
        grid-template-columns: 1fr !important;
    }

    /* ----- TABLE ----- */
    table th:nth-child(3),
    table td:nth-child(3) {
        display: none; /* Date column hide on very small */
    }

    /* ----- UNIVERSITY INFO ----- */
    .university-detail h1 { font-size: 18px; }

    .uni-info-grid { padding: 12px; }

    /* ----- AUTHOR BOX ----- */
    .eeat-author-img {
        width: 70px;
        height: 70px;
    }

    .eeat-author-name { font-size: 16px; }
}

/* ===== MOBILE EXTRA SMALL (max 360px) ===== */
@media (max-width: 360px) {

    .container { padding: 0 8px; }

    .site-logo a { font-size: 18px; }

    .hub-hero h1 { font-size: 18px; }

    .section-title { font-size: 15px; }

    .uni-btn { padding: 8px 6px !important; font-size: 12px !important; }

    .eeat-verified-badge { font-size: 10px; padding: 2px 8px; }
}
