/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background-color: #2c3e50;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.mobile-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 30px;
}

/* Article Styles */
.article-container {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pasal-center {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.article-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.materi-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.materi-section h3 {
    color: #3498db;
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Expert Card */
.expert-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #3498db;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.expert-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.expert-card h4 {
    color: #3498db;
    margin-bottom: 10px;
}

/* Number Line */
.number-line-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #3498db;
    position: relative;
    overflow-x: auto;
}

.number-line {
    display: flex;
    justify-content: space-between;
    position: relative;
    height: 60px;
    min-width: 500px;
}

.number-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #2c3e50;
    transform: translateY(-50%);
}

.number-point {
    position: relative;
    width: 40px;
    text-align: center;
}

.number-point::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #e74c3c;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e74c3c;
}

.number-label {
    position: absolute;
    top: calc(50% + 15px);
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: #2c3e50;
}

.line-direction {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Example Table */
.example-table {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    min-width: 500px;
}

th {
    background-color: #3498db;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f4fc;
}

/* Fraction Examples */
.fraction-examples {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.fraction-item {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Solution Steps */
.solution-steps {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #27ae60;
    margin: 15px 0;
}

.highlight {
    background-color: #fffacd;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

.tip {
    background-color: #e8f4fc;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-style: italic;
    color: #2980b9;
}

/* Decimal Place Value */
.decimal-place-value {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ddd;
}

.place-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.place-item {
    text-align: center;
    padding: 0 15px;
}

.place-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.place-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.decimal-point {
    font-size: 2rem;
    font-weight: bold;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.number-read {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 1.1rem;
}

/* Power Example */
.power-example {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.power-base {
    font-size: 1.5rem;
    font-weight: bold;
}

.power-exponent {
    font-size: 1rem;
    position: relative;
    top: -10px;
}

.power-equals {
    font-size: 1.5rem;
    margin: 0 10px;
}

.power-explanation {
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Root Example */
.root-example {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.root-symbol {
    font-size: 1.5rem;
    font-weight: bold;
}

.root-number {
    font-size: 1.5rem;
    margin-right: 10px;
}

.root-equals {
    font-size: 1.5rem;
    margin: 0 10px;
}

.root-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
}

.root-explanation {
    font-size: 1rem;
    color: #7f8c8d;
    margin-left: 10px;
}

/* Perfect Squares */
.perfect-squares {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.square-item {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

/* Scientific Notation */
.scientific-notation {
    text-align: center;
    margin: 20px 0;
}

.sci-format {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.sci-coefficient {
    color: #e74c3c;
    font-weight: bold;
}

.sci-times {
    margin: 0 10px;
}

.sci-base {
    color: #3498db;
    font-weight: bold;
}

.sci-exponent {
    position: relative;
    top: -10px;
    font-size: 1rem;
}

.sci-conditions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

/* Exercise Section */
.exercise-section {
    background-color: #e8f4fc;
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
}

.exercise-container {
    margin-top: 20px;
}

.exercise-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #f39c12;
}

.exercise-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.show-solution-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.show-solution-btn:hover {
    background-color: #2980b9;
}

.solution-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    margin-top: 15px;
}

.solution-box.show {
    max-height: 500px;
}

.solution-box h4 {
    color: #27ae60;
    margin-bottom: 10px;
}

/* Conclusion Box */
.conclusion-box {
    background-color: #e8f4fc;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    border-left: 5px solid #3498db;
}

.conclusion-box h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.conclusion-box ul {
    padding-left: 20px;
    margin: 15px 0;
}

.conclusion-box li {
    margin-bottom: 10px;
}

/* Reference Box */
.reference-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-top: 2px solid #ddd;
}

.reference-box h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reference-box ul {
    padding-left: 20px;
}

.reference-box li {
    margin-bottom: 10px;
    font-style: italic;
}

/* Concept Map */
.concept-map {
    text-align: center;
    margin: 20px 0;
}

.concept-item {
    background-color: #3498db;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px;
    font-weight: bold;
    display: inline-block;
}

.main-concept {
    background-color: #2c3e50;
    font-size: 1.2rem;
}

.concept-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sub-concepts {
    margin-top: 10px;
}

.sub-concept {
    background-color: #27ae60;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin-top: 5px;
    font-size: 0.9rem;
}

.concept-connector {
    height: 20px;
    width: 2px;
    background-color: #3498db;
    margin: 0 auto;
}

/* Sidebar Styles */
.sidebar {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 10px;
}

.sidebar-widget a {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    transition: color 0.3s;
}

.sidebar-widget a:hover {
    color: #2980b9;
}

.sidebar-widget a.active {
    color: #e74c3c;
    font-weight: bold;
}

/* Quiz Button */
.quiz-btn {
    display: block;
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: transform 0.3s;
}

.quiz-btn:hover {
    transform: translateY(-3px);
    color: white;
}

/* Difficulty Level */
.difficulty-level {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.level-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.level-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.level-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.level-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.whatsapp {
    background-color: #25d366;
}

.copy {
    background-color: #7f8c8d;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    .article-container {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .number-line {
        min-width: 400px;
    }
    
    table {
        min-width: 400px;
    }
}

@media (max-width: 576px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .perfect-squares {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .fraction-examples {
        justify-content: center;
    }
    
    .number-line {
        min-width: 300px;
    }
    
    table {
        min-width: 300px;
    }
    
    .concept-map .concept-row {
        flex-direction: column;
        align-items: center;
    }
}