/* CSS Variables */
:root {
    --primary: #3498db;
    --secondary: #e74c3c;
    --accent: #2ecc71;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --text: #34495e;
    --gray: #95a5a6;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    text-align: center;
    margin-top: 15px;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    color: var(--secondary);
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.5rem;
}

.logo a {
    color: inherit;
}

.nav {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 30px;
    position: relative;
}

.nav li a {
    font-weight: 600;
    color: var(--dark);
}

.nav li a:hover {
    color: var(--primary);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--dark);
    transition: var(--transition);
}

.dropdown-content a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                 url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: white;
    padding: 150px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.4rem;
    margin: 0 auto 30px;
    color: var(--light);
    max-width: 700px;
}

/* Categories Section */
.categories {
    background-color: var(--light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 30px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.category-card h3 a {
    color: var(--dark);
    font-size: 1.5rem;
}

.category-card h3 a:hover {
    color: var(--primary);
}

.recent-posts {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light);
}

.recent-posts h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.recent-posts ul {
    list-style: none;
}

.recent-posts ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.recent-posts ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.recent-posts ul li a {
    color: var(--dark);
}

.recent-posts ul li a:hover {
    color: var(--primary);
}

.recent-posts p {
    font-style: italic;
    color: var(--gray);
    margin-top: 10px;
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Latest Posts Section */
.latest-posts {
    background-color: var(--light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-content h3 a {
    color: var(--dark);
    font-size: 1.3rem;
}

.post-content h3 a:hover {
    color: var(--primary);
}

.read-more {
    display: inline-block;
    font-weight: 600;
    color: var(--primary);
    margin-top: 15px;
}

.read-more i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Contact CTA */
.contact-cta {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 80px 0;
}

.contact-cta h2 {
    color: white;
}

.contact-cta h2::after {
    background: white;
}

.contact-cta p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.2rem;
}

.contact-cta .btn {
    background: white;
    color: var(--primary);
    border-color: white;
}

.contact-cta .btn:hover {
    background: transparent;
    color: white;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray);
    padding: 60px 0 30px;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--gray);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

.copyright p {
    margin-bottom: 5px;
    color: var(--gray);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top: 5px solid var(--primary);
    animation: spin 1s linear infinite;
    margin: 30px auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        flex-direction: column;
        z-index: 1000;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav li {
        margin: 10px 0;
        padding: 0 20px;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 10px 0 0 20px;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-cta {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2.3rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}