/*
Theme Name: CCR - Responsive Styles
Author: flyingstars
Description: Tablet and Mobile responsive styles for the CCR theme.
*/

/* ================================================================
   TABLET BREAKPOINT
   ================================================================ */
@media (max-width: 1024px) {

    .header-branding {
        min-height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .brand-logo {
        height: 52px;
    }

    .brand-center {
        padding: 0 16px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .main-menu>li>a {
        padding: 12px 12px;
        font-size: 0.9rem;
    }
}

/* ================================================================
   MOBILE BREAKPOINT
   ================================================================ */
@media (max-width: 768px) {

    /* --- Header Branding (compact row) --- */
    .header-branding {
        flex-wrap: nowrap;
        justify-content: flex-start;
        text-align: left;
        padding: 10px 0;
        gap: 10px;
    }

    .brand-left {
        gap: 8px;
        flex-shrink: 0;
    }

    .brand-logo {
        height: 40px;
    }

    .brand-center {
        flex-grow: 1;
        width: auto;
        text-align: left;
        padding: 0 8px;
    }

    .site-title {
        font-size: 0.95rem;
    }

    .site-subtitle {
        font-size: 0.78rem;
    }

    .site-subtitle::after {
        left: 0;
        transform: none;
    }

    /* Hide desktop-only elements */
    .brand-right {
        display: none;
    }

    .header-social {
        display: none;
    }

    /* --- Mobile Compact Nav Bar --- */
    .mobile-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: var(--primary-green);
        padding: 0 16px;
        min-height: 40px;
    }

    .mobile-nav-bar__home {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        text-decoration: none;
        font-family: var(--font-body);
        font-weight: 600;
        font-size: 0.9rem;
        padding: 8px 0;
    }

    .mobile-nav-bar__home svg {
        flex-shrink: 0;
    }

    .mobile-nav-bar__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px 0;
    }

    /* --- Hide Desktop Navigation on Mobile --- */
    .main-navigation {
        display: none !important;
    }

    /* ============================================================
       MOBILE MENU PANEL (slide-down overlay)
       ============================================================ */
    .mobile-menu-panel {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        z-index: 9999;
        flex-direction: column;
        overflow-y: auto;
    }

    .mobile-menu-panel.active {
        display: flex;
    }

    /* Panel Header: "Menu" + X */
    .mobile-menu-panel__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .mobile-menu-panel__title {
        font-family: var(--font-heading);
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .mobile-menu-panel__close {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-primary);
        padding: 4px;
    }

    /* Panel Body: the menu items */
    .mobile-menu-panel__body {
        flex-grow: 1;
        overflow-y: auto;
    }

    .mobile-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu>li {
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu>li>a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        color: var(--text-primary);
        text-decoration: none;
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 0.95rem;
        transition: background-color 0.2s ease;
    }

    .mobile-menu>li>a:hover {
        background-color: var(--bg-soft);
    }

    /* Home icon for the first item */
	 .mobile-menu>li:first-child>a {
        justify-content: flex-start;
    }
    .mobile-menu>li:first-child>a::before {
        content: '';
        display: inline-block;
        width: 18px;
        height: 18px;
        margin-right: 8px;
        flex-shrink: 0;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231F5A3A' viewBox='0 0 20 20'%3E%3Cpath d='M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Dropdown arrow for parent items (▼) */
    .mobile-menu>li.menu-item-has-children>a::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid var(--text-primary);
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

    .mobile-menu>li.menu-item-has-children.sub-menu-open>a::after {
        transform: rotate(180deg);
    }

    /* Sub-menus in panel */
    .mobile-menu .sub-menu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: var(--bg-soft);
    }

    .mobile-menu>li.sub-menu-open>.sub-menu {
        display: block;
    }

    .mobile-menu .sub-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu .sub-menu li:last-child {
        border-bottom: none;
    }

    .mobile-menu .sub-menu li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px 12px 36px;
        color: var(--primary-green);
        text-decoration: none;
        font-size: 0.9rem;
        transition: background-color 0.2s ease;
    }

    .mobile-menu .sub-menu li a:hover {
        background-color: #eef1ee;
    }

    /* Panel Footer: social icons + CTA */
    .mobile-menu-panel__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-top: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .mobile-menu-panel__social {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .mobile-menu-panel__social a {
        color: var(--text-primary);
        display: inline-flex;
        transition: color 0.2s ease;
    }

    .mobile-menu-panel__social a:hover {
        color: var(--primary-green);
    }

    .btn-cta--mobile {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    /* --- Footer Responsive (Mobile) --- */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

    .footer-brand__divider {
        margin: 10px auto;
    }

    .footer-bottom__inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-bottom__links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-bottom__social {
        justify-content: center;
    }

    /* --- Hero Section Responsive (Mobile) --- */
    .hero-section {
        padding-top: 40px;
        padding-bottom: 60px;
        margin-bottom: 40px;
        text-align: center;
    }

    .hero-container {
        align-items: center;
    }

    .hero-overlay {
        width: 100%;
        background: linear-gradient(180deg, rgba(5, 26, 14, 0.85) 0%, rgba(5, 26, 14, 0.7) 60%, rgba(5, 26, 14, 0.6) 100%);
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-welcome {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .hero-subtitle-group {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .hero-divider {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 24px;
    }

    .hero-divider-line {
        width: 40px;
        height: 2px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 12px;
    }

    .btn-hero {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Hero Cards Mobile */
    .hero-cards {
        position: relative;
        bottom: 0;
        margin-top: 30px;
    }

    .hero-cards-grid {
        grid-template-columns: 1fr 1fr;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .hero-card {
        padding: 16px 8px;
        min-height: 110px;
        border-bottom: 1px solid #f0f0f0;
    }

    .hero-card:nth-child(2n) {
        border-right: none;
    }

    .hero-card:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* ================================================================
   HERO TABLET (Custom breakpoint for hero)
   ================================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-section {
        padding-top: 80px;
        padding-bottom: 100px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-card {
        border-bottom: 1px solid #f0f0f0;
    }

    .hero-card:nth-child(3n) {
        border-right: none;
    }

    .hero-card:nth-last-child(-n+3) {
        border-bottom: none;
    }
}

/* ================================================================
   PATRON SECTION RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .patron-section {
        padding: 50px 0;
    }

    .margin-top-large {
        margin-top: 0;
        /* No heavy overlap on mobile */
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 2rem;
        gap: 12px;
    }

    .title-line {
        width: 30px;
    }

    .section-description {
        font-size: 1rem;
    }

    .patron-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .patron-card {
        padding: 24px;
    }

    .patron-card__image {
        max-width: 200px;
    }

    /* --- Team Section Responsive --- */
    .team-section {
        padding: 50px 0;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .team-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .team-title {
        justify-content: center;
        /* Center on mobile */
    }

    .team-description {
        text-align: center;
        max-width: 100%;
        font-size: 1rem;
    }

    .team-card-wrapper {
        width: 100%;
    }

    .team-card {
        max-width: 340px;
        /* Slightly smaller on mobile */
        padding: 20px;
    }

    /* --- About Section Responsive --- */
    .about-section {
        padding: 50px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }

    .about-card {
        padding: 30px 20px;
        text-align: center;
    }

    .about-card__icon {
        margin: 0 auto 20px;
        /* Center icon */
    }

    .about-card__divider {
        margin: 0 auto 20px;
        /* Center divider */
    }

    /* --- Events Section Responsive --- */
    .events-section {
        padding: 50px 0;
    }

    .events-title {
        font-size: 2.5rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }

    .event-date-badge {
        margin-bottom: 20px;
    }

    .event-content {
        width: 100%;
    }

    /* --- Notification Section Responsive --- */
    .notification-section {
        padding: 40px 0;
    }

    .notification-card {
        border-radius: 8px;
    }

    .notification-header {
        padding: 16px 20px;
    }

    .notification-header__title {
        font-size: 1.2rem;
    }

    .notification-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
        gap: 8px;
    }

    .notification-item__content {
        padding-right: 0;
        align-items: flex-start;
        width: 100%;
    }

    .notification-item__content::before {
        margin-top: 6px;
    }

    .notification-item__date {
        font-size: 0.85rem;
        color: #999;
        margin-left: 20px;
    }

    .notification-footer {
        padding: 16px 20px 24px;
    }

    /* --- About Us Page Responsive --- */
}

@media (max-width: 991px) {

    .about-grid,
    .founder-grid,
    .mission-vision-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-title {
        font-size: 1.6rem;
        padding: 0 20px;
    }

    .about-subtitle {
        font-size: 1rem;
    }

    .mou-grid {
        grid-template-columns: 1fr;
    }

    .mou-content-col {
        padding: 40px 25px;
    }

    .mou-content-title {
        font-size: 1.5rem;
    }

    .mou-image-col {
        padding: 30px;
    }
}

@media (max-width: 768px) {

    /* Existing 768px rules... */
    .founder-name {
        font-size: 1.6rem;
    }
}

@media (max-width: 575px) {
    .about-title {
        font-size: 1.4rem;
        padding: 0 10px;
    }

    .mou-content-title {
        font-size: 1.3rem;
    }

    .founder-name {
        font-size: 1.4rem;
    }

    .mou-card {
        border-radius: 20px;
    }
}

/* ================================================================
   TEAM SECTION RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .faculty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .team-featured-card {
        margin: 40px auto;
    }

    .featured-card-inner {
        flex-direction: column;
        text-align: center;
    }

    .featured-image-col {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding-bottom: 0;
    }

    .featured-content-col {
        padding: 30px;
    }

    .featured-content-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 575px) {
    .faculty-grid {
        grid-template-columns: 1fr;
    }

    .featured-content-title {
        font-size: 1.6rem;
    }

    .featured-description {
        font-size: 1rem;
    }

    .team-featured-card {
        border-radius: 20px;
    }
}

/* ================================================================
   MEDIA CENTRE RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .news-section {
        padding-top: 60px;
        padding-bottom: 80px;
    }

    .btn-news-all {
        margin-top: 40px;
    }
}

@media (max-width: 767px) {
    .news-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 40px auto 0;
		margin-bottom:30px;
    }

    .news-title {
        font-size: 1.3rem;
    }
}

/* News Archive Specifics */
.archive-header {
    text-align: center;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
		justify-items:center;
				margin-bottom:30px;

		
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
				margin-bottom:30px;

    }

    .about-title {
        font-size: 2.2rem;
    }
}


@media (max-width: 1024px) {
    .news-single-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .article-sidebar {
        position: static;
        padding-bottom: 20px;
    }

    .article-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 767px) {
    .news-single-content {
        padding-top: 40px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-subheading {
        font-size: 1.5rem;
    }

    .article-body {
        font-size: 1.1rem;
    }

    .news-single-page .page-breadcrumb {
        padding: 40px 0;
    }

    .sidebar-title {
        font-size: 1.25rem;
    }
}