/* Gerund Page Specific Styles */

/* Page Header */
.page-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    text-align: center;
}

.quick-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Introduction Section */
.intro-section {
    padding: 2rem 0;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.property-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.property-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.property-card ul {
    list-style: none;
    padding: 0;
}

.property-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.property-card li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.example-card {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.example-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.example-card p {
    margin-bottom: 0.5rem;
}

.translation {
    color: var(--text-secondary);
    font-style: italic;
}

.explanation {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Forms Section */
.forms-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.interactive-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.gerund-forms-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 600px;
}

.gerund-forms-table th,
.gerund-forms-table td {
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    vertical-align: middle;
}

.gerund-forms-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.gerund-forms-table tr:hover {
    background: var(--bg-tertiary);
}

.form-example {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.english {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.russian {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.pronounce-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.pronounce-btn:hover {
    background: var(--bg-tertiary);
}

.formation-rules {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.formation-rules h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rule-item {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.rule-item h5 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.rule-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.negative-form {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.negative-form h5 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Functions Section */
.functions-section {
    padding: 3rem 0;
}

.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.function-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.function-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.function-number {
    background: white;
    color: var(--primary-color);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.function-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.function-content {
    padding: 1.5rem;
}

.function-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.examples {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.example {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.english {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
}

.russian {
    display: block;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.verb-list,
.preposition-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.verb,
.prep-item {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.special-note {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.special-note strong {
    color: var(--warning-color);
}

/* Complex Gerund Section */
.complex-gerund-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.complex-examples {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.complex-example {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.complex-example h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.usage-notes {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.usage-notes h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.usage-notes ul {
    list-style: none;
    padding: 0;
}

.usage-notes li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.usage-notes li:before {
    content: "→";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
}

/* Verbal Noun Section */
.verbal-noun-section {
    padding: 3rem 0;
}

.comparison-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 600px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table tr:nth-child(even) {
    background: var(--bg-tertiary);
}

.verbal-noun-examples {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.verbal-noun-examples h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Practice Section */
.practice-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.practice-activities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.activity-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.activity-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.activity-instruction {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.game-item,
.exercise-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.game-item:last-child,
.exercise-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sentence {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: var(--primary-color);
    color: white;
}

.option-btn.correct {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.option-btn.incorrect {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* Practice Widget */
.practice-widget {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.quiz-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.quiz-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.answer-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
    font-family: inherit;
}

.answer-input.correct {
    border-color: var(--success-color);
    background: var(--success-bg);
}

.answer-input.incorrect {
    border-color: var(--error-color);
    background: var(--error-bg);
}

.check-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.check-btn:hover {
    background: var(--primary-dark);
}

/* Related Topics */
.related-topics {
    padding: 3rem 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.topic-icon {
    font-size: 2rem;
}

.topic-name {
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 200px;
        text-align: center;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .functions-grid {
        grid-template-columns: 1fr;
    }
    
    .practice-activities {
        grid-template-columns: 1fr;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .options {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .function-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .verb-list,
    .preposition-list {
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .function-card,
    .topic-card,
    .nav-link {
        transition: none;
    }
    
    .function-card:hover,
    .topic-card:hover,
    .nav-link:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .function-card {
        border-width: 2px;
    }
    
    .option-btn {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .quick-nav,
    .practice-widget,
    .pronounce-btn,
    .option-btn,
    .check-btn {
        display: none;
    }
    
    .content-card {
        break-inside: avoid;
    }
}