/* ========================================
   STUDY MATERIAL PAGE STYLES - MODAL CARD LAYOUT
   ======================================== */

/* Main Container - Modal Style */
.study-material-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.study-material-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,95,163,0.1);
}

/* Card Header */
.study-material-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.study-material-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.study-material-header > * {
    position: relative;
    z-index: 1;
}

.study-material-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.study-material-header p {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

/* Card Body */
.study-material-body {
    padding: 2.5rem;
}

/* Section Grid Layout */
.study-sections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Interactive Tools Section */
.civics-tools-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid rgba(0,95,163,0.1);
    position: relative;
    overflow: hidden;
}

.civics-tools-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,95,163,0.03) 0%, transparent 70%);
    pointer-events: none;
}

.civics-tools-section > * {
    position: relative;
    z-index: 1;
}

.section-title {
    color: #005fa3;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-title::before {
    content: "🎯";
    font-size: 1.4rem;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.civic-tool-btn {
    background: white;
    border: 2px solid rgba(0,95,163,0.1);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.civic-tool-btn:hover::before {
    left: 100%;
}

.civic-tool-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #005fa3;
}

/* Tool Button Icons */
.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Individual button styles */
.civic-tool-btn.flashcards {
    border-color: rgba(0,95,163,0.2);
}

.civic-tool-btn.flashcards:hover {
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    border-color: #005fa3;
}

.civic-tool-btn.flashcards .tool-title {
    color: #005fa3;
}

.civic-tool-btn.quiz {
    border-color: rgba(40,167,69,0.2);
}

.civic-tool-btn.quiz:hover {
    background: linear-gradient(135deg, #f8fff8, #ffffff);
    border-color: #28a745;
}

.civic-tool-btn.quiz .tool-title {
    color: #28a745;
}

.civic-tool-btn.reading {
    border-color: rgba(111,66,193,0.2);
}

.civic-tool-btn.reading:hover {
    background: linear-gradient(135deg, #faf8ff, #ffffff);
    border-color: #6f42c1;
}

.civic-tool-btn.reading .tool-title {
    color: #6f42c1;
}

/* Study Resources Section */
.study-resources-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid rgba(0,95,163,0.1);
    margin-top: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Study Tips Box */
.study-tips-box {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 5px solid #d4a574;
    position: relative;
}

.study-tips-box::before {
    content: "💡";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
}

.study-tips-box h3 {
    color: #856404;
    margin-bottom: 1rem;
    font-weight: 600;
}

.study-tips-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.study-tips-box li {
    margin-bottom: 0.5rem;
    color: #654321;
    line-height: 1.5;
}

/* Download Materials Box */
.download-materials {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 5px solid #005fa3;
}

.download-materials h3 {
    color: #005fa3;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-materials h3::before {
    content: "📄";
    font-size: 1.2rem;
}

.download-link {
    color: #005fa3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.7);
    margin: 0.25rem 0;
    border: 1px solid transparent;
}

.download-link:hover {
    color: #004080;
    background: white;
    border-color: rgba(0,95,163,0.2);
    transform: translateX(3px);
}

.download-link::before {
    content: "⬇️";
    font-size: 0.9rem;
}

/* Card Footer */
.study-material-footer {
    background: #f8f9fa;
    padding: 1.5rem 2.5rem;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-note {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .study-material-container {
        padding: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .study-material-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .study-material-header h1 {
        font-size: 2rem;
    }
    
    .study-material-header p {
        font-size: 1rem;
    }
    
    .study-material-body {
        padding: 2rem 1.5rem;
    }
    
    .civics-tools-section {
        padding: 1.5rem;
    }
    
    .civic-tool-btn {
        padding: 1.25rem;
        min-height: 100px;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .study-material-footer {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .study-material-container {
        padding: 0.5rem;
        align-items: center;
    }
    
    .study-material-header h1 {
        font-size: 1.8rem;
    }
    
    .study-material-body {
        padding: 1.5rem 1rem;
    }
    
    .civic-tool-btn {
        padding: 1rem;
        min-height: 90px;
    }
    
    .tool-icon {
        font-size: 1.8rem;
    }
    
    .tool-title {
        font-size: 1rem;
    }
    
    .study-tips-box,
    .download-materials {
        padding: 1.25rem;
    }
}

/* Quick Study Tips Section */
.study-tips-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #005fa3;
    margin: 1.5rem 0;
    position: relative;
}

.study-tips-box::before {
    content: "💡";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.study-tips-box h3 {
    color: #005fa3;
    margin-bottom: 1rem;
    font-weight: 600;
}

.study-tips-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.study-tips-box li {
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.6;
}

/* Download Materials Section */
.download-materials {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,95,163,0.1);
}

.download-materials h3 {
    color: #005fa3;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-materials h3::before {
    content: "📄";
    font-size: 1.2rem;
}

/* Download Links */
.download-link {
    color: #005fa3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    margin: 0.25rem 0;
}

.download-link:hover {
    color: #004080;
    background: rgba(0,95,163,0.05);
    border-color: rgba(0,95,163,0.2);
    transform: translateX(5px);
}

.download-link::before {
    content: "⬇️";
    font-size: 0.9rem;
}

/* Progress Tracking Section */
.progress-section {
    background: linear-gradient(135deg, #d4a574, #c19660);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
}

.progress-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-section p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .study-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 1.5rem auto 0;
    }
}

@media (max-width: 768px) {
    .study-material-header h1 {
        font-size: 2rem;
    }
    
    .study-material-header p {
        font-size: 1rem;
    }
    
    .civics-tools-container {
        padding: 1.5rem;
    }
    
    .civic-tool-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .study-section {
        padding: 1.5rem;
    }
    
    .study-tips-box {
        padding: 1.5rem;
    }
    
    .download-materials {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .study-material-header h1 {
        font-size: 1.8rem;
    }
    
    .civic-tool-btn {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
        min-height: 50px;
    }
    
    .civics-tools-container {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .study-section {
        padding: 1.25rem;
    }
    
    .study-tips-box {
        padding: 1.25rem;
    }
}
