/* Instructors Hero Section */
.instructors-hero {
    background: linear-gradient(135deg, var(--dark-color), var(--secondary-color), var(--dark-color));
    color: var(--white);
    padding: 8rem 0 4rem;
    text-align: center;
}

.instructors-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    margin-top: 4rem;
}

.instructors-hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    max-width: 800px;
    margin: 0 auto;
}

/* Instructors Grid */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.instructor-card {
    position: relative;
    width: 100%;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: var(--white);
}

.card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transform: rotateY(0deg);
}

.instructor-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instructor-image img {
    max-width: 100px;
    height: 100px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.experience-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.basic-info {
    text-align: center;
}

.basic-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.specialization {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Card Back Styles */
.card-back {
    transform: rotateY(180deg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background: var(--white);
    overflow: hidden;
}

.detailed-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.back-header {
    flex-shrink: 0;
}

.back-header h3 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.back-header .profession {
    color: var(--secondary-color);
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.back-header .experience {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Custom scrollbar */
.scrollable-content::-webkit-scrollbar {
    width: 5px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.education,
.skills {
    flex-shrink: 0;
}

.education h4,
.skills h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

.education p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 215, 0, 0.1);
    color: var(--secondary-color);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.contact {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: auto;
    flex-shrink: 0;
}

/* Card Flip Animation */
.instructor-card {
    position: relative;
    width: 100%;
    height: 450px;
    perspective: 1000px;
    cursor: pointer;
    transform-style: preserve-3d;
}

.instructor-card:hover .card-front {
    transform: rotateY(-180deg);
}

.instructor-card:hover .card-back {
    transform: rotateY(0deg);
}

/* Flip button styles */
.flip-btn {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.flip-btn i {
    font-size: 14px;
    color: #333;
}

.flip-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Footer Grid Styles */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    width: 100%;
}

.footer-col p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.social-links a {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    width: 100%;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-credits a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credits a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .instructors-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .instructors-hero {
        padding: 6rem 0 3rem;
    }
    
    .instructors-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .instructors-hero {
        padding: 3rem 0;
    }

    .instructors-hero h1 {
        font-size: 1.75rem;
    }

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

    .instructor-card {
        height: 380px;
    }
}