/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    min-width: calc(100% - 100px); /* Safe zone of 100px */
}

.nav-logo h3 {
    color: #2563eb;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem; /* Reduced gap to save space */
}

/* Dropdown Menu Styles */
.nav-more-dropdown {
    position: relative;
}

.nav-more-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-more-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-more-dropdown:hover .nav-more-toggle i {
    transform: rotate(180deg);
}

.nav-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
}

.nav-more-dropdown:hover .nav-more-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-more-menu li {
    margin: 0;
}

.nav-more-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-more-menu .nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.nav-more-menu .nav-link::after {
    display: none;
}

/* Hide mobile-only items on desktop */
.nav-more-items {
    display: none;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    background: transparent;
    border: none;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.hamburger:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.hamburger:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active .bar {
    transition: all 0.3s ease;
}

/* Prevent body scroll when mobile menu is open */
body.nav-open {
    overflow: hidden;
}

/* Hero Section */
.hero {
    min-height: 70vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    padding-top: 70px;
    color: white;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 20px; /* Add 20px margin from bottom edge */
}

.hero-buttons .btn {
    flex: 1; /* Make buttons equal width */
    min-width: 160px; /* Ensure consistent minimum width */
    max-width: 200px; /* Prevent buttons from getting too wide */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #fbbf24;
    color: #333;
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.teacher-name {
    text-align: center;
    color: white;
    padding: 1.5rem 1.5rem;
    margin-top: 0.5rem;
}

.teacher-name h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.teacher-name p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.teacher-name p:last-child {
    margin-bottom: 0;
}

.image-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-top: 1rem;
}

.image-container:hover {
    transform: scale(1.05);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top 60%;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: #2563eb;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About Section */
.about {
    padding: 100px 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.stat-item p {
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

.about-skills h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-item {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.skill-item p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Subjects Section */
.subjects {
    padding: 100px 0;
    background: white;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.subject-card {
    background: #f8fafc;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.subject-icon {
    width: 80px;
    height: 80px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.subject-icon i {
    font-size: 2rem;
    color: white;
}

.subject-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.subject-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.subject-card ul {
    list-style: none;
    text-align: left;
}

.subject-card li {
    padding: 0.5rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
}

.subject-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background: #f8fafc;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: #2563eb;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border: 4px solid white;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 2rem;
    background: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    color: #1f2937;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    color: #4b5563;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Cultural Diary Section */
.cultural-diary {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.cultural-diary-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.cultural-diary-info {
    text-align: left;
}

.cultural-diary-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cultural-diary-icon i {
    font-size: 2.5rem;
    color: white;
}

.cultural-diary-info h3 {
    font-size: 2.2rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cultural-diary-info p {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cultural-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.feature-item h4 {
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.cultural-diary-document {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cultural-diary-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.document-preview {
    margin-bottom: 2rem;
}

.pdf-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.pdf-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
}

.pdf-icon i {
    font-size: 4rem;
    color: white;
}

.document-info h4 {
    font-size: 1.5rem;
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.document-info p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.file-type {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.document-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.document-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

/* Fix secondary button visibility on light backgrounds */
.cultural-diary .btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.cultural-diary .btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.document-actions .btn i {
    font-size: 1rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.contact-info p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #2563eb;
    margin-right: 1rem;
    width: 30px;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: #6b7280;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

.contact-form {
    background: #f8fafc;
    padding: 2.5rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Error messages */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.error-message.show {
    display: flex;
}

.error-message::before {
    content: '⚠';
    font-size: 1rem;
}

/* Success state */
.form-group.success input,
.form-group.success textarea {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Submit button loading state */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.loading-text {
    display: none;
}

.btn.loading .button-text {
    display: none;
}

.btn.loading .loading-text {
    display: inline;
}

/* Form status messages */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.form-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.form-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Screen reader only content */
.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;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design - Enhanced Mobile Support */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 12px 20px;
        display: block;
        border-radius: 8px;
        margin: 0 20px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background-color: rgba(37, 99, 235, 0.1);
        transform: translateY(-2px);
    }
    
    /* Hide the "Еще" dropdown on mobile and show items directly */
    .nav-more-dropdown {
        display: none;
    }
    
    /* Show the hidden menu items directly in mobile menu */
    .nav-more-items {
        display: block !important;
    }
    
    .nav-more-items .nav-item {
        margin: 0.75rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
    }
    
    .hero {
        min-height: 90vh;
        padding-top: 80px;
        padding-bottom: 2rem;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }
    
    .hero-text {
        margin-top: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 280px;
        margin: 3rem auto 0;
    }
    
    .stat-item {
        min-height: 100px;
        min-width: 260px;
        padding: 1.5rem;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
        min-width: 100px;
        min-height: 50px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-dot {
        left: 21px !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cultural-diary-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .cultural-diary-info {
        text-align: center;
    }

    .cultural-diary-icon {
        margin: 0 auto 2rem;
    }

    .cultural-features {
        max-width: 500px;
        margin: 0 auto;
    }

    .document-actions {
        flex-direction: column;
        align-items: center;
    }

    .document-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .education-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .education-toggle {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .education-tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 150px;
        max-width: 200px;
    }
    
    .education-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .education-year {
        margin-right: 0;
        margin-bottom: 1rem;
        min-width: 60px;
    }
    
    .education-details {
        text-align: center;
    }
    
    .course-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .course-year {
        margin-right: 0;
        margin-bottom: 0.75rem;
        min-width: 60px;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .publication-item {
        flex-direction: column;
        text-align: center;
    }
    
    .publication-item i {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Gallery responsive */
    .gallery-filters {
        gap: 0.5rem;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
        white-space: nowrap;
    }
    
    /* Featured image responsive */
    .featured-gallery-item {
        margin-bottom: 2rem;
        max-height: 300px;
    }
    
    .featured-gallery-item img {
        height: 250px;
    }
    
    .featured-overlay {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .featured-content h3 {
        font-size: 1.4rem;
    }
    
    .featured-content p {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    /* Form improvements for mobile */
    .form-group input,
    .form-group textarea {
        padding: 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    /* Social links touch-friendly */
    .social-link {
        min-width: 48px;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero {
        padding-top: 70px;
        min-height: 85vh;
        padding-bottom: 2rem;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }
    
    .hero-container {
        padding: 0 20px;
        margin-top: 1rem;
    }
    
    .hero-text {
        margin-top: 1rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
        padding: 0 10px;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .hero-text p {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .image-placeholder {
        width: 220px;
        height: 220px;
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    .teacher-name {
        padding: 1.5rem 1rem;
        margin-top: 0.5rem;
    }
    
    .teacher-name h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .teacher-name p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .subject-card {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .stats {
        max-width: 260px;
    }
    
    .stat-item {
        min-width: 240px;
        padding: 1.25rem;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .gallery-filters {
        gap: 0.25rem;
    }
    
    .featured-gallery-item {
        max-height: 250px;
        margin-bottom: 1.5rem;
    }
    
    .featured-gallery-item img {
        height: 200px;
    }
    
    .featured-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    .featured-content h3 {
        font-size: 1.2rem;
    }
    
    .featured-content p {
        font-size: 0.9rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    /* Improved spacing for very small screens */
    .hero {
        padding-top: 70px;
        min-height: 85vh;
        padding-bottom: 2rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .about, .education, .subjects, .experience, .achievements, .gallery, .cultural-diary, .contact {
        padding: 60px 0;
    }

    .cultural-diary-document {
        padding: 2rem 1.5rem;
    }

    .pdf-icon {
        width: 100px;
        height: 100px;
    }

    .pdf-icon i {
        font-size: 3rem;
    }

    .cultural-diary-info h3 {
        font-size: 1.8rem;
    }

    .feature-item {
        padding: 1.25rem;
    }
}

/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text,
.hero-image {
    animation: fadeInUp 1s ease-out;
}

.subject-card,
.skill-item,
.timeline-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Education Section */
.education {
    padding: 100px 0;
    background: white;
}

/* Education Toggle Buttons */
.education-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.education-tab-btn {
    padding: 12px 30px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    outline: none;
    font-size: 1rem;
}

.education-tab-btn:hover,
.education-tab-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: translateY(-2px);
}

/* Education Tab Content */
.education-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.education-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.education-content {
    max-width: 1000px;
    margin: 0 auto;
}

.education-formal h3,
.education-professional h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #1f2937;
    text-align: center;
}

.education-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 2px solid #2563eb;
}

.education-year {
    background: #2563eb;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    margin-right: 1.5rem;
    min-width: 60px;
    text-align: center;
    height: fit-content;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.education-details h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.education-details p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.courses-grid {
    display: grid;
    gap: 1rem;
}

.course-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 2px solid #10b981;
}

.course-year {
    background: #10b981;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    margin-right: 1rem;
    min-width: 60px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    height: fit-content;
}

.course-content h4 {
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.course-content p {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Achievements Section */
.achievements {
    padding: 100px 0;
    background: #f8fafc;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.achievement-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.achievement-icon i {
    font-size: 1.8rem;
    color: white;
}

.achievement-card h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.achievement-year {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.achievement-card p:not(.achievement-year) {
    color: #6b7280;
    line-height: 1.6;
}

.publications {
    max-width: 800px;
    margin: 0 auto;
}

.publications h3 {
    font-size: 1.8rem;
    color: #1f2937;
    text-align: center;
    margin-bottom: 2rem;
}

.publications-list {
    display: grid;
    gap: 1.5rem;
}

.publication-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.publication-item i {
    font-size: 1.5rem;
    color: #2563eb;
    margin-right: 1.5rem;
}

.publication-item h4 {
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.publication-item p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Gallery Section - Enhanced with Featured Image */
.gallery {
    padding: 100px 0;
    background: white;
}

.gallery-description {
    text-align: center;
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: translateY(-2px);
}

/* Featured Gallery Item - Large Main Image */
.featured-gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 3rem;
    max-height: 500px;
    transition: all 0.3s ease;
}

.featured-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.featured-gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-gallery-item:hover img {
    transform: scale(1.02);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 3rem 2rem 2rem;
    color: white;
}

.featured-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.featured-content p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Gallery Grid - Smaller Images */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    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));
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.overlay-content h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
}
