/* Center Home CSS */
.center-header {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.center-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 95, 0.8);
}

.center-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 25px;
    color: var(--text-light);
}

.center-logo img {
    height: 160px;
    width: 160px; /* Ensure aspect ratio if it was square, or just height is fine but usually logos here are circular */
    border-radius: 50%;
    border: 4px solid var(--secondary);
    object-fit: cover; /* Good practice if we set width */
    background: #fff; /* In case transparency looks bad against bg */
}

.logo-placeholder {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: 50%;
    font-size: 4rem; /* Increased font size */
    color: var(--primary);
}

.center-title h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.center-title p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.center-nav {
    background: var(--bg-primary);
    border-bottom: 3px solid var(--secondary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.center-nav .container {
    display: flex;
    gap: 5px;
}

.center-nav a {
    padding: 15px 25px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.center-nav a:hover,
.center-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.center-content {
    padding: 40px 0;
}

.center-about,
.center-manager,
.center-contact,
.center-news {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Head Section (Manager) */
.center-head {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--secondary); /* Distinct top border */
}

.head-card {
    display: flex;
    align-items: center;
    gap: 30px;
}

.head-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--secondary); /* Gold border */
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.2);
}

.head-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.head-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: 2.5rem;
    color: var(--secondary);
}

.head-info h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 800;
}

.head-info span {
    display: inline-block;
    color: #fff;
    background: var(--secondary);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.head-contact {
    font-style: italic;
    color: var(--text-secondary);
}


/* Staff Section */
.center-staff {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.staff-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Side Decoration */
.staff-card::before {
    content: '';
    position: absolute;
    top: 15%;
    right: 0; 
    bottom: 15%;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px 0 0 4px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* RTL Support for decoration */
[dir="ltr"] .staff-card {
    text-align: left;
}

[dir="ltr"] .staff-card::before {
    right: auto;
    left: 0;
    border-radius: 0 4px 4px 0;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30, 58, 95, 0.08);
}

.staff-card:hover::before {
    opacity: 1;
    top: 0;
    bottom: 0;
}

.staff-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    padding: 2px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.staff-card:hover .staff-image {
    transform: scale(1.05);
}

.staff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.staff-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: 1.8rem;
    color: var(--text-secondary);
}

.staff-info {
    flex-grow: 1;
}

.staff-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.staff-info span {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary); 
    margin-bottom: 5px;
}

.position-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}



/* Departments Grid */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.dept-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.dept-card:hover {
    background: var(--bg-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.dept-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
    box-shadow: 0 4px 10px rgba(30, 58, 95, 0.3);
}

.dept-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.dept-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.dept-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.dept-link:hover {
    gap: 12px;
}

/* Map & Contact */
.contact-container {
    padding-top: 10px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.contact-item i {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-top: 4px;
}

.center-map {
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--bg-secondary);
}

.map-frame {
    height: 100%;
}

.map-frame iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
    border: 0;
    display: block; /* Removes inline spacing */
}

/* Social Buttons */
.btn-facebook {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1877F2;
    color: #fff !important; /* Force white text */
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.2);
    margin-top: 5px;
}

.btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3);
}

.btn-facebook i {
    color: #fff !important; /* Override default icon color */
    font-size: 1rem;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    gap: 15px;
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--secondary);
    opacity: 0.5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}



/* Refactored extracted styles */

.head-section {
    margin-bottom: 30px;
}

.link-reset {
    text-decoration: none;
    color: inherit;
}

.head-contact-detail {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.staff-contact-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.head-card .staff-contact-info {
    margin-top: 15px;
}

.staff-contact-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.head-card .staff-contact-item {
    font-size: 0.9rem;
}

.staff-contact-icon {
    color: var(--secondary);
    margin-left: 5px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.news-placeholder {
    background: var(--primary);
    width: 100%;
    height: 100%;
}

.facebook-icon {
    color: #1877F2;
}

/* =========================================
   Responsive - Center Home
   ========================================= */

@media (max-width: 992px) {
    .center-header {
        height: 250px;
    }

    .center-title h1 {
        font-size: 2rem;
    }

    .center-logo img {
        height: 120px;
        width: 120px;
    }

    .logo-placeholder {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .center-nav a {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }

    .departments-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .center-header {
        height: 220px;
    }

    .center-header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .center-logo img {
        height: 90px;
        width: 90px;
    }

    .logo-placeholder {
        width: 90px;
        height: 90px;
        font-size: 2.5rem;
    }

    .center-title h1 {
        font-size: 1.6rem;
    }

    .center-title p {
        font-size: 0.95rem;
    }

    .center-nav .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .center-nav a {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .center-content {
        padding: 25px 0;
    }

    .center-about,
    .center-manager,
    .center-contact,
    .center-news,
    .center-head,
    .center-staff {
        padding: 20px;
        margin-bottom: 20px;
    }

    .head-card {
        gap: 20px;
    }

    .head-image {
        width: 90px;
        height: 90px;
    }

    .head-info h3 {
        font-size: 1.3rem;
    }

    .staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        gap: 15px;
    }

    .staff-card {
        padding: 15px;
        gap: 15px;
    }

    .staff-image {
        width: 75px;
        height: 75px;
    }

    .staff-info h4 {
        font-size: 1rem;
    }

    .departments-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .dept-card {
        padding: 20px;
    }

    .dept-card h3 {
        font-size: 1.05rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .center-map {
        min-height: 250px;
    }

    .map-frame iframe {
        min-height: 250px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .center-header {
        height: 180px;
    }

    .center-logo img {
        height: 70px;
        width: 70px;
    }

    .logo-placeholder {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .center-title h1 {
        font-size: 1.3rem;
    }

    .center-title p {
        font-size: 0.85rem;
    }

    .center-nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    .center-about,
    .center-manager,
    .center-contact,
    .center-news,
    .center-head,
    .center-staff {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: var(--border-radius);
    }

    .head-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .head-image {
        width: 80px;
        height: 80px;
    }

    .head-info h3 {
        font-size: 1.15rem;
    }

    .head-info span {
        font-size: 0.8rem;
        padding: 4px 14px;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }

    .staff-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .staff-card::before {
        width: 100%;
        height: 4px;
        top: 0;
        right: 0;
        left: 0;
        bottom: auto;
        border-radius: 4px 4px 0 0;
    }

    .staff-image {
        width: 80px;
        height: 80px;
        margin: 0 auto 10px;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .dept-card {
        padding: 15px;
    }

    .dept-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .contact-item {
        padding: 12px;
        gap: 10px;
    }

    .center-map {
        min-height: 200px;
    }

    .map-frame iframe {
        min-height: 200px;
    }

    .btn-facebook {
        padding: 5px 15px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .center-header {
        height: 150px;
    }

    .center-logo img {
        height: 55px;
        width: 55px;
    }

    .center-title h1 {
        font-size: 1.1rem;
    }

    .head-image {
        width: 70px;
        height: 70px;
    }

    .head-info h3 {
        font-size: 1rem;
    }

    .staff-image {
        width: 70px;
        height: 70px;
    }

    .staff-info h4 {
        font-size: 0.95rem;
    }

    .staff-contact-item {
        font-size: 0.8rem;
    }

    .dept-card h3 {
        font-size: 0.95rem;
    }

    .dept-card p {
        font-size: 0.8rem;
    }
}