/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0078d4;
    --primary-dark: #005a9e;
    --secondary-color: #106ebe;
    --text-color: #323130;
    --text-light: #605e5c;
    --bg-color: #ffffff;
    --bg-light: #faf9f8;
    --border-color: #edebe9;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #000000;
    --primary-dark: #000000;
    --secondary-color: #000000;
    --text-color: #ffffff;
    --text-light: #e0e0e0;
    --bg-color: #1a1a1a;
    --bg-light: #2d2d2d;
    --border-color: #404040;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 100%;
    transition: var(--transition);
}

.logo img:hover {
    opacity: 0.8;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    flex-shrink: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.navbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
}

.search-input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    transition: var(--transition);
    font-family: inherit;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.search-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
}

.search-btn:hover {
    opacity: 0.7;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero-modern {
    padding: 3rem 0 2rem 0;
    background-color: var(--bg-color);
}

.hero-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-size: 200% 200%;
    color: white;
    padding: 3rem 4rem;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 120, 212, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 8s ease infinite;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: float 6s ease-in-out infinite;
}

.hero-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.hero-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 120, 212, 0.3);
}

.badge-label {
    display: block;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.badge-description {
    font-size: 1.35rem;
    opacity: 0.95;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Legacy hero styles for other pages */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Page Header */
.page-header {
    padding: 3rem 0 2rem 0;
    background-color: var(--bg-color);
}

.page-header .container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-size: 200% 200%;
    color: white;
    padding: 3rem 4rem;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 120, 212, 0.2);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 8s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.page-header .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: float 6s ease-in-out infinite;
}

.page-header .container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.page-header .container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 120, 212, 0.3);
}

.page-header h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 1.35rem;
    opacity: 0.95;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Blog Posts Section */
.blog-posts {
    padding: 2rem 0 4rem 0;
    background-color: var(--bg-color);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-size: 200% 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 120, 212, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 8s ease infinite;
}

.post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.post-image::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.post-card:hover .post-image {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 120, 212, 0.3);
}

.post-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.image-placeholder {
    font-size: 4rem;
    position: relative;
    z-index: 1;
}

.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-date {
    color: var(--text-light);
    font-size: 0.875rem;
    display: inline;
    margin-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    text-align: left;
}

.post-content > p {
    color: var(--text-light);
    margin-bottom: 0;
    text-align: left;
}

.read-more {
    color: white;
    background-color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.2);
    min-height: 44px;
}

.read-more:hover {
    background-color: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
    transform: translateY(-2px);
}

/* Share Buttons */
.share-section {
    padding-top: 0;
    border-top: none;
    margin-bottom: 0;
    margin-top: 0;
}

.share-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
    display: block;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    font-size: 0;
    padding: 0;
    overflow: hidden;
}

.share-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn img {
    width: 24px;
    height: 24px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

/* About Page */
.about-content {
    padding: 4rem 0 2rem 0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-card-small:hover {
    transform: translateY(-5px);
}

.intro-section {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-section:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.about-image {
    position: sticky;
    top: 100px;
}

.image-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.image-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.image-box p {
    opacity: 0.9;
}

/* Contact Page */
.contact-content {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.contact-item p {
    color: var(--text-light);
}

.contact-form-container {
    background: var(--bg-color);
    padding: 3.5rem 4rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-container:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.contact-form-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
}

.form-group label span:last-child {
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-color);
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.25rem 3rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.disabled:hover {
    background-color: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

.post-card.hidden {
    display: none !important;
}

/* Footer */
footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    padding: 0;
    margin: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: auto;
    height: auto;
    box-shadow: none;
    outline: none;
    line-height: 1;
    text-align: center;
    position: relative;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
    vertical-align: middle;
}

.dark-mode-toggle span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    text-align: center !important;
    position: relative !important;
    transform: translate(0, 0);
}

.dark-mode-toggle:hover {
    background-color: transparent;
    border: none;
    box-shadow: none;
    transform: scale(1.1);
    opacity: 0.8;
}

.dark-mode-toggle:focus {
    outline: none;
    border: none;
}

[data-theme="dark"] .dark-mode-toggle {
    background-color: transparent;
    border: none;
    color: var(--text-color);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background-color: transparent;
    border: none;
    box-shadow: none;
    transform: scale(1.1);
    opacity: 0.8;
}

[data-theme="dark"] .dark-mode-toggle:focus {
    outline: none;
    border: none;
}

/* Dark Mode - Additional Element Styles */
[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .navbar {
    background-color: var(--bg-color);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .post-card {
    background-color: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .post-card:hover {
    box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .read-more {
    background-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .read-more:hover {
    background-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

[data-theme="dark"] .btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

[data-theme="dark"] .hero-badge,
[data-theme="dark"] .page-header .container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

[data-theme="dark"] .contact-form-container,
[data-theme="dark"] .intro-section,
[data-theme="dark"] .blog-posts,
[data-theme="dark"] .contact-content,
[data-theme="dark"] .features-section {
    background-color: var(--bg-color);
}

[data-theme="dark"] .feature-card {
    background-color: var(--bg-light);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] .feature-card {
    background-color: var(--bg-light);
}

[data-theme="dark"] .pagination-btn {
    background-color: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination-btn:hover:not(.disabled) {
    background-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Dark Mode - All Links White */
[data-theme="dark"] a {
    color: var(--text-color);
}

[data-theme="dark"] .nav-menu a,
[data-theme="dark"] .nav-menu a:hover,
[data-theme="dark"] .nav-menu a.active {
    color: var(--text-color);
}

[data-theme="dark"] .back-link,
[data-theme="dark"] .back-link:hover {
    color: var(--text-color);
}

[data-theme="dark"] a[href]:not(.read-more):not(.btn-submit):not(.pagination-btn):not(.share-btn):not(.dark-mode-toggle):not(.search-btn) {
    color: var(--text-color);
}

[data-theme="dark"] a[href]:not(.read-more):not(.btn-submit):not(.pagination-btn):not(.share-btn):not(.dark-mode-toggle):not(.search-btn):hover {
    color: var(--text-light);
    opacity: 0.9;
}

[data-theme="dark"] .nav-menu a.active::after {
    background-color: var(--text-color);
}

[data-theme="dark"] .feature-list li::before {
    color: var(--text-color);
}

[data-theme="dark"] .about-text a,
[data-theme="dark"] .blog-content a {
    color: var(--text-color);
}

[data-theme="dark"] .about-text a:hover,
[data-theme="dark"] .blog-content a:hover {
    color: var(--text-light);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 0.8;
}

/* Responsive Design */

/* Tablet and below (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .about-grid {
        gap: 2rem;
    }

    .contact-grid {
        gap: 2rem;
    }

    .hero-badge,
    .page-header .container {
        padding: 2.5rem 3rem;
    }

    .contact-form-container {
        padding: 3rem 3rem;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    /* Navigation */
    .navbar .container {
        flex-wrap: wrap;
        padding: 0.875rem 1rem;
        gap: 0.75rem;
        align-items: center;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo a {
        gap: 0.5rem !important;
    }

    .logo h1 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo img {
        height: 32px;
        flex-shrink: 0;
    }

    .hamburger {
        display: flex;
        order: 2;
        margin-left: 0.5rem;
        padding: 0.5rem;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
        border-radius: 8px;
        transition: var(--transition);
        cursor: pointer;
    }
    
    .hamburger:hover {
        background-color: var(--bg-light);
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 1rem;
        z-index: 10000;
        display: flex !important;
    }

    .nav-menu.active {
        left: 0 !important;
    }

    .navbar-right {
        order: 3;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        position: relative;
    }

    .navbar-right .nav-menu {
        display: none !important;
    }
    
    /* Ensure the nav-menu is visible when active, even if inside navbar-right */
    .nav-menu.active {
        display: flex !important;
    }

    .navbar-search {
        flex: 1;
        min-width: 0;
    }

    .search-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        font-size: 0.9rem;
        padding: 0.625rem 2.25rem 0.625rem 0.875rem;
    }

    .dark-mode-toggle {
        order: 2;
        margin-left: 0.5rem;
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: var(--transition);
    }
    
    .dark-mode-toggle:hover {
        background-color: var(--bg-light);
    }

    /* Hero Sections */
    .hero-modern {
        padding: 2rem 0 1.5rem 0;
    }

    .hero-badge {
        padding: 2rem 2.5rem;
    }

    .badge-label {
        font-size: 2rem;
    }

    .badge-description {
        font-size: 1.15rem;
    }

    .page-header {
        padding: 2rem 0 1.5rem 0;
    }

    .page-header .container {
        padding: 2rem 2.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1.15rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* Blog Posts */
    .blog-posts {
        padding: 1.5rem 0 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .post-card {
        margin-bottom: 0;
    }

    .post-content {
        padding: 1.25rem;
    }

    .post-content h3 {
        font-size: 1.15rem;
    }

    /* About Page */
    .about-content {
        padding: 2rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        position: static;
    }

    .image-box {
        padding: 1.5rem;
    }

    .icon-large {
        font-size: 3rem;
    }

    .about-text h2 {
        font-size: 1.5rem;
    }

    /* Contact Page */
    .contact-content {
        padding: 2rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 2.5rem 2.5rem;
    }

    .contact-form-container h2 {
        font-size: 2rem;
    }

    .contact-form > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
        margin-top: 3rem;
    }

    footer .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    footer .container > div:first-child {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    footer .container > div:first-child img {
        margin-bottom: 0.5rem;
    }
    
    footer p {
        font-size: 0.9rem;
        line-height: 1.7;
        color: var(--text-light);
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Pagination */
    .pagination {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Share Buttons */
    .share-buttons {
        gap: 0.5rem;
    }

    .share-btn {
        width: 36px;
        height: 36px;
    }

    .share-btn img {
        width: 20px;
        height: 20px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Navigation */
    .navbar .container {
        padding: 0.75rem 0.875rem;
        gap: 0.5rem;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .logo img {
        height: 28px;
    }

    .logo a {
        gap: 0.4rem !important;
    }

    .hamburger {
        margin-left: 0.25rem;
        padding: 0.4rem;
        min-width: 36px;
        min-height: 36px;
    }

    .hamburger span {
        width: 22px;
        height: 2.5px;
    }

    .navbar-right {
        gap: 0.5rem;
        padding-top: 0.625rem;
        margin-top: 0.5rem;
    }

    .search-input {
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
        min-width: 0;
    }

    .dark-mode-toggle {
        font-size: 1rem;
        padding: 0.4rem;
        min-width: 36px;
        min-height: 36px;
        margin-left: 0.25rem;
    }
    
    .nav-menu {
        top: 56px;
    }

    /* Hero Sections */
    .hero-modern {
        padding: 1.5rem 0 1rem 0;
    }

    .hero-badge {
        padding: 1.5rem 1.5rem;
        border-radius: 16px;
    }

    .badge-label {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .badge-description {
        font-size: 1rem;
        line-height: 1.5;
    }

    .page-header {
        padding: 1.5rem 0 1rem 0;
    }

    .page-header .container {
        padding: 1.5rem 1.5rem;
        border-radius: 16px;
    }

    .page-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .page-header p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Blog Posts */
    .blog-posts {
        padding: 1.5rem 0 2rem 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .post-image {
        height: 180px;
    }

    .image-placeholder {
        font-size: 3rem;
    }

    .post-content {
        padding: 1rem;
    }

    .post-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .post-date {
        font-size: 0.8rem;
    }

    .read-more {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }

    /* About Page */
    .about-content {
        padding: 1.5rem 0;
    }

    .intro-section {
        padding: 1.5rem !important;
    }

    .about-text h2 {
        font-size: 1.35rem;
        margin-top: 1.5rem;
    }

    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .feature-list li {
        padding: 0.5rem 0;
        padding-left: 1.25rem;
        font-size: 0.95rem;
    }

    .image-box {
        padding: 1.25rem;
    }

    .icon-large {
        font-size: 2.5rem;
    }

    .image-box h3 {
        font-size: 1.25rem;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .feature-card,
    .feature-card-small {
        padding: 1.5rem !important;
    }

    .feature-icon {
        font-size: 2.5rem !important;
    }

    .feature-card h3,
    .feature-card-small h3 {
        font-size: 1.25rem !important;
    }

    /* Contact Page */
    .contact-content {
        padding: 1.5rem 0;
    }

    .contact-info h2 {
        font-size: 1.5rem;
    }

    .contact-form-container {
        padding: 1.5rem 1.25rem;
    }

    .contact-form-container h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .btn-submit {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .contact-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-icon {
        font-size: 1.5rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }

    footer .container {
        gap: 1.25rem;
    }
    
    footer .container > div:first-child {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        text-align: center;
    }
    
    footer .container > div:first-child img {
        margin-bottom: 0.25rem;
    }

    footer p {
        font-size: 0.875rem;
        line-height: 1.7;
        color: var(--text-light);
        margin: 0;
        padding: 0 1rem;
        word-wrap: break-word;
        max-width: 100%;
        letter-spacing: 0.3px;
    }
    
    footer .container > div:first-child::after {
        content: '';
        display: block;
        width: 50px;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--border-color), transparent);
        margin: 0.75rem auto 0;
        opacity: 0.6;
    }

    .social-links {
        gap: 0.75rem;
        justify-content: center;
    }

    .social-links img {
        width: 20px;
        height: 20px;
    }

    /* Pagination */
    .pagination-container {
        margin-top: 2rem;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    /* Share Buttons */
    .share-section {
        margin-top: 0.75rem;
    }

    .share-label {
        font-size: 0.8rem;
    }

    .share-btn {
        width: 32px;
        height: 32px;
    }

    .share-btn img {
        width: 18px;
        height: 18px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }

    .badge-label {
        font-size: 1.35rem;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .contact-form-container h2 {
        font-size: 1.5rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-modern,
    .page-header {
        padding: 1.5rem 0 1rem 0;
    }

    .hero-badge,
    .page-header .container {
        padding: 1.5rem 2rem;
    }

    .badge-label {
        font-size: 1.75rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .read-more,
    .btn-submit,
    .pagination-btn,
    .share-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        display: block;
    }

    .dark-mode-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Responsive overrides for inline styles */
@media (max-width: 768px) {
    .intro-section {
        padding: 1.5rem !important;
    }
    
    div[style*="display: flex"][style*="justify-content: center"] {
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
    
    div[style*="display: grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .intro-section {
        padding: 1rem !important;
    }
    
    div[style*="display: flex"][style*="justify-content: center"] {
        flex-direction: column !important;
        align-items: center !important;
    }
}

