/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #a82024;
    --secondary-color: #8a1a1e;
    --accent-color: #d42a2f;
    --text-dark: #2d3748;
    --text-light: #718096;
    --background-light: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Override Bootstrap primary colors */
    --bs-primary: #a82024;
    --bs-primary-rgb: 168, 32, 36;
    --bs-secondary: #8a1a1e;
    --bs-secondary-rgb: 138, 26, 30;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ===== HEADER STYLES ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Company Header Styles */
.company-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.company-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23f8f9fa08" points="0,1000 1000,200 1000,1000"/></svg>');
    pointer-events: none;
}

.company-brand {
    transition: all 0.3s ease;
}

.company-brand:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.company-logo {
    height: 60px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.company-text {
    text-align: left;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.company-tagline {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Responsive company header adjustments */
@media (max-width: 768px) {
    .company-logo {
        height: 50px;
        max-width: 100px;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
    
    .company-tagline {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .company-header {
        padding: 1rem 0;
    }
    
    .company-logo {
        height: 45px;
        max-width: 80px;
        margin-right: 1rem !important;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .company-text {
        text-align: center;
    }
    
    .company-brand {
        flex-direction: column;
        text-align: center;
    }
    
    .company-logo {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

/* Old navbar logo styles (kept for footer) */
.navbar-logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    margin-right: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .navbar-logo {
        height: 40px;
        max-width: 120px;
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 35px;
        max-width: 100px;
        margin-right: 8px;
    }
}

.top-bar {
    font-size: 14px;
}

.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand h3 {
    margin: 0;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 8px;
    padding: 10px 18px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text-dark);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 120px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,200 1000,1000"/></svg>');
    pointer-events: none;
}

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

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ===== BLOG HERO SECTION ===== */
.blog-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.blog-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.blog-hero-section .container {
    z-index: 2;
}

.blog-hero-section .hero-title {
    font-size: 2.8rem; /* Keep original font size */
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero-section .breadcrumb {
    margin-bottom: 2rem;
}

.blog-hero-section .blog-meta {
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== CONTACT HERO SECTION ===== */
.contact-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.contact-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.contact-hero-section .container {
    z-index: 2;
}

.contact-hero-section .hero-title {
    font-size: 2.8rem; /* Keep original font size */
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.contact-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== ABOUT HERO SECTION ===== */
.about-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.about-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.about-hero-section .container {
    z-index: 2;
}

.about-hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.about-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== SERVICES HERO SECTION ===== */
.services-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.services-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.services-hero-section .container {
    z-index: 2;
}

.services-hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.services-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== TEAM HERO SECTION ===== */
.team-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.team-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.team-hero-section .container {
    z-index: 2;
}

.team-hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.team-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== BLOG LIST HERO SECTION ===== */
.blog-list-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.blog-list-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.blog-list-hero-section .container {
    z-index: 2;
}

.blog-list-hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-list-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== SERVICE HERO SECTION ===== */
.service-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.service-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 32, 36, 0.4) 0%, rgba(138, 26, 30, 0.4) 100%);
    z-index: 1;
}

.service-hero-section .container {
    z-index: 2;
}

.service-hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.service-hero-section .hero-subtitle {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.service-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.team-card .card-img-top {
    height: 300px;
}

.testimonial-card {
    padding: 2rem;
    background-color: var(--background-light);
    border-left: 4px solid var(--primary-color);
}

.testimonial-rating {
    color: #fbbf24;
    margin-bottom: 1rem;
}

/* ===== BLOG STYLES ===== */
.blog-card .card-img-top {
    height: 200px;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.blog-sidebar {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.blog-sidebar h5 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.blog-sidebar .list-unstyled li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.blog-sidebar .list-unstyled li:last-child {
    border-bottom: none;
}

/* ===== STATISTICS STYLES ===== */
.stat-item {
    padding: 2rem 1rem;
    text-align: center;
}

.stat-number h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ===== SERVICES SUMMARY STYLES ===== */
.services-summary {
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background-color: var(--background-light);
}

.services-summary h4 {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== HOMEPAGE ENHANCEMENTS ===== */
.featured-post {
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateX(5px);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-author {
    margin-top: auto;
}

/* ===== ACCORDION ENHANCEMENTS ===== */
.accordion-button {
    font-weight: 500;
    color: var(--text-dark);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(168, 32, 36, 0.25);
}

/* ===== BLOG CARD VARIATIONS ===== */
.blog-card.border-primary {
    border-width: 2px !important;
}

.blog-card .badge {
    font-size: 0.75rem;
}

/* ===== ANIMATION IMPROVEMENTS ===== */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* ===== FAQ STYLES ===== */
.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.faq-question:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.faq-answer {
    padding: 1.5rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* ===== FORM STYLES ===== */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(168, 32, 36, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ===== CONTACT PAGE ===== */
.contact-info-card {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
    min-width: 50px;
    min-height: 50px;
}

/* ===== FOOTER STYLES ===== */
.footer {
    background-color: var(--text-dark) !important;
}

/* Footer logo styles */
.footer-logo {
    height: 40px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 6px;
    filter: brightness(0) invert(1); /* Make logo white for dark footer */
}

@media (max-width: 768px) {
    .footer-logo {
        height: 35px;
        max-width: 80px;
    }
}

/* Mobile footer improvements */
@media (max-width: 576px) {
    .footer .col-sm-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .footer .col-sm-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2rem !important;
    }
    
    .footer h6 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer ul li {
        margin-bottom: 0.5rem !important;
    }
    
    .footer .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Text justification for blog elements */
.card-title {
    text-align: justify !important;
}

/* Center align card titles and text on home page service cards */
.home-page .service-card .card-title {
    text-align: center !important;
}

.home-page .service-card .card-text {
    text-align: center !important;
}

.blog-excerpt {
    text-align: justify !important;
}

/* Justify card text that contains excerpts */
.card-text {
    text-align: justify !important;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-color) !important;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* ===== PAGINATION ===== */
.pagination {
    justify-content: center;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    padding: 12px 16px;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== UTILITIES ===== */
.bg-light {
    background-color: var(--background-light) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-nav .nav-link {
        margin: 5px 0;
    }
    
    .contact-info-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .service-card,
    .blog-sidebar {
        padding: 1.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.form-control:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --text-dark: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== TEAM SECTION STYLES ===== */
.bg-gradient {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
}

.team-photos {
    position: relative;
}

.team-photos img {
    position: relative;
    border: 3px solid white !important;
}

.feature-item {
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    opacity: 0.8;
}

.feature-item:hover .feature-icon {
    opacity: 1;
}

/* ===== ENHANCED TEAM PAGE STYLES ===== */
.team-hero {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.team-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.team-hero .hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,200 1000,1000"/></svg>');
    z-index: 1;
}

.team-hero .container {
    position: relative;
    z-index: 2;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.min-vh-50 {
    min-height: 50vh;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    margin: 0;
}

/* Premium Team Cards (Leadership) */
.team-card-premium {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.team-card-premium:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.team-card-premium .team-photo-wrapper {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.team-card-premium .team-photo {
    width: 100%;
    height: 190%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card-premium:hover .team-photo {
    transform: scale(1.1);
}

.team-card-premium .team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.9) 0%, rgba(var(--bs-dark-rgb), 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.team-card-premium:hover .team-overlay {
    opacity: 1;
}

.team-social {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-btn:hover {
    background: white;
    color: var(--bs-primary);
    transform: scale(1.1);
}

.team-content {
    padding: 2rem;
    text-align: center;
    position: relative;
}

.team-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.team-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

.team-position {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-specializations {
    margin-bottom: 1rem;
}

.specialization-tag {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.team-bio {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn.contact-btn {
    background: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid rgba(var(--bs-success-rgb), 0.3);
}

.action-btn.contact-btn:hover {
    background: var(--bs-success);
    color: white;
}

.action-btn.profile-btn {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
}

.action-btn.profile-btn:hover {
    background: var(--bs-primary);
    color: white;
}

/* Standard Team Cards (Associates) */
.team-card-standard {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.team-card-standard:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.team-card-standard .team-photo-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.team-card-standard .team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card-standard:hover .team-photo {
    transform: scale(1.05);
}

.team-card-standard .team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.team-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--bs-primary-rgb), 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.team-card-standard:hover .team-hover-overlay {
    opacity: 1;
}

.view-profile-btn {
    background: white;
    color: var(--bs-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    background: var(--bs-secondary);
    color: white;
    transform: scale(1.05);
}

.team-card-standard .team-content {
    padding: 1.5rem 1rem;
    text-align: center;
}

.team-card-standard .team-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.3rem;
}

.team-card-standard .team-position {
    color: var(--bs-primary);
    font-weight: 500;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.team-card-standard .team-specializations {
    margin-bottom: 1rem;
}

.team-contact-info {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.contact-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--bs-primary);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .team-photos img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .feature-item {
        margin-bottom: 2rem;
    }
    
    .team-hero {
        min-height: 60vh;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .team-card-premium .team-photo-wrapper {
        height: 220px;
    }
    
    .team-card-standard .team-photo-wrapper {
        height: 180px;
    }
    
    .team-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== TEAM MEMBER DETAIL PAGE STYLES ===== */
.member-hero {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.member-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.member-hero .hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,200 1000,1000"/></svg>');
    z-index: 1;
}

.member-hero .container {
    position: relative;
    z-index: 2;
}

.member-photo-hero {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
}

.member-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.member-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.photo-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    z-index: -1;
}

.member-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.member-name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.member-position {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.specializations-hero {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.expertise-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-btn.primary-btn {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: white;
}

.hero-btn.primary-btn:hover {
    background: white;
    color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.hero-btn.secondary-btn:hover {
    background: white;
    color: var(--bs-primary);
    border-color: white;
}

.social-link-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.social-link-hero:hover {
    background: white;
    color: var(--bs-primary);
    transform: scale(1.1);
}

/* Biography Section */
.member-bio-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bio-sidebar {
    padding-right: 2rem;
}

.section-title-sm {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 1rem;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.bio-content-enhanced {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.bio-content-enhanced p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--bs-dark);
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
}

.education-card::before {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.experience-card::before {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: white;
}

.education-card .card-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.experience-card .card-icon {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 1rem;
}

.card-description {
    color: #666;
    line-height: 1.7;
}

.card-description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .member-hero {
        min-height: 70vh;
    }
    
    .member-name {
        font-size: 2.2rem;
    }
    
    .member-position {
        font-size: 1.2rem;
    }
    
    .member-image {
        height: 300px;
    }
    
    .member-placeholder {
        height: 300px;
    }
    
    .member-bio-section {
        padding: 2rem;
    }
    
    .bio-sidebar {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .info-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .expertise-tags {
        justify-content: center;
    }
    
    .member-contact-hero {
        text-align: center;
    }
    
    .hero-btn {
        display: block;
        text-align: center;
        margin: 0 0 1rem 0 !important;
    }
}

/* ===== TEAM MEMBER PHOTOS ===== */
.team-photo-wrapper {
    position: relative;
    width: 100% !important;
    height: 300px !important;
    overflow: hidden !important;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    display: block !important;
}

/* Override any existing team photo styles */
.team-card-premium .team-photo-wrapper,
.team-card-standard .team-photo-wrapper {
    width: 100% !important;
    height: 300px !important;
    overflow: hidden !important;
}

.team-card-premium .team-photo-wrapper {
    height: 350px !important;
}

.team-card-standard .team-photo-wrapper {
    height: 250px !important;
}

/* Force wrapper to display correctly - highest specificity */
div.team-card-premium div.team-photo-wrapper,
div.team-card-standard div.team-photo-wrapper {
    width: 100% !important;
    height: 300px !important;
    overflow: hidden !important;
    display: block !important;
    position: relative !important;
}

div.team-card-premium div.team-photo-wrapper {
    height: 350px !important;
}

div.team-card-standard div.team-photo-wrapper {
    height: 250px !important;
}

.team-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    transition: transform 0.3s ease;
    max-width: none !important;
    max-height: none !important;
}

/* Override any existing team photo image styles */
.team-card-premium .team-photo,
.team-card-standard .team-photo,
.team-photo-wrapper .team-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    max-width: none !important;
    max-height: none !important;
}

/* Force team photos to display correctly - highest specificity */
div.team-photo-wrapper img.team-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
}

/* Additional override for any Bootstrap or other CSS */
img[src*="team/"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    max-width: none !important;
    max-height: none !important;
}

/* Ensure top positioning for team photos - most specific */
.team-photo-wrapper img[src*="team/"] {
    object-position: top center !important;
    object-fit: cover !important;
}

.team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.team-card-premium .team-photo-wrapper {
    height: 350px;
}

.team-card-standard .team-photo-wrapper {
    height: 250px;
}

/* Team hover effects */
.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(168, 32, 36, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.team-photo-wrapper:hover .team-overlay {
    opacity: 1;
}

.team-photo-wrapper:hover .team-photo {
    transform: scale(1.05);
}

.team-social {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

.profile-btn {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Team hover overlay for standard cards */
.team-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(168, 32, 36, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.team-card-standard .team-photo-wrapper:hover .team-hover-overlay {
    opacity: 1;
}

.view-profile-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.view-profile-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

/* Responsive adjustments for team photos */
@media (max-width: 768px) {
    .team-photo-wrapper {
        height: 250px;
    }
    
    .team-card-premium .team-photo-wrapper {
        height: 280px;
    }
    
    .team-card-standard .team-photo-wrapper {
        height: 200px;
    }
    
    .social-btn {
        width: 45px;
        height: 45px;
    }
    
    .team-social {
        gap: 0.8rem;
    }
}

@media (max-width: 576px) {
    .team-photo-wrapper {
        height: 200px;
    }
    
    .team-card-premium .team-photo-wrapper {
        height: 220px;
    }
    
    .team-card-standard .team-photo-wrapper {
        height: 180px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    .view-profile-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
