/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile viewport fixes */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    /* Improve scrolling performance */
    scroll-behavior: smooth;
    -webkit-scroll-behavior: smooth;
}

html, body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #333;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
    /* Fix for mobile browsers */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Web3 background effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    /* Ensure background doesn't interfere with scrolling */
    will-change: auto;
}

/* Animated background elements */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.02) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.02) 0%, transparent 30%),
        radial-gradient(circle at 70% 10%, rgba(59, 130, 246, 0.02) 0%, transparent 30%);
    animation: backgroundShift 30s ease-in-out infinite;
    /* Ensure background doesn't interfere with scrolling */
    will-change: auto;
}

@keyframes backgroundShift {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1);
        opacity: 0.2;
    }
    50% { 
        transform: translateX(-5px) translateY(-3px) scale(1.02);
        opacity: 0.3;
    }
}

/* Floating particles - simplified */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(118, 75, 162, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 400px 400px, 500px 500px, 300px 300px;
    animation: particleFloat 60s linear infinite;
    /* Ensure particles don't interfere with scrolling */
    will-change: auto;
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-20px) translateX(10px); }
}

/* Mouse follower effect */
.mouse-follower {
    position: fixed;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, 
        rgba(102, 126, 234, 0.4) 0%, 
        rgba(118, 75, 162, 0.3) 50%, 
        transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    filter: blur(0.5px);
    transition: all 0.2s ease;
    box-shadow: 
        0 0 10px rgba(102, 126, 234, 0.4),
        0 0 20px rgba(118, 75, 162, 0.3);
    transform: scale(1);
    opacity: 0.6;
}

.mouse-follower:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Responsive adjustments for mobile - simplified */
@media (max-width: 768px) {
    .mouse-follower {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .mouse-follower {
        width: 10px;
        height: 10px;
    }
}

/* Gradient border animation for course card */
.course-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #59b3f6, #667eea);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: gradientBorder 12s ease infinite;
    opacity: 0.2;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Content - ensure proper spacing */
.main-content {
    flex: 1;
    padding: 1.5rem 2rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    position: relative;
    z-index: 1;
    align-items: center;
    overflow: visible;
    gap: 2rem;
    height: auto;
    /* Ensure proper scrolling */
    flex-shrink: 0;
    /* Ensure content stretches to fill available space */
    min-height: calc(100vh - 200px);
}

/* Container - fix height issues */
.container {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
    margin: 0;
    padding: 0;
    /* Ensure proper scrolling */
    position: relative;
    width: 100%;
    /* Ensure footer sticks to bottom */
    justify-content: space-between;
}

/* Header - lower z-index */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero {
    text-align: center;
    margin: 0;
    padding: 1rem 0;
    flex-shrink: 0;
    /* Ensure proper spacing distribution */
    flex: 0 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #1e293b;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

/* Course Section */
.course-section {
    margin-bottom: 0;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    transition: all 0.3s ease;
    overflow: visible;
    /* Ensure proper spacing distribution */
    flex: 0 0 auto;
}

.course-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    align-self: center;
    transition: all 0.3s ease;
    overflow: visible;
}

.course-images {
    text-align: center;
    margin-bottom: 1.5rem;
}

.course-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.course-card::before {
    content: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.course-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.course-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.course-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
}

/* Первая строка: цена и период рядом */
.course-price .price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
}

.price {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.period {
    font-size: 1rem;
    color: #64748b;
    text-align: center;
}

.period:first-of-type {
    font-weight: 500;
}

.period:last-of-type {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
}

/* Принудительное разделение элементов цены */
.course-price .price {
    margin-bottom: 0;
}

.course-price .period {
    margin-bottom: 0.1rem;
}

/* Стили для второй строки */
.course-price .period:last-child {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.course-cta {
    text-align: center;
}

.enroll-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.enroll-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.enroll-button:hover::before {
    left: 100%;
}

.enroll-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 0 2px rgba(102, 126, 234, 0.2);
    color: white;
}

/* Contact Section */
.contact-section {
    text-align: center;
    margin-bottom: 0;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    z-index: 2;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    /* Ensure proper spacing distribution */
    flex: 0 0 auto;
}

/* Spacer for even distribution */
.content-spacer {
    flex: 1;
    min-height: 2rem;
}

.contact-section::after {
    content: none;
}

.contact-section h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.contact-section p {
    color: #475569;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    margin-bottom: 1rem;
}

.contact-button,
.phone-button {
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.contact-button {
    background: #667eea;
    color: white;
    border: none;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 25px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    outline: none;
    position: relative;
    z-index: 3;
}

.contact-button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.phone-button {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.3);
}

.contact-button:hover,
.phone-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.phone-button:hover {
    background: #334155;
    border-color: #334155;
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.4);
}

/* Footer - Best Practice */
.footer {
    background: #1e293b;
    border-top: 1px solid rgba(102, 126, 234, 0.3);
    padding: 1.5rem 2rem;
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    overflow: visible;
    /* Ensure footer sticks to bottom */
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.footer-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.footer-link:hover {
    color: #a5b4fc;
    background: rgba(102, 126, 234, 0.1);
}

.footer-copyright {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    opacity: 0.3;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.modal-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    color: #64748b;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: rotate(90deg);
}

.modal-body {
    color: #334155;
}

/* License and Offer Content */
.license-content,
.offer-content {
    line-height: 1.8;
}

.license-content h4,
.offer-content h4 {
    color: #1e293b;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}

.license-content h4:first-child,
.offer-content h4:first-child {
    margin-top: 0;
}

.license-content p,
.offer-content p {
    color: #475569;
    margin-bottom: 1rem;
}

/* Privacy Policy Modal Styles */
.privacy-policy-modal {
    max-width: 800px;
    max-height: 85vh;
    animation: slideInUp 0.4s ease-out;
    overflow: hidden;
}

.privacy-policy-modal .modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.privacy-policy-content {
    line-height: 1.7;
    scroll-behavior: smooth;
}

.privacy-policy-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.privacy-policy-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.privacy-policy-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.privacy-policy-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.policy-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.policy-section:hover {
    background: rgba(248, 250, 252, 0.95);
    border-left-color: #764ba2;
    transform: translateX(5px);
}

.policy-section h4 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.policy-section h5 {
    color: #334155;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.policy-section p {
    color: #475569;
    margin-bottom: 1rem;
    text-align: justify;
}

.policy-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    font-weight: 500;
    color: #1e293b;
    margin: 1rem 0;
}

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

.concept-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.concept-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.concept-item strong {
    color: #1e293b;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.concept-item p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.rights-obligations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.rights,
.obligations {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.rights {
    border-left: 4px solid #10b981;
}

.obligations {
    border-left: 4px solid #f59e0b;
}

.rights h5,
.obligations h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.rights ul,
.obligations ul {
    list-style: none;
    padding: 0;
}

.rights li,
.obligations li {
    color: #475569;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.rights li::before,
.obligations li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.obligations li::before {
    color: #f59e0b;
}

.user-rights {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
}

.user-rights ul {
    list-style: none;
    padding: 0;
}

.user-rights li {
    color: #475569;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.user-rights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.principle-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.principle-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.principle-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.principle-item h5 {
    color: #1e293b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.principle-item p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.processing-goals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.goal-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.goal-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.goal-item h5 {
    color: #1e293b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    padding-bottom: 0.5rem;
}

.goal-item ul {
    list-style: none;
    padding: 0;
}

.goal-item li {
    color: #475569;
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.goal-item li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.security-measures {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin: 1rem 0;
}

.security-measures h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.security-measures ul {
    list-style: none;
    padding: 0;
}

.security-measures li {
    color: #475569;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.security-measures li::before {
    content: '🛡️';
    position: absolute;
    left: 0;
    font-size: 0.9rem;
}

.contact-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    text-align: center;
}

.contact-info p {
    margin-bottom: 0.8rem;
}

.contact-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #764ba2;
    text-decoration: underline;
}



/* Responsive adjustments for privacy policy */
@media (max-width: 768px) {
    .privacy-policy-modal {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        max-height: 90vh;
    }
    
    .privacy-policy-modal .modal-body {
        max-height: calc(90vh - 100px);
    }
    
    .concept-grid,
    .rights-obligations,
    .principles-grid,
    .processing-goals {
        grid-template-columns: 1fr;
    }
    
    .policy-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .policy-section h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .privacy-policy-modal {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .privacy-policy-modal .modal-body {
        max-height: calc(95vh - 80px);
    }
    
    .policy-section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .policy-section h4 {
        font-size: 1.1rem;
    }
    
    .concept-item,
    .rights,
    .obligations,
    .user-rights,
    .principle-item,
    .goal-item,
    .security-measures,
    .contact-info {
        padding: 1rem;
    }
}

/* Offer Modal Styles */
.offer-modal {
    max-width: 900px;
    max-height: 85vh;
    animation: slideInUp 0.4s ease-out;
    overflow: hidden;
}

.offer-modal .modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
}

.offer-content {
    line-height: 1.7;
    scroll-behavior: smooth;
}

.offer-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.offer-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
}

.offer-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.offer-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.5);
}

.offer-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    transition: all 0.3s ease;
}

.offer-section:hover {
    background: rgba(248, 250, 252, 0.95);
    border-left-color: #d97706;
    transform: translateX(5px);
}

.offer-section h4 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(245, 158, 11, 0.2);
}

.offer-section h5 {
    color: #334155;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.offer-section p {
    color: #475569;
    margin-bottom: 1rem;
    text-align: justify;
}

.offer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #7c2d12;
    text-align: center;
    background: rgba(245, 158, 11, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.offer-highlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    font-weight: 500;
    color: #1e293b;
    margin: 1rem 0;
}

.key-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.key-point {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.key-point:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #f59e0b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.point-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.key-point h5 {
    color: #1e293b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.key-point p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

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

.definition-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.definition-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.definition-item strong {
    color: #1e293b;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.definition-item p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

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

.course-type {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.course-type:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.course-type h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 0.5rem;
}

.main-course {
    border-left: 4px solid #f59e0b;
}

.course-specs {
    margin-top: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 6px;
}

.spec-label {
    color: #475569;
    font-weight: 500;
}

.spec-value {
    color: #1e293b;
    font-weight: 600;
}

.price-spec {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.price-spec .spec-value {
    color: #7c2d12;
    font-size: 1.1rem;
    font-weight: 700;
}

.participation-conditions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.condition-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.condition-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #f59e0b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.condition-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.condition-item h5 {
    color: #1e293b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.condition-item p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.rights-obligations-offer {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin: 1rem 0;
}

.obligations-offer h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.obligations-offer ul {
    list-style: none;
    padding: 0;
}

.obligations-offer li {
    color: #475569;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.obligations-offer li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
}

.customer-rights-obligations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
}

.obligations-customer {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
}

.obligations-customer h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.refund-policy {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.refund-policy h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.refund-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.refund-rule {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.refund-rule:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.refund-percent {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.refund-text {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.4;
}

.no-refund .refund-percent {
    color: #dc2626;
}

.guarantees {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.guarantee-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.guarantee-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.guarantee-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.guarantee-item h5 {
    color: #1e293b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    text-align: center;
}

.guarantee-item p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.quarantine-policy {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin: 1rem 0;
}

.quarantine-policy h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.quarantine-policy ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.quarantine-policy li {
    color: #475569;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.quarantine-policy li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
}

.quarantine-note {
    background: rgba(245, 158, 11, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    font-weight: 500;
    color: #7c2d12;
    margin: 1rem 0;
}

.contact-info-offer {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-align: center;
    margin: 1rem 0;
}

.contact-info-offer h5 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info-offer p {
    margin-bottom: 0.8rem;
}

.contact-info-offer a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info-offer a:hover {
    color: #d97706;
    text-decoration: underline;
}

/* Responsive adjustments for offer */
@media (max-width: 768px) {
    .offer-modal {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        max-height: 90vh;
    }
    
    .offer-modal .modal-body {
        max-height: calc(90vh - 100px);
    }
    
    .key-points,
    .definitions-grid,
    .course-details,
    .participation-conditions,
    .guarantees,
    .refund-rules {
        grid-template-columns: 1fr;
    }
    
    .offer-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .offer-section h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .offer-modal {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .offer-modal .modal-body {
        max-height: calc(95vh - 80px);
    }
    
    .offer-section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .offer-section h4 {
        font-size: 1.1rem;
    }
    
    .key-point,
    .definition-item,
    .course-type,
    .condition-item,
    .guarantee-item,
    .refund-rule,
    .rights-obligations-offer,
    .obligations-customer,
    .refund-policy,
    .quarantine-policy,
    .contact-info-offer {
        padding: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        overflow: visible;
    }
    
    /* Prevent body scroll when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .main-content {
        padding: 1rem 1rem 1.5rem 1rem;
        justify-content: flex-start;
        gap: 1.5rem;
        align-items: center;
        min-height: auto;
        flex: none;
        height: auto;
        overflow: visible;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .course-section {
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
        justify-content: center;
        overflow: visible;
    }
    
    .course-card {
        padding: 1.5rem 1rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        align-self: center;
        overflow: visible;
    }
    
    .course-header h3 {
        font-size: 1.4rem;
    }
    
    .price {
        font-size: 1.8rem;
    }
    
    .contact-section {
        margin-bottom: 1.5rem;
        overflow: visible;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    }
    
    .contact-section::after {
        width: 80px;
        height: 1px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .contact-button,
    .phone-button {
        width: 100%;
        max-width: 250px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .footer {
        padding: 1rem 1rem;
        margin-top: 0;
        position: relative;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    html, body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        overflow: visible;
    }
    
    .header {
        padding: 0.8rem 1rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .course-section {
        padding: 0 0.3rem;
        margin-bottom: 1.2rem;
        width: 100%;
        justify-content: center;
        overflow: visible;
    }
    
    .course-card {
        padding: 1.2rem 0.8rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        align-self: center;
        overflow: visible;
    }
    
    .course-header h3 {
        font-size: 1.2rem;
    }
    
    .price {
        font-size: 1.6rem;
    }
    
    .enroll-button {
        padding: 0.7rem 1.8rem;
        font-size: 1rem;
        width: 100%;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .contact-section {
        margin-bottom: 1.2rem;
        overflow: visible;
        padding-bottom: 1.2rem;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    }
    
    .contact-section::after {
        width: 60px;
        height: 1px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .contact-button,
    .phone-button {
        width: 100%;
        max-width: 200px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .main-content {
        padding: 0.8rem 0.8rem 1.2rem 0.8rem;
        gap: 1.2rem;
        align-items: center;
        min-height: auto;
        flex: none;
        height: auto;
        overflow: visible;
    }
    
    .footer {
        padding: 0.8rem 0.8rem;
        position: relative;
        overflow: visible;
        /* Ensure footer sticks to bottom on mobile */
        margin-top: auto;
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .main-content {
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        gap: 1rem;
        height: auto;
        flex: none;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .course-card {
        padding: 1rem 0.6rem;
    }
    
    .course-header h3 {
        font-size: 1.1rem;
    }
    
    .price {
        font-size: 1.4rem;
    }
    
    .enroll-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        max-width: 180px;
    }
    
    .contact-buttons {
        max-width: 200px;
    }
    
    .contact-button,
    .phone-button {
        max-width: 180px;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
}

/* Height-based media queries for vertical compression */
@media (max-height: 800px) {
    .main-content {
        gap: 1.5rem;
        padding: 1rem 2rem 1.5rem 2rem;
        /* Ensure even distribution on smaller heights */
        justify-content: space-between;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1rem;
    }
    
    .course-section {
        margin-bottom: 1.5rem;
    }
    
    .contact-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-height: 600px) {
    .main-content {
        gap: 1rem;
        padding: 0.8rem 2rem 1rem 2rem;
        /* Ensure even distribution on smaller heights */
        justify-content: space-between;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .hero-subtitle {
        margin-bottom: 0.8rem;
        font-size: 0.9rem;
    }
    
    .course-section {
        margin-bottom: 1rem;
    }
    
    .course-card {
        padding: 1.5rem;
    }
    
    .contact-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .footer {
        padding: 1rem 2rem;
    }
}

@media (max-height: 500px) {
    .main-content {
        gap: 0.8rem;
        padding: 0.5rem 2rem 0.8rem 2rem;
        /* Ensure even distribution on smaller heights */
        justify-content: space-between;
    }
    
    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.2rem;
    }
    
    .hero-subtitle {
        margin-bottom: 0.6rem;
        font-size: 0.85rem;
    }
    
    .course-section {
        margin-bottom: 0.8rem;
    }
    
    .course-card {
        padding: 1.2rem;
    }
    
    .contact-section {
        margin-bottom: 0.8rem;
        padding-bottom: 0.8rem;
    }
    
    .footer {
        padding: 0.8rem 2rem;
    }
}

/* Мобильные устройства - уменьшение размера заголовка */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.1;
    }
}

/* Mobile-specific fixes for white space at top */
@media (max-width: 768px) {
    html, body {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        /* Improve mobile scrolling */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .container {
        min-height: 100vh;
        padding-top: 0;
        margin-top: 0;
        /* Ensure proper scrolling */
        height: auto;
        overflow: visible;
        /* Ensure footer sticks to bottom on mobile */
        justify-content: space-between;
    }
    
    .header {
        margin-top: 0;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .main-content {
        padding-top: 0.5rem;
        margin-top: 0;
        /* Ensure proper scrolling */
        height: auto;
        min-height: auto;
        /* Ensure content stretches on mobile */
        flex: 1;
        min-height: calc(100vh - 150px);
        /* Ensure even distribution on mobile */
        justify-content: space-between;
        gap: 1.5rem;
    }
    
    .hero {
        margin-top: 0;
        padding-top: 0.5rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: auto;
        min-height: -webkit-fill-available;
        /* Improve iOS scrolling */
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    .container {
        min-height: -webkit-fill-available;
        height: auto;
        overflow: visible;
        /* Ensure footer sticks to bottom on iOS */
        justify-content: space-between;
    }
    
    /* Fix for devices with notch */
    .header {
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
    
    .main-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        height: auto;
        min-height: auto;
        /* Ensure content stretches on iOS */
        flex: 1;
        min-height: calc(-webkit-fill-available - 150px);
        /* Ensure even distribution on iOS */
        justify-content: space-between;
        gap: 1.5rem;
    }
}

/* Android Chrome specific fixes */
@media screen and (max-width: 768px) and (orientation: portrait) {
    html, body {
        height: auto;
        min-height: 100vh;
        /* Improve Android scrolling */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .container {
        min-height: 100vh;
        height: auto;
        overflow: visible;
        /* Ensure footer sticks to bottom on Android */
        justify-content: space-between;
    }
    
    .main-content {
        /* Ensure even distribution on Android */
        justify-content: space-between;
        gap: 1.5rem;
    }
}

/* Additional mobile fixes */
@media (max-width: 768px) {
    /* Remove any potential top margins */
    body > *:first-child {
        margin-top: 0 !important;
    }
    
    /* Ensure no extra spacing at top */
    .container > *:first-child {
        margin-top: 0 !important;
    }
    
    /* Fix for mobile browsers that add extra padding */
    html {
        padding: 0 !important;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Improve scrolling performance */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure content can scroll to bottom */
    .container {
        padding-bottom: 0;
    }
    
    /* Fix for sticky header interfering with scroll */
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    /* Optimize scrolling performance */
    html, body {
        /* Disable momentum scrolling on iOS to improve performance */
        -webkit-overflow-scrolling: auto;
        /* Enable smooth scrolling */
        scroll-behavior: smooth;
        -webkit-scroll-behavior: smooth;
    }
    
    /* Ensure all content is scrollable */
    .main-content {
        overflow: visible;
        height: auto;
        min-height: auto;
        /* Ensure even distribution on mobile */
        justify-content: space-between;
        gap: 1.5rem;
    }
    
    /* Fix for course section */
    .course-section {
        overflow: visible;
        height: auto;
    }
    
    /* Fix for contact section */
    .contact-section {
        overflow: visible;
        height: auto;
        margin-bottom: 1rem;
    }
    
    /* Ensure footer works properly */
    .footer {
        margin-top: auto;
        width: 100%;
    }
    
    /* Ensure proper spacing for content blocks */
    .hero,
    .course-section,
    .contact-section {
        flex: 0 0 auto;
    }
}
