/*
Theme Name: Kadence Child - GACW Professional
Theme URI: http://gacw.edu.pk
Description: Professional child theme for GACW with modern homepage design
Author: GACW Development Team
Author URI: http://gacw.edu.pk
Template: kadence
Version: 1.0.0
Text Domain: kadence-child
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* CSS Variables for Design System */
:root {
    /* Colors */
    --color-primary: #4a0e0e;
    /* Deep Maroon */
    --color-secondary: #800000;
    /* Rich Maroon */
    --color-accent: #c5a059;
    /* Academic Gold */
    --color-white: #ffffff;
    --color-light-gray: #f3f4f6;
    --color-gray: #6b7280;
    --color-dark-gray: #374151;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Montserrat', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Footer Design Tokens */
    --footer-bg: #2d0505;
    --footer-text: #f3f4f6;
    --footer-border: rgba(255, 255, 255, 0.1);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark-gray);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

/* Parent theme styles */
@import url('../kadence/style.css');

/* ========================================
   Modern Professional Footer
   ======================================== */
.gacw-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 100px 0 0;
    position: relative;
    overflow: hidden;
    font-family: var(--font-body);
    margin-top: 80px;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.footer-col h4.footer-title {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col h4.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

/* Identity Column */
.footer-identity .footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-identity .footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(1.2);
}

.footer-identity .logo-text {
    display: flex;
    flex-direction: column;
}

.footer-identity .logo-text .title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.1;
}

.footer-identity .logo-text .tagline {
    font-size: 0.7rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 8px;
}

/* Contact Card */
.contact-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item .icon {
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-item p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom .copyright p {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-bottom .accent {
    color: var(--color-accent);
    font-weight: 600;
}

.footer-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-meta a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-meta a:hover {
    color: var(--color-white);
}

.footer-meta .sep {
    color: rgba(255, 255, 255, 0.1);
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-identity {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-identity {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding-bottom: 100px;
    }
}

/* ========================================
   History Features - Boxed Layout
   ======================================== */
.history-boxed-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto !important;
    /* Force centering */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Stylized deep shadow */
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: block;
}

.history-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    /* Ensure equal height */
}

/* Left Image Column */
.history-image {
    flex: 0 0 45%;
    /* Image takes 45% width */
    position: relative;
    overflow: hidden;
    min-height: 500px;
    /* Ensure content height */
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the area perfectly */
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

.history-image:hover img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Right Text Column */
.history-text {
    flex: 1;
    /* Takes remaining space */
    padding: 60px 40px;
    /* Generous padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.history-text h2.section-title {
    color: var(--color-primary);
    font-size: 2.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.history-text h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

.history-text p {
    color: var(--color-dark-gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.history-text .lead {
    font-size: 1.15rem;
    color: #333;
    font-weight: 500;
}

/* Highlight Box */
.boxed-highlight {
    background: linear-gradient(to right, #fbfbfb, #f5f5f5);
    border-left: 4px solid var(--color-secondary);
    padding: 25px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.boxed-highlight p {
    font-family: var(--font-heading);
    font-style: italic;
    color: #555;
    margin: 0;
    font-size: 1.1rem;
}

.boxed-highlight::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: rgba(128, 0, 0, 0.05);
    /* Very faint quotation mark */
    line-height: 1;
    z-index: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .history-layout {
        flex-direction: column;
    }

    .history-image {
        flex: none;
        height: 400px;
        /* Fixed height for mobile image */
        width: 100%;
    }

    .history-text {
        padding: 40px 25px;
    }
}

/* ========================================
   Principal Page - Boxed Layout
   ======================================== */
.principal-boxed-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto !important;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: block;
}

.principal-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Left Image Column */
.principal-image {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.principal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Focus on face */
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

.principal-image:hover img {
    transform: scale(1.05);
}

/* Right Text Column */
.principal-text {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.principal-subtitle {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.principal-text h2.section-title {
    color: var(--color-primary);
    font-size: 2.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    line-height: 1.2;
}

.principal-text h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

.principal-body p {
    color: var(--color-dark-gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Signature Box */
.signature-box {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
}

.sig-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.sig-title {
    color: var(--color-gray);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .principal-layout {
        flex-direction: column;
    }

    .principal-image {
        flex: none;
        height: 400px;
        width: 100%;
    }

    .principal-text {
        padding: 40px 25px;
    }
}


/* ========================================
   Faculty SPA Layout
   ======================================== */
.faculty-spa-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Styles */
.faculty-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 120px;
    /* Adjust based on header height */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 30px;
}

.sidebar-header {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-light-gray);
    color: var(--color-primary);
}

.dept-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dept-nav li {
    padding: 12px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--color-gray);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dept-nav li:hover {
    background: var(--color-light-gray);
    color: var(--color-primary);
}

.dept-nav li.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(74, 14, 14, 0.2);
}

.dept-nav li::after {
    content: '';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.dept-nav li.active::after {
    opacity: 1;
    transform: translateX(0);
}

/* Content Area Styles */
.faculty-content-area {
    flex-grow: 1;
    min-height: 600px;
}

.faculty-dept-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.faculty-dept-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 20px;
}

.dept-title {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.dept-desc {
    color: var(--color-gray);
    font-size: 1.1rem;
}

/* Faculty Grid & Cards */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.faculty-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faculty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent);
}

.fac-name {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.fac-role {
    color: var(--color-accent);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.fac-qual {
    color: var(--color-gray);
    font-size: 0.9rem;
}

/* Responsive Faculty SPA */
@media (max-width: 992px) {
    .faculty-spa-container {
        flex-direction: column;
        gap: 30px;
    }

    .faculty-sidebar {
        width: 100%;
        position: static;
        padding: 20px;
    }

    .dept-nav {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 5px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .dept-nav li {
        margin: 0;
        flex: 0 0 auto;
        border: 1px solid #eee;
    }

    .dept-nav li.active {
        border-color: var(--color-primary);
    }

    .dept-nav li::after {
        display: none;
    }
}


/* ========================================
   Faculty Page Refinements
   ======================================== */

/* Principal Round Image */
.faculty-principal-intro .principal-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    /* Remove container bg if any */
    padding: 20px;
}

.faculty-principal-intro .principal-image img {
    position: relative;
    /* Override absolute */
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    /* Focus on face (adjust % if needed) */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 5px solid #fff;
}

/* Faculty Grid Refinements */
.faculty-grid {
    justify-content: center;
    /* Center cards if grid isn't full */
}

.faculty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.faculty-avatar {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}


/* ========================================
   Generic Content Boxed Layout
   ======================================== */
.content-boxed-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Deep shadow */
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 60px 40px;
    display: block;
}

.content-boxed-wrapper h2 {
    color: var(--color-primary);
    font-size: 2.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.content-boxed-wrapper h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

.content-boxed-wrapper p {
    color: var(--color-dark-gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 992px) {
    .content-boxed-wrapper {
        padding: 30px 20px;
        margin: 20px auto;
    }
}


/* ========================================
   Mobile Navigation
   ======================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 992px) {
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 20px 20px;
        transition: right 0.4s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: #fdfdfd;
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        display: block;
    }

    /* Overlay for menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   Core Header & Navigation Styles (Restored)
   ======================================== */
.gacw-header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
    /* High z-index to stay on top */
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    background: #fff;
    /* Ensure opacity */
}

/* Top Bar Visibility Fix */
.top-bar {
    background-color: var(--color-primary);
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
    /* Above header */
}

.top-bar a {
    color: #fff !important;
    /* Force white text */
}

.top-bar-links a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    margin-left: 15px;
    font-size: 0.85rem;
}

/* Logo & Text */
.nav-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    font-family: var(--font-heading);
}

.logo-subtitle {
    color: var(--color-gray);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Logo adjustment */
@media (max-width: 480px) {
    .logo-title {
        font-size: 1.1rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    .logo-content img {
        height: 40px !important;
    }
}

/* Ensure mobile toggle is visible against white */
.mobile-toggle span {
    background-color: var(--color-primary);
}

/* ========================================
   Responsive Content Wrapper Fix
   ======================================== */
@media (max-width: 768px) {

    .content-boxed-wrapper,
    .history-boxed-wrapper,
    .principal-boxed-wrapper {
        padding: 20px !important;
        margin: 20px auto !important;
        width: 95% !important;
        border-radius: 12px !important;
    }

    .program-header h1 {
        font-size: 1.8rem !important;
    }

    .program-details {
        padding: 0 !important;
    }
}

/* ========================================
   Global Hiding of Default Titles
   (Since we use custom headers/hero sections)
   ======================================== */
.entry-hero .entry-header,
.entry-header,
.page-title-inner,
.kadence-breadcrumbs {
    display: none !important;
}