/* Reset dan 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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #c0392b;
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* About Grid Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: left; /* PERBAIKAN: ubah dari center ke left */
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-image {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-icon {
    font-size: 3rem;
    color: #3498db;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: left; /* PERBAIKAN: pastikan judul rata kiri */
    font-size: 1.5rem;
}

.service-card p {
    line-height: 1.6;
    color: #555;
    text-align: left; /* PERBAIKAN: pastikan paragraf rata kiri */
    margin-bottom: 0;
    flex-grow: 1; /* agar teks memenuhi space yang tersedia */
}


/* Doctors Section */
.doctors {
    background: #f8f9fa;
}

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

.doctor-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.doctor-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #7f8c8d;
    overflow: hidden;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.specialization {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.schedule {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-item i {
    margin-right: 1rem;
    color: #3498db;
    width: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form button {
    width: 100%;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Admin Styles */
.admin-body {
    background: #ecf0f1;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
}

.admin-sidebar h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #3498db;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    transition: background 0.3s;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background: #34495e;
}

.admin-sidebar ul li a i {
    margin-right: 0.5rem;
    width: 20px;
}

.admin-main {
    flex: 1;
    padding: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Admin Service Cards - juga perlu diperbaiki */
.admin-content .content-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    text-align: left; /* PERBAIKAN: untuk admin juga */
}

.admin-content .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    text-align: left;
}

.admin-content .card-header h3 {
    margin: 0;
    color: #2c3e50;
    text-align: left;
}

.admin-content .card-content {
    margin-bottom: 1rem;
    text-align: left;
}

.admin-content .card-content p {
    line-height: 1.6;
    color: #555;
    text-align: left;
    margin: 0;
}

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

.content-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.btn-add {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.btn-add:hover {
    background: #219a52;
}

.action-buttons {
    margin-top: 1rem;
}

.action-buttons button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 0.5rem;
}

.action-buttons .btn-delete {
    background: #e74c3c;
}

.action-buttons button:hover {
    opacity: 0.9;
}

.doctor-admin {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.doctor-admin img,
.doctor-admin i {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #7f8c8d;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Current Image Preview */
.current-image {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.current-image p {
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.current-image label {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-weight: normal;
}

.current-image input[type="checkbox"] {
    margin-right: 5px;
}

/* Form Improvements */
.form-group small {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Login Styles */
.admin-login {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.login-form h2 i {
    color: #3498db;
    margin-right: 10px;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .service-image {
        height: 150px;
    }
}
/* Home Content Section */
.home-content {
    padding: 80px 0;
    background: white;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.home-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.home-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.home-image:hover img {
    transform: scale(1.05);
}

.home-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.home-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #555;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.feature p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* About Section Updates */
.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .home-image {
        order: -1;
    }
    
    .home-text h2 {
        font-size: 2rem;
    }
    
    .home-features {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
}

/* Quill.js Styles */
.ql-toolbar.ql-snow {
    border: 1px solid #e0e0e0 !important;
    border-bottom: none !important;
    background: #f8f9fa !important;
}

.ql-container.ql-snow {
    border: 1px solid #e0e0e0 !important;
    border-top: none !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 14px !important;
}

.ql-editor {
    min-height: 350px !important;
    line-height: 1.6 !important;
}

.ql-toolbar .ql-stroke {
    stroke: #2c3e50 !important;
}

.ql-toolbar .ql-fill {
    fill: #2c3e50 !important;
}

.ql-toolbar .ql-picker-label {
    color: #2c3e50 !important;
}

.ql-toolbar .ql-picker-options {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
}

/* Modal adjustments for Quill */
.modal-content {
    max-width: 1000px !important;
    width: 95% !important;
}
/* Editor Content Styles */
.editor-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.editor-content h1 { 
    font-size: 2.5rem; 
    margin-top: 2rem;
}
.editor-content h2 { 
    font-size: 2rem; 
    margin-top: 1.8rem;
}
.editor-content h3 { 
    font-size: 1.75rem; 
    margin-top: 1.6rem;
}
.editor-content h4 { 
    font-size: 1.5rem; 
    margin-top: 1.4rem;
}
.editor-content h5 { 
    font-size: 1.25rem; 
    margin-top: 1.2rem;
}
.editor-content h6 { 
    font-size: 1.1rem; 
    margin-top: 1rem;
}

.editor-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.editor-content ul,
.editor-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.editor-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.editor-content strong {
    color: #2c3e50;
    font-weight: 700;
}

.editor-content em {
    color: #7f8c8d;
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

.editor-content blockquote {
    border-left: 4px solid #3498db;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 0 5px 5px 0;
    font-style: italic;
    color: #555;
}

.editor-content blockquote footer {
    margin-top: 1rem;
    font-weight: 600;
    color: #2c3e50;
    font-style: normal;
}

.editor-image {
    margin: 2rem 0;
    text-align: center;
}

.editor-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.image-caption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Home and About specific styles */
.home-description.editor-content,
.about-description.editor-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.home-description.editor-content h1,
.home-description.editor-content h2,
.about-description.editor-content h1,
.about-description.editor-content h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .editor-content h1 { font-size: 2rem; }
    .editor-content h2 { font-size: 1.75rem; }
    .editor-content h3 { font-size: 1.5rem; }
    .editor-content h4 { font-size: 1.25rem; }
    
    .editor-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .editor-content ul,
    .editor-content ol {
        padding-left: 1.5rem;
    }
}

/* Contact Admin Styles */
.contact-item-admin {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.2rem;
    color: white;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.contact-info p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}