:root {
    --primary-color: #2a9d8f;
    --secondary-color: #e76f51;
    --accent-color: #f4a261;
    --text-color: #264653;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.menu .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.menu li {
    position: relative;
}

.menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
}

.menu a:hover,
.menu a.active {
    background: var(--gradient);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--gradient);
    padding: 8rem 5% 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('path/to/pattern.svg');
    opacity: 0.1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* Section Styles */
.section {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

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

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }

    .menu ul.active {
        display: flex;
    }

    .menu li {
        width: 100%;
    }

    .menu a {
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .menu a:hover,
    .menu a.active {
        background: var(--gradient);
        color: var(--white);
    }
    
    .section {
        padding: 4rem 5%;
    }
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gradient);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }

    .menu ul.active {
        display: flex;
    }

    .menu ul li {
        width: 100%;
    }

    .menu ul li a {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .menu ul li a:hover,
    .menu ul li a.active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 10px 20px rgba(30,144,255,0.1);
    border: 1px solid rgba(135,206,235,0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30,144,255,0.2);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatClouds {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 1000px 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu ul {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Members Page Styles */
.members-container {
    padding: 120px 5% 50px;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin: 2rem 0;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--secondary-color);
}

/* Teacher Card Styles */
.teacher-card {
    display: flex;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(30,144,255,0.1);
    border: 1px solid rgba(135,206,235,0.2);
    margin: 2rem auto;
    max-width: 1000px;
}

/* Updated Image Container Styles */
.teacher-image {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
    height: 400px; /* Increased height */
    background: linear-gradient(45deg, #fff5f8, #fff);
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain */
    padding: 10px; /* Added padding to prevent edge touching */
}

.teacher-info {
    padding: 2rem;
    flex: 1;
}

.teacher-quote {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
}

/* Student Grid Styles */
.leadership-grid,
.team-leaders-grid,
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.student-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(30,144,255,0.1);
    border: 1px solid rgba(135,206,235,0.2);
    transition: all 0.3s ease;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30,144,255,0.2);
}

.student-card:hover .student-image img {
    transform: scale(1.1);
}

.student-image {
    position: relative;
    padding-top: 120%; /* Increased from 100% for more vertical space */
    background: linear-gradient(45deg, #fff5f8, #fff);
}

.student-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain */
    padding: 10px; /* Added padding to prevent edge touching */
    background-color: #fff; /* Added white background */
}

.role-badge {
    background: var(--gradient);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.student-info {
    padding: 1rem;
    text-align: center;
}

.student-info h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.student-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Leadership Cards Special Styling */
.student-card.leadership {
    grid-column: span 2;
    display: flex;
    align-items: center;
}

.student-card.leadership .student-image {
    flex: 0 0 250px; /* Increased width */
    height: 300px; /* Increased height */
    padding-top: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .teacher-card {
        flex-direction: column;
    }
    
    .teacher-image {
        height: 300px;
    }
    
    .student-card.leadership {
        grid-column: span 1;
        flex-direction: column;
    }
    
    .student-card.leadership .student-image {
        width: 100%;
    }
}

/* Activities Page Styles */
.activities-container {
    padding: 80px 5% 50px;
    background: #f8f9fa;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.activity-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
}

.activity-image {
    height: 200px;
    overflow: hidden;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-content {
    padding: 1.5rem;
}

/* Timeline Style */
.activity-timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
}

.timeline-item {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.timeline-gallery img {
    width: 100%;
    border-radius: 10px;
}

/* Masonry Layout */
.activity-masonry {
    columns: 3;
    gap: 2rem;
    margin: 2rem 0;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.masonry-item img {
    width: 100%;
    display: block;
}

.masonry-content {
    padding: 1.5rem;
    background: white;
}

/* Event Cards */
.event-carousel {
    display: flex;
    overflow-x: auto;
    padding: 2rem 0;
    gap: 2rem;
}

.event-card {
    display: flex;
    background: white;
    border-radius: 15px;
    min-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-date {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.event-date .day {
    font-size: 2rem;
    font-weight: bold;
}

.btn-details {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-details:hover {
    background: var(--secondary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .activity-masonry {
        columns: 1;
    }
    
    .timeline-gallery {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

/* Gallery Styles */
.gallery-container {
    padding: 80px 5% 50px;
    background: #f8f9fa;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 100%;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
    min-height: 500px; /* Đảm bảo grid không bị co lại khi filter */
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease-in-out;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 105, 180, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.view-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-top: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.view-btn:hover {
    transform: scale(1.1);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
}

.lightbox-prev { left: 20px; }
lightbox-next { right: 20px; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

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

/* Contact Page Styles */
.contact-container {
    padding: 80px 5% 50px;
    background: #f8f9fa;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.info-card:hover {
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group textarea + label {
    top: 1rem;
    transform: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30,144,255,0.2);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: white;
    padding: 0 0.5rem;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

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

.contact-map {
    margin-top: 3rem;
}

.contact-map h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-map iframe {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}
