/**
 * Department Page Styles
 * Modern, Professional Medical Department Template
 */

/* ===== CSS Variables - Uses System Theme Colors from modern-theme.php ===== */
:root {
    --dept-primary: var(--medical-primary, #23458b);
    --dept-secondary: var(--medical-secondary, #ca2027);
    --dept-accent: var(--medical-accent, #23a2e1);
    --dept-light: #f8fafc;
    --dept-dark: #1a202c;
    --dept-gray: #718096;
    --dept-border: #e2e8f0;
    --dept-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --dept-transition: all 0.3s ease;
}

/* ===== Hero Section - Parallax Overlay ===== */
.hero-parallax {
    position: relative;
    min-height: 380px;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    background-color: var(--dept-primary);
}

.hero-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(15, 71, 124, 0.85) 0%, 
        rgba(30, 58, 138, 0.8) 50%,
        rgba(35, 162, 225, 0.75) 100%);
}

.hero-parallax .container {
    position: relative;
    z-index: 1;
}

.hero-parallax .hero-content {
    color: white;
}

.hero-parallax .hero-content.text-center {
    text-align: center;
}

.hero-badge-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-parallax .hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.15;
}

.hero-breadcrumb {
    margin-top: 5px;
}

.hero-breadcrumb .breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.hero-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-breadcrumb .breadcrumb-item a:hover {
    color: white;
}

.hero-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
    content: "/";
}

/* Responsive Hero */
@media (max-width: 991px) {
    .hero-parallax {
        background-attachment: scroll;
        min-height: 320px;
    }
    
    .hero-parallax .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-parallax {
        min-height: 280px;
        padding: 80px 0 50px;
    }
    
    .hero-parallax .hero-title {
        font-size: 2rem;
    }
    
    .hero-badge-pill {
        font-size: 12px;
        padding: 8px 18px;
    }
}

/* ===== Section Common Styles ===== */
.department-section,
.department-about-section {
    padding: 80px 0;
}

.department-section:nth-child(even) {
    background: var(--dept-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dept-dark);
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--dept-primary), var(--dept-accent));
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--dept-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== About Section ===== */
.about-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text-content .section-header {
    text-align: left;
    margin-bottom: 25px;
}

.about-text-content .section-header .about-title::after {
    margin: 15px 0 0;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dept-dark);
}

.about-description {
    color: var(--dept-gray);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.about-description p {
    margin-bottom: 15px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--dept-shadow);
    transition: var(--dept-transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--dept-primary), var(--dept-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.3rem;
    color: white;
}

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dept-dark);
    margin: 0 0 5px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--dept-gray);
    margin: 0;
    line-height: 1.5;
}

/* About Image */
.about-image-content {
    position: relative;
}

.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.about-featured-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.image-overlay-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--dept-secondary), var(--dept-accent));
    border-radius: 20px;
    z-index: -1;
}

/* ===== Services Section ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--dept-shadow);
    transition: var(--dept-transition);
    border: 1px solid var(--dept-border);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

.service-number {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: var(--dept-primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.service-content {
    padding: 25px;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--dept-primary), var(--dept-accent));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dept-dark);
    margin: 0 0 10px;
}

.service-description {
    color: var(--dept-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== Conditions Section ===== */
.conditions-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--dept-shadow);
}

.conditions-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.conditions-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.condition-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--dept-light);
    border-radius: 10px;
    transition: var(--dept-transition);
    border-left: 4px solid transparent;
}

.condition-item:hover {
    background: white;
    border-left-color: var(--dept-primary);
    box-shadow: var(--dept-shadow);
    transform: translateX(5px);
}

.condition-marker {
    width: 10px;
    height: 10px;
    background: var(--dept-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.condition-text {
    font-size: 1rem;
    color: var(--dept-dark);
    font-weight: 500;
}

.conditions-toggle {
    text-align: center;
    margin-top: 30px;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--dept-light);
    border: 2px solid var(--dept-border);
    border-radius: 50px;
    color: var(--dept-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--dept-transition);
}

.toggle-btn:hover {
    background: var(--dept-primary);
    color: white;
    border-color: var(--dept-primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

/* ===== FAQ Section ===== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--dept-shadow);
    overflow: hidden;
    border: 1px solid var(--dept-border);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--dept-transition);
    font-weight: 600;
    color: var(--dept-dark);
    font-size: 1.05rem;
}

.faq-question:hover {
    background: var(--dept-light);
}

.faq-toggle {
    width: 35px;
    height: 35px;
    background: var(--dept-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dept-transition);
    flex-shrink: 0;
}

.faq-toggle i {
    color: var(--dept-primary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    background: var(--dept-primary);
}

.faq-item.active .faq-toggle i {
    color: white;
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--dept-light);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 25px;
}

.faq-answer p {
    color: var(--dept-gray);
    line-height: 1.7;
    margin: 0;
    padding-top: 15px;
    border-top: 1px solid var(--dept-border);
}

/* ===== CTA Section ===== */
.contact-cta {
    background: linear-gradient(135deg, var(--dept-primary) 0%, #1e3a8a 50%, var(--dept-accent) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* CTA Title - Force white text with maximum specificity */
.cta-title,
section.contact-cta .cta-title,
section.contact-cta .cta-content .cta-title,
.contact-cta h2.cta-title,
h2.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
}

/* CTA Subtitle - Force white text with maximum specificity */
.cta-subtitle,
section.contact-cta .cta-subtitle,
section.contact-cta .cta-content .cta-subtitle,
.contact-cta p.cta-subtitle,
p.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.95) !important;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--dept-transition);
    border: 2px solid transparent;
}

.cta-btn.primary {
    background: white;
    color: var(--dept-primary);
}

.cta-btn.primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-btn.secondary:hover {
    background: white;
    color: var(--dept-primary);
    border-color: white;
    transform: translateY(-3px);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .about-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image-content {
        order: -1;
    }
    
    .about-featured-image {
        height: 350px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .catchy-hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .department-section,
    .department-about-section {
        padding: 60px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .conditions-container {
        padding: 25px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .about-text-content .section-header {
        text-align: center;
    }
    
    .about-text-content .section-header .about-title::after {
        margin: 15px auto 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.7rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .faq-question {
        font-size: 0.95rem;
        padding: 15px 20px;
    }
    
    .about-featured-image {
        height: 280px;
    }
}

/* ===== FAQ JavaScript Toggle ===== */
.faq-item .faq-answer {
    padding: 0 25px;
}
