/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4285f4;
    --secondary-color: #ea4335;
    --accent-color: #fbbc05;
    --success-color: #34a853;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.2);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Main Content */
.main-content {
    background: var(--white);
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, #c3cfe2 100%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    box-shadow: var(--shadow);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.search-btn:hover {
    background: #3367d6;
}

.content-section {
    padding: 3rem 2rem;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* Blogs Grid */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #f5f7fa;
}

.blog-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-excerpt {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.blog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    background: linear-gradient(45deg, #4285f4, #34a853);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

/* Admin Button */
.admin-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(234, 67, 53, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    text-decoration: none;
}

.admin-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(234, 67, 53, 0.6);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #3367d6;
}

.btn-secondary {
    background: #f8f9fa;
    color: #4285f4;
    border: 2px solid #4285f4;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4285f4;
    color: white;
}

/* Admin Panel */
.admin-panel {
    background: var(--white);
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
}

.logout-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c23321;
}

/* Rich Text Editor Styles */
.editor-toolbar {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-radius: 5px 5px 0 0;
}

.toolbar-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.toolbar-btn.active {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.editor-container {
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    margin-bottom: 1rem;
}

.rich-text-editor {
    min-height: 300px;
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    overflow-y: auto;
}

.rich-text-editor:focus {
    border-color: #4285f4;
}

.rich-text-editor h2 {
    color: #333;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.8rem;
}

.rich-text-editor h3 {
    color: #555;
    margin: 1.2rem 0 0.8rem 0;
    font-size: 1.4rem;
}

.rich-text-editor p {
    margin-bottom: 1rem;
}

.rich-text-editor ul, .rich-text-editor ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.rich-text-editor blockquote {
    border-left: 4px solid #4285f4;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #666;
}

.rich-text-editor a {
    color: #4285f4;
    text-decoration: underline;
}

.html-editor {
    font-family: monospace;
    min-height: 300px;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.image-preview {
    margin-top: 10px;
    text-align: center;
}

.image-preview img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 5px;
    border: 2px dashed #ddd;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Blog Management */
.blog-management-item {
    border: 1px solid #eee;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 10px;
    background: #f9f9f9;
}

.blog-management-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.blog-management-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.blog-management-details {
    flex: 1;
}

.blog-management-details h4 {
    color: #4285f4;
    margin-bottom: 0.5rem;
}

.blog-management-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-management-actions {
    display: flex;
    gap: 1rem;
}

.edit-btn {
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #218838;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    max-width: 90%;
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.modal .close:hover {
    color: #333;
}

.blog-preview {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Single Blog Page Styles */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #4285f4;
    text-decoration: none;
}

.breadcrumb span {
    color: #333;
}

.blog-single {
    max-width: 800px;
    margin: 0 auto;
}

.blog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-meta-large {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.featured-image-container {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.blog-content-full {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 3rem;
}

.blog-content-full h2 {
    color: #333;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.blog-content-full h3 {
    color: #555;
    margin: 1.5rem 0 0.8rem 0;
    font-size: 1.4rem;
}

.blog-content-full p {
    margin-bottom: 1.5rem;
}

.blog-content-full ul, .blog-content-full ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-content-full blockquote {
    border-left: 4px solid #4285f4;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0 5px 5px 0;
}

.blog-content-full a {
    color: #4285f4;
    text-decoration: underline;
}

.blog-actions-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 3rem;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.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 ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

.back-to-blogs {
    background: #4285f4;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-to-blogs:hover {
    background: #3367d6;
    transform: translateX(-5px);
}

.related-blogs {
    margin-top: 3rem;
}

.related-blogs h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

/* Privacy & Contact Content */
.privacy-content, .contact-content, .about-content, .terms-content, .disclaimer-content {
    padding: 2rem;
    line-height: 1.8;
}

.privacy-content h2, .contact-content h2, .about-content h2, .terms-content h2, .disclaimer-content h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
}

.privacy-content h3, .contact-content h3, .about-content h3, .terms-content h3, .disclaimer-content h3 {
    color: var(--text-color);
    margin: 1.5rem 0 0.5rem 0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Responsive Design */
/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .blogs-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 3rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-box input {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .blogs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-content {
        padding: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .blog-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .read-more-btn {
        align-self: stretch;
        text-align: center;
        justify-content: center;
    }
    
    .admin-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-meta-large {
        flex-direction: column;
        gap: 1rem;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .blog-actions-full {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-share {
        flex-direction: column;
        gap: 1rem;
    }
    
    .editor-toolbar {
        justify-content: center;
    }
    
    .blog-management-content {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-management-image {
        width: 100%;
        height: 200px;
    }
    
    .blog-management-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .blog-content {
        padding: 1rem;
    }
    
    .admin-btn {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
}