/* ================================================
   HOME PAGE ENHANCED STYLES
   Ideal Education Society
   ================================================ */

/* ---- Stats Bar ---- */
.home-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    border-radius: 12px;
    overflow: hidden;
    margin: 18px 0 24px;
    box-shadow: 0 6px 24px rgba(12, 146, 165, 0.28);
}

.home-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 18px;
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s;
}

.home-stat-item:last-child {
    border-right: none;
}

.home-stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.home-stat-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.home-stat-data strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.home-stat-data span {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

/* ---- Home Layout Grid ---- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-bottom: 30px;
}

.home-main-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.home-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---- Generic Home Card ---- */
.hc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.hc-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.11);
}

.hc-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #fff;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.hc-card-header i {
    font-size: 20px;
}

.hc-card-body {
    padding: 22px;
}

/* ---- About Section ---- */
.home-about-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
    align-items: start;
}

.home-about-img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    display: block;
}

.home-about-text {
    color: #444;
    line-height: 1.9;
    font-size: 15px;
}

.home-about-text h3 {
    color: var(--dark-color);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef4f7;
}

/* ---- Programs Grid ---- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.program-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px 18px;
    border: 2px solid #e4f4f7;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    background: #fcfeff;
}

.program-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(12, 146, 165, 0.28);
}

.program-card-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin-bottom: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(12, 146, 165, 0.25);
}

.program-card:hover .program-card-icon {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.program-card span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* ---- Speech Cards Row ---- */
.home-speech-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.home-speech-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.home-speech-card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.hsc-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #fff;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.hsc-body {
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.hsc-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(12, 146, 165, 0.22);
}

.hsc-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.hsc-quote {
    font-size: 13.5px;
    color: #555;
    font-style: italic;
    line-height: 1.75;
    margin: 10px 0;
    padding: 10px 12px;
    background: #f6fbfc;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 6px 6px 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.hsc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 12px;
}

.hsc-btn:hover {
    background: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 51, 66, 0.3);
}

/* ---- Quick Info Cards Row ---- */
.home-quickinfo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hqi-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
    transition: box-shadow 0.3s, transform 0.3s;
}

.hqi-card:nth-child(2) {
    border-top-color: var(--success-color);
}

.hqi-card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.hqi-card-header {
    padding: 14px 18px;
    font-weight: 700;
    color: var(--dark-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eef2f5;
    background: #f9fbfc;
}

.hqi-card-header i {
    color: var(--primary-color);
    font-size: 20px;
}

.hqi-card:nth-child(2) .hqi-card-header i {
    color: var(--success-color);
}

.hqi-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.hqi-list li {
    border-bottom: 1px solid #f0f4f7;
}

.hqi-list li:last-child {
    border-bottom: none;
}

.hqi-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s;
}

.hqi-list li a i {
    color: var(--primary-color);
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.hqi-card:nth-child(2) .hqi-list li a i {
    color: var(--success-color);
}

.hqi-list li a:hover {
    background: #f0fbfd;
    color: var(--primary-color);
    padding-left: 26px;
}

/* ---- Sidebar Cards ---- */
.hs-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.hs-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #fff;
    padding: 13px 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.hs-card-body {
    padding: 14px 16px;
}

/* Notice Items */
.notice-item-link {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f7;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    align-items: flex-start;
}

.notice-item-link:last-of-type {
    border-bottom: none;
}

.notice-item-link:hover .notice-item-title {
    color: var(--primary-color);
}

.notice-date-badge {
    flex-shrink: 0;
    background: var(--primary-color);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
    font-weight: 700;
}

.notice-date-badge .nd-day {
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
}

.notice-item-title {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    transition: color 0.25s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-new-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
    font-family: Arial, sans-serif;
}

/* Quick Links Sidebar */
.hs-quicklinks {
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.hs-quicklinks li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 2px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f4f7;
    transition: all 0.25s;
}

.hs-quicklinks li:last-child a {
    border-bottom: none;
}

.hs-quicklinks li a i {
    color: var(--primary-color);
    width: 18px;
    font-size: 15px;
    text-align: center;
}

.hs-quicklinks li a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

/* Gallery Preview */
.sidebar-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sidebar-gallery-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    position: relative;
}

.sidebar-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
    display: block;
}

.sidebar-gallery-item:hover img {
    transform: scale(1.12);
}

.sidebar-gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 51, 66, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.sidebar-gallery-item:hover .sidebar-gallery-item-overlay {
    opacity: 1;
}

/* Fallback tile when a gallery image file is missing */
.gallery-photo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(135deg, #0C92A5 0%, #0A3342 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: rgba(255, 255, 255, 0.28);
}

.gallery-home-item .gallery-photo-placeholder {
    font-size: 52px;
}

/* President Card in Sidebar */
.president-card {
    text-align: center;
}

.president-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
    max-height: 240px;
    object-fit: cover;
}

.president-card-name {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 15px;
    margin-bottom: 4px;
}

.president-card-desg {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.5;
}

.president-card-msg {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    font-style: italic;
    padding: 10px;
    background: #f6fbfc;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 6px 6px 0;
    text-align: left;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Teachers Section Home ---- */
.home-teachers-section {
    background: linear-gradient(135deg, #eaf7fa 0%, #f0f8ea 100%);
    border-radius: 14px;
    padding: 38px 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
}

.home-section-heading {
    text-align: center;
    margin-bottom: 30px;
}

.home-section-heading h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.home-section-heading p {
    color: #666;
    font-size: 15px;
}

.section-divider {
    display: inline-block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 8px 0;
}

.home-teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.home-teacher-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    text-align: center;
}

.home-teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 32px rgba(12, 146, 165, 0.22);
}

.teacher-photo-wrap {
    position: relative;
    overflow: hidden;
}

.teacher-photo-wrap img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}

.home-teacher-card:hover .teacher-photo-wrap img {
    transform: scale(1.07);
}

.teacher-photo-placeholder {
    width: 100%;
    height: 230px;
    background: linear-gradient(135deg, #0C92A5 0%, #0A3342 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: rgba(255, 255, 255, 0.22);
}

.home-teacher-info {
    padding: 16px 14px 18px;
}

.home-teacher-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.home-teacher-info p {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.home-teacher-dept {
    display: inline-block;
    background: #e6f7fb;
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ---- Gallery Preview Section ---- */
.home-gallery-section {
    margin-bottom: 28px;
    background: #fff;
    border-radius: 14px;
    padding: 30px 24px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 180px 180px;
    gap: 10px;
}

.gallery-home-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}

.gallery-home-item:first-child {
    grid-row: span 2;
}

.gallery-home-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}

.gallery-home-item:hover img {
    transform: scale(1.08);
}

.gallery-home-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 51, 66, 0.52);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
}

.gallery-home-item:hover .gallery-home-overlay {
    opacity: 1;
}

/* ---- CTA Section ---- */
.home-cta {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    border-radius: 14px;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.home-cta::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.home-cta::after {
    content: '';
    position: absolute;
    bottom: -70px;
    left: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.home-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.home-cta p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
}

.cta-btn-primary:hover {
    background: #e28f08;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
}

/* ---- Scroll To Top Button ---- */
.scroll-top-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9999;
    box-shadow: 0 4px 18px rgba(12, 146, 165, 0.42);
    border: none;
    font-size: 18px;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--dark-color);
    transform: translateY(-4px);
}

/* ---- Hero Slider Upgrade ---- */
.hero-slider-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #0A3342;
    margin-bottom: 0;
}

.hero-slide-item {
    display: none;
    position: relative;
}

.hero-slide-item.active {
    display: block;
}

.hero-slide-item img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 51, 66, 0.82) 0%, rgba(10, 51, 66, 0.25) 70%, transparent 100%);
    display: flex;
    align-items: center;
}

.hero-slide-text {
    padding: 0 60px;
    color: white;
    max-width: 580px;
}

.hero-slide-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-slide-text p {
    font-size: 1.05rem;
    margin-bottom: 22px;
    opacity: 0.93;
}

.hero-slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.hero-slide-btn:hover {
    background: #e28f08;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

/* Slider Controls */
.slider-ctrl-prev,
.slider-ctrl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.45);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    font-size: 18px;
    outline: none;
}

.slider-ctrl-prev {
    left: 14px;
}

.slider-ctrl-next {
    right: 14px;
}

.slider-ctrl-prev:hover,
.slider-ctrl-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Slider Dots */
.slider-dots-wrap {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot-btn {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.slider-dot-btn.active {
    background: var(--secondary-color);
    width: 28px;
    border-radius: 5px;
}

/* Notice Ticker Enhanced */
.notice-ticker-wrap {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border-left: 5px solid var(--secondary-color);
    margin: 14px 0;
    overflow: hidden;
    min-height: 46px;
}

.notice-ticker-label {
    background: var(--secondary-color);
    color: #fff;
    font-weight: 700;
    padding: 10px 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.notice-ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.notice-ticker-content marquee a {
    color: #333;
    text-decoration: none;
    margin-right: 32px;
    font-size: 14px;
}

.notice-ticker-content marquee a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .home-layout {
        grid-template-columns: 1fr 300px;
    }

    .home-teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
    }

    .gallery-home-item:first-child {
        grid-row: span 1;
    }

    .gallery-home-item img {
        height: 160px;
    }
}

@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
    }

    .home-sidebar-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .hero-slide-item img {
        height: 260px;
    }

    .hero-slide-text {
        padding: 0 20px;
    }

    .hero-slide-text h2 {
        font-size: 1.4rem;
    }

    .home-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-about-inner {
        grid-template-columns: 1fr;
    }

    .home-about-img {
        max-height: 220px;
        width: 100%;
    }

    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-speech-row {
        grid-template-columns: 1fr;
    }

    .home-quickinfo-row {
        grid-template-columns: 1fr;
    }

    .home-teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .gallery-home-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    .home-cta {
        padding: 32px 20px;
    }

    .home-cta h2 {
        font-size: 1.5rem;
    }

    .home-sidebar-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .home-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-teacher-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-home-item:first-child {
        grid-column: span 2;
    }
}

/* ==========================================================================
   FAQ accordion (homepage sidebar widget)
   ========================================================================== */
.faq-accordion {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid #f0f4f7;
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 2px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.6;
    color: #10263d;
    transition: color 0.2s;
}

.faq-question:hover,
.faq-question[aria-expanded="true"] {
    color: var(--primary-color);
}

.faq-chevron {
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 13px;
    color: #7b90a3;
    transition: transform 0.28s ease;
}

.faq-question[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 2px 14px;
    font-size: 14px;
    line-height: 1.85;
    color: #46617a;
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Print: answers stay readable */
@media print {
    .faq-answer {
        max-height: none;
    }
}

/* ==========================================================================
   Standalone FAQ page (/faq)
   ========================================================================== */
.faq-count-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}

.faq-page-wrap .faq-item {
    border: 1px solid #e6eef5;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-page-wrap .faq-item:last-child {
    margin-bottom: 0;
}

.faq-page-wrap .faq-item:hover {
    border-color: #cfe0ee;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.faq-page-wrap .faq-question {
    padding: 16px 18px;
    font-size: 16px;
    align-items: center;
}

.faq-page-wrap .faq-question[aria-expanded="true"] {
    border-bottom: 1px solid #eef4f9;
}

.faq-page-wrap .faq-chevron {
    margin-top: 0;
    font-size: 15px;
}

.faq-page-wrap .faq-answer-inner {
    padding: 14px 18px 18px;
    font-size: 15px;
}

.faq-page-cta {
    margin-top: 26px;
    padding: 22px;
    border-radius: 12px;
    background: #f4f9fc;
    border: 1px dashed #cfe0ee;
    text-align: center;
}

.faq-page-cta p {
    margin: 0 0 14px;
    color: #46617a;
    font-size: 15px;
}

@media (max-width: 575px) {
    .faq-page-wrap .faq-question {
        padding: 14px;
        font-size: 15px;
    }

    .faq-page-wrap .faq-answer-inner {
        padding: 12px 14px 16px;
    }
}
