/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #fff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px; /* Ensure minimum height */
    background-color: var(--secondary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                     url('hero.jpeg');
    background-size: cover;
    background-position: center; /* Adjust vertical position */
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
    position: relative;
}

.hero-logo {
    position: absolute;
    top: 80px;
    left: 20px;
    z-index: 10;
}

.hero-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

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

/* Responsive adjustments for hero logo */
@media (max-width: 768px) {
    .hero-logo {
        top: 60px;
        left: 15px;
    }
    
    .hero-logo-img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        top: 40px;
        left: 10px;
    }
    
    .hero-logo-img {
        width: 50px;
        height: 50px;
    }
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Courses Section */
.courses {
    padding: 5rem 2rem;
    background-color: var(--light-color);
}

.courses h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.course-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.course-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.course-card:hover .course-icon {
    transform: scale(1.1) rotateY(15deg);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Branches Section */
.branches {
    padding: 5rem 2rem;
}

.branches h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.branch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1200px;
}

@media (max-width: 1200px) {
    .branch-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .branch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .branch-grid {
        grid-template-columns: 1fr;
    }
}

.branch-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
}

.branch-card:hover {
    transform: translateY(-10px) rotateY(5deg) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.branch-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
}

.branch-card:hover .branch-image {
    transform: scale(1.05);
}

.branch-card h3 {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    position: relative;
}

.branch-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.branch-card:hover h3::after {
    width: 100px;
}

/* Gallery Section */
.gallery {
    padding: 5rem 2rem;
    background-color: var(--light-color);
}

.gallery h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 5rem 2rem;
    background-color: white;
}

.why-choose-us h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    padding: 12px;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.feature-card:hover .feature-icon svg {
    transform: scale(1.1);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 2rem;
    background-color: white;
    position: relative;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.testimonial-slider {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 0 50px;
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 2rem 1rem;
}

.testimonial-card {
    min-width: 320px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-15px) scale(1.03) rotateY(2deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-card:hover .rating {
    transform: scale(1.1) rotate(5deg);
}

.rating {
    color: gold;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #555;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-card p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 1rem;
    display: block;
    position: relative;
    padding-left: 2rem;
}

.author::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.testimonial-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.testimonial-prev,
.testimonial-next {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.testimonial-prev:active,
.testimonial-next:active {
    transform: scale(0.95);
}

.testimonial-slider:hover .testimonial-track {
    animation: scrollTestimonials 25s linear infinite;
}

@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-320px * 5 - 2rem * 4)); }
}

/* Pause animation on hover */
.testimonial-slider:hover .testimonial-track {
    animation-play-state: running;
}

.testimonial-slider .testimonial-track {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-slider {
        padding: 0 30px;
    }
    
    .testimonial-card {
        min-width: 280px;
        padding: 2rem;
    }
    
    .testimonial-prev,
    .testimonial-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 3rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3,
.social-links h3,
.map-container h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.map-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.map-link {
    text-decoration: none;
    color: inherit;
}

.map-placeholder {
    width: 280px;
    height: 180px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.map-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.map-placeholder svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.8rem;
    fill: white;
}

.map-placeholder span {
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive design for map links */
@media (max-width: 768px) {
    .map-links {
        flex-direction: column;
        align-items: center;
    }
    
    .map-placeholder {
        width: 250px;
        height: 160px;
    }
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    color: var(--text-light);
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.social-icon:hover svg {
    transform: scale(1.2);
}

/* Social media specific colors on hover */
.social-icon:nth-child(1):hover { /* Facebook */
    background: #3b5998;
}

.social-icon:nth-child(2):hover { /* Instagram */
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icon:nth-child(3):hover { /* Twitter */
    background: #1da1f2;
}

.social-icon:nth-child(4):hover { /* LinkedIn */
    background: #0077b5;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 1.2rem;
        font-weight: 500;
        padding: 1rem;
        display: block;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateX(10px);
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1001;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Hero Section */
    .hero {
        min-height: 500px;
        background-attachment: scroll;
        padding-top: 70px;
        background-position: center 40%;
        padding: 0 1rem;
    }

    .hero-content {
        padding: 0 1rem;
        max-width: 90%;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
        font-weight: 600;
        min-height: 50px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Sections */
    .courses,
    .branches,
    .why-choose-us,
    .testimonials {
        padding: 3rem 1rem;
    }

    .courses h2,
    .branches h2,
    .why-choose-us h2,
    .testimonials h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Courses Section */
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-card {
        padding: 1.5rem;
    }

    .course-icon {
        font-size: 2.5rem;
    }

    /* Branches Section */
    .branch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .branch-card h3 {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .branch-image {
        height: 150px;
    }

    /* Gallery Section Responsive */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
        border-radius: 8px;
    }
    
    .gallery-overlay {
        padding: 1rem 0.8rem 0.8rem;
        background: linear-gradient(transparent, rgba(0,0,0,0.85));
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
    }
    
    /* Touch-friendly gallery interactions */
    .gallery-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Why Choose Us */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }

    .feature-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Testimonials */
    .testimonial-slider {
        padding: 0 20px;
    }

    .testimonial-card {
        min-width: 280px;
        padding: 2rem;
    }

    .testimonial-controls {
        position: relative;
        margin-top: 2rem;
        justify-content: center;
        gap: 1rem;
        transform: none;
        top: auto;
    }

    .testimonial-prev,
    .testimonial-next {
        position: relative;
        margin: 0 0.5rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .contact-info,
    .social-links,
    .map-container {
        margin-bottom: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .map-links {
        flex-direction: column;
        align-items: center;
    }

    .map-placeholder {
        width: 280px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    /* Navigation */
    header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Hero Section */
    .hero {
        min-height: 450px;
        padding-top: 60px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Sections */
    .courses,
    .branches,
    .why-choose-us,
    .testimonials {
        padding: 2rem 1rem;
    }

    .courses h2,
    .branches h2,
    .why-choose-us h2,
    .testimonials h2 {
        font-size: 1.8rem;
    }

    /* Branches */
    .branch-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery Section Responsive */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-overlay {
        padding: 1rem 0.8rem 0.8rem;
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }

    /* Testimonials */
    .testimonial-card {
        min-width: 260px;
        padding: 1.5rem;
    }

    .testimonial-card p {
        font-size: 1rem;
        padding-left: 1rem;
    }

    .rating {
        font-size: 1.5rem;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
    }

    .map-placeholder {
        width: 250px;
        height: 140px;
    }

    .map-placeholder svg {
        width: 32px;
        height: 32px;
    }

    .map-placeholder span {
        font-size: 0.8rem;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .testimonial-card {
        min-width: 240px;
        padding: 1.2rem;
    }

    .map-placeholder {
        width: 220px;
        height: 130px;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Prevent horizontal scrolling */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Smooth transitions for mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Improve touch targets for mobile */
.btn, .social-icon, .testimonial-prev, .testimonial-next,
.mobile-menu-btn, .popup-close, .gallery-item {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .course-card:hover,
    .branch-card:hover,
    .feature-card:hover,
    .testimonial-card:hover,
    .gallery-item:hover,
    .feature-3d-card:hover .feature-3d-inner,
    .stat-3d-card:hover {
        transform: none !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    }
    
    /* Enable active states for touch feedback */
    .course-card:active,
    .branch-card:active,
    .feature-card:active,
    .testimonial-card:active,
    .gallery-item:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Show gallery overlay on touch devices */
    .gallery-overlay {
        transform: translateY(0) !important;
        background: linear-gradient(transparent, rgba(0,0,0,0.7)) !important;
    }
    
    /* Adjust 3D cards for touch */
    .feature-3d-card:active .feature-3d-inner {
        transform: rotateY(180deg) !important;
    }
    
    .stat-3d-card:active {
        transform: translateY(-10px) scale(1.02) !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .course-card,
    .branch-card,
    .feature-card,
    .testimonial-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Reduce animation complexity on mobile */
    .course-card::before,
    .branch-card h3::after,
    .testimonial-card::before {
        transition: none;
    }
}

/* Image Popup Styles */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-popup.active {
    display: flex;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.popup-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.popup-close:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.popup-image {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    display: block;
}

/* Responsive adjustments for popup */
@media (max-width: 768px) {
    .popup-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .popup-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 360px) {
    .popup-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }
}

/* Mobile-specific touch improvements */
@media (hover: none) and (pointer: coarse) {
    .popup-close {
        min-width: 44px;
        min-height: 44px;
    }
    
    .popup-close:hover {
        transform: none;
    }
}

/* Courses Page Specific Styles */
.courses-hero {
    height: 60vh;
    min-height: 400px;
    background-color: var(--primary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                     url('gallery/Unknown-3.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
}

.courses-hero .hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.courses-hero .hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
}

.courses-main {
    padding: 5rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.courses-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.courses-intro h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.courses-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.course-features {
    margin: 6rem 0;
    background-color: var(--light-color);
    padding: 5rem 2rem;
    border-radius: 20px;
}

.course-features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.feature-item {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.feature-item .feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

.feature-item .feature-icon svg {
    width: 35px;
    height: 35px;
    fill: white;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

.admission-info {
    margin: 6rem 0;
}

.admission-info h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.admission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.admission-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid var(--secondary-color);
}

.admission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.admission-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.admission-card ul {
    list-style: none;
    padding: 0;
}

.admission-card li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 2rem;
}

.admission-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 4rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Responsive Design for Courses Page */
@media (max-width: 768px) {
    .courses-hero .hero-content h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .courses-hero .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .courses-intro h2,
    .course-features h2,
    .admission-info h2 {
        font-size: 2rem;
    }
    
    .course-features {
        padding: 3rem 1rem;
        margin: 4rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item {
        padding: 2rem;
    }
    
    .admission-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .admission-card {
        padding: 2rem;
    }
    
    .cta-section {
        padding: 3rem 1rem;
        margin: 3rem 0;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .courses-hero {
        min-height: 350px;
        background-attachment: scroll;
    }
    
    .courses-hero .hero-content h1 {
        font-size: 2rem;
    }
    
    .courses-hero .hero-content p {
        font-size: 1rem;
    }
    
    .courses-main {
        padding: 3rem 0;
    }
    
    .courses-intro h2,
    .course-features h2,
    .admission-info h2 {
        font-size: 1.8rem;
    }
    
    .feature-item .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-item .feature-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
}

/* Branches Page 3D Styles */
.branches-hero {
    height: 60vh;
    min-height: 400px;
    background-color: var(--primary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                     url('gallery/Unknown.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
}

.branches-hero .hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.branches-hero .hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
}

.branches-main {
    padding: 5rem 0;
}

.branches-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.branches-intro h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.branches-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* 3D Branch Grid */
.branch-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 6rem;
    perspective: 1200px;
}

/* 3D Feature Cards with Flip Effect */
.branch-features {
    margin: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 5rem 2rem;
    border-radius: 20px;
}

.branch-features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.features-3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.feature-3d-card {
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}

.feature-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.feature-3d-card:hover .feature-3d-inner {
    transform: rotateY(180deg);
}

.feature-3d-front, .feature-3d-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.feature-3d-front {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.feature-3d-back {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    transform: rotateY(180deg);
}

.feature-3d-front .feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.feature-3d-front .feature-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.feature-3d-front h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-3d-front p {
    color: #666;
    font-size: 1rem;
}

.feature-3d-back h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.feature-3d-back p {
    line-height: 1.6;
    font-size: 1rem;
}

/* 3D Statistics Section */
.branch-stats {
    margin: 6rem 0;
    text-align: center;
}

.branch-stats h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.stats-3d-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    perspective: 1200px;
}

.stat-3d-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-3d-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-3d-card:hover {
    transform: translateY(-20px) rotateX(10deg) rotateY(5deg) scale(1.05);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.stat-3d-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.stat-3d-card:hover .stat-number {
    transform: scale(1.1);
    color: var(--accent-color);
}

.stat-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.9rem;
    color: #666;
    opacity: 0.8;
}

/* Responsive Design for Branches Page */
@media (max-width: 768px) {
    .branches-hero .hero-content h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .branches-hero .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .branches-intro h2,
    .branch-features h2,
    .branch-stats h2 {
        font-size: 2rem;
    }
    
    .branch-features {
        padding: 3rem 1rem;
        margin: 4rem 0;
    }
    
    .features-3d-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-3d-card {
        height: 280px;
    }
    
    .feature-3d-front, .feature-3d-back {
        padding: 1.5rem;
    }
    
    .feature-3d-front .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-3d-front .feature-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .stats-3d-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-3d-card {
        padding: 2rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .branches-hero {
        min-height: 350px;
        background-attachment: scroll;
    }
    
    .branches-hero .hero-content h1 {
        font-size: 2rem;
    }
    
    .branches-hero .hero-content p {
        font-size: 1rem;
    }
    
    .branches-main {
        padding: 3rem 0;
    }
    
    .branches-intro h2,
    .branch-features h2,
    .branch-stats h2 {
        font-size: 1.8rem;
    }
    
    .feature-3d-card {
        height: 250px;
    }
    
    .feature-3d-front .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-3d-front .feature-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .stats-3d-container {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Disable 3D effects on very small screens for better performance */
    .feature-3d-card:hover .feature-3d-inner {
        transform: none;
    }
    
    .stat-3d-card:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    /* Optimize 3D cards for mobile touch */
    .feature-3d-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .feature-3d-inner {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-3d-card:active .feature-3d-inner {
        transform: rotateY(180deg);
    }
    
    .stat-3d-card:active {
        transform: translateY(-10px) scale(1.02);
    }
}
/* Branches Locations Section */
.branches-locations {
    padding: 5rem 2rem;
    text-align: center;
}

.branches-locations h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.branch-locations-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1200px;
}

@media (max-width: 1200px) {
    .branch-locations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .branch-locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .branch-locations-grid {
        grid-template-columns: 1fr;
    }
}

.branch-location-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
}

.branch-location-card:hover {
    transform: translateY(-10px) rotateY(5deg) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.branch-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
}

.branch-location-card:hover .branch-image {
    transform: scale(1.05);
}

.branch-location-card h3 {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    position: relative;
}

.branch-location-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.branch-location-card:hover h3::after {
    width: 100px;
}

/* Responsive Design for Branches Locations */
@media (max-width: 768px) {
    .branches-locations {
        padding: 3rem 1rem;
    }
    
    .branches-locations h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .branch-image {
        height: 150px;
    }
    
    .branch-location-card h3 {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .branches-locations h2 {
        font-size: 1.8rem;
    }
}
/* Gallery Page Specific Styles */
.gallery-hero {
    height: 60vh;
    min-height: 400px;
    background-color: var(--primary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                     url('gallery/Unknown-5.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
}

.gallery-hero .hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.gallery-hero .hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
}

.gallery-main {
    padding: 5rem 0;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-intro h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.gallery-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Full Gallery Grid */
.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.gallery-item-full {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 4/3;
}

.gallery-item-full:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item-full:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay-full {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    padding: 2.5rem 2rem 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item-full:hover .gallery-overlay-full {
    transform: translateY(0);
}

.gallery-overlay-full h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.gallery-overlay-full p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Gallery Features Section */
.gallery-features {
    margin: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 5rem 2rem;
    border-radius: 20px;
}

.gallery-features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.features-grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-gallery {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature-gallery:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.feature-icon-gallery {
    width: 70px;
    height: 70px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-gallery:hover .feature-icon-gallery {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

.feature-icon-gallery svg {
    width: 35px;
    height: 35px;
    fill: white;
}

.feature-gallery h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-gallery p {
    color: #666;
    line-height: 1.6;
}

/* Responsive Design for Gallery Page */
@media (max-width: 768px) {
    .gallery-hero .hero-content h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .gallery-hero .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .gallery-grid-full {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-overlay-full {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .gallery-overlay-full h3 {
        font-size: 1.2rem;
    }
    
    .gallery-features {
        padding: 3rem 1rem;
        margin: 4rem 0;
    }
    
    .gallery-features h2 {
        font-size: 2rem;
    }
    
    .features-grid-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-gallery {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        min-height: 350px;
        background-attachment: scroll;
    }
    
    .gallery-hero .hero-content h1 {
        font-size: 2rem;
    }
    
    .gallery-hero .hero-content p {
        font-size: 1rem;
    }
    
    .gallery-main {
        padding: 3rem 0;
    }
    
    .gallery-intro h2,
    .gallery-features h2 {
        font-size: 1.8rem;
    }
    
    .gallery-grid-full {
        grid-template-columns: 1fr;
    }
    
    .feature-icon-gallery {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon-gallery svg {
        width: 30px;
        height: 30px;
    }
}