/* Reset & Base Styles */
* {
    margin:0;
    padding:0;
    box-sizing: border-box;
}

:root {
    --primary-color: #002D6D;
    --secondary-color: #E20074;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --hover-color: #001F4B;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

/* Header & Navigation */
.header {
    background-color: var(--primary-color);
    color: var(--white);
    padding:1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top:0;
    z-index: 1000;
}

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

.logo a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--white);
}

.logo-title span {
    color: var(--secondary-color);
}

.logo-subtitle {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Main Navigation with Dropdowns */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

.category-item {
    position: relative;
}

.subcategory-dropdown {
    position: absolute;
    top: 100%;
    left:0;
    background: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity:0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.category-item:hover .subcategory-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.subcategory-dropdown a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.subcategory-dropdown a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Carousel Section */
.carousel-section {
    background: var(--white);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.carousel-container {
    max-width: 1200px;
    margin:0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.carousel {
    position: relative;
    height: 500px;
}

.carousel-slide {
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    opacity:0;
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom:0;
    left:0;
    right:0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: 3rem;
}

.carousel-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.carousel-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #c70064;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--white);
}

/* Tips Section */
.tips-section {
    padding: 3rem 0;
    background: var(--white);
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

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

.tip-card {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tip-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tip-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title i {
    color: var(--secondary-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.article-card h3 a {
    color: inherit;
    text-decoration: none;
}

.article-card .meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.article-card .excerpt {
    color: #666;
    line-height: 1.5;
}

.view-all {
    text-align: center;
}

.btn-view-all {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-view-all:hover {
    background: var(--hover-color);
}

/* Enhanced Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-nav {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--secondary-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .carousel {
        height: 300px;
    }
    
    .carousel-content h2 {
        font-size: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* No Articles Message */
.no-articles {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: var(--white);
    border-radius: 8px;
}

/* Article Container with Sidebar */
.article-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .article-container {
        grid-template-columns: 1fr;
    }
}

/* Article Detail */
.article-detail {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.article-detail h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-body {
    line-height: 1.8;
    color: var(--text-color);
}

.article-body h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-body h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body code {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.article-body pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-body blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-light);
    font-style: italic;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

@media (max-width: 968px) {
    .article-sidebar {
        position: static;
    }
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget h3 i {
    color: var(--secondary-color);
}

/* Article Info Widget */
.article-meta-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.meta-item i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #4267B2; }
.share-btn.linkedin { background: #0077B5; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.link { background: #666; }

/* Related Articles Widget */
.related-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-item:last-child {
    border-bottom: none;
}

.related-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    transition: color 0.3s;
}

.related-item a:hover {
    color: var(--secondary-color);
}

.related-item .related-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Popular Articles Widget */
.popular-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    opacity: 0.5;
    min-width: 30px;
}

.popular-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.popular-item a:hover {
    color: var(--secondary-color);
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--light-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--secondary-color);
    color: white;
}

/* Back Link */
.back-link {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link a:hover {
    color: var(--secondary-color);
}

/* Comments Section */
.comments-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.comments-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-section h2 i {
    color: var(--secondary-color);
}

/* Comment Form */
.comment-form-container {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.comment-form-container h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form-container h3 i {
    color: var(--secondary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

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

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-color);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-check label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: var(--hover-color);
}

.comment-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding: 0.8rem;
    background: #fff3cd;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.comment-note i {
    color: #856404;
    margin-top: 0.2rem;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar i {
    font-size: 2.5rem;
    color: var(--text-light);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.comment-text {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.comment-actions a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s;
}

.comment-actions a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .article-detail {
        padding: 1.5rem;
    }
    
    .article-detail h1 {
        font-size: 1.5rem;
    }
    
    .comments-section {
        padding: 1.5rem;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 0.5rem;
    }
}

