/* General Body Styles */
:root {
    --primary-color: #4F46E5;
    --primary-color-dark: #4338CA;
    --secondary-color: #10B981;
    --background-light: #F9FAFB;
    --background-dark: #111827;
    --text-light: #1F2937;
    --text-dark: #F3F4F6;
    --card-bg-light: #FFFFFF;
    --card-bg-dark: #1F2937;
    --border-light: #E5E7EB;
    --border-dark: #374151;
    --danger-color: #EF4444;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--background-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    --background-light: var(--background-dark);
    --text-light: var(--text-dark);
    --card-bg-light: var(--card-bg-dark);
    --border-light: var(--border-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--card-bg-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 700;
    font-size: 24px;
    color: var(--text-light);
    text-decoration: none;
}

.main-nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    margin-right: 15px;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dark-mode-toggle:hover {
    background-color: var(--background-light);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.btn-secondary {
    background-color: #E0E7FF;
    color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: #C7D2FE;
}

/* General Tool Page Styles (NOT for homepage) */
body:not(.homepage) .tool-container {
    padding: 40px 0;
}

body:not(.homepage) .tool-header {
    text-align: center;
    margin-bottom: 40px;
}

body:not(.homepage) .tool-header h1 {
    font-size: 2.25rem; /* 36px */
    font-weight: 800;
}

body:not(.homepage) .tool-content {
    background-color: var(--card-bg-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body:not(.homepage) .form-group {
    margin-bottom: 20px;
}

body:not(.homepage) .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

body:not(.homepage) .form-group input, 
body:not(.homepage) .form-group textarea, 
body:not(.homepage) .form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background-color: var(--background-light);
    color: var(--text-light);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body:not(.homepage) .form-group input:focus, 
body:not(.homepage) .form-group textarea:focus, 
body:not(.homepage) .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* --- HOMEPAGE V2 STYLES (SCOPED) --- */
/* These styles will ONLY apply on the homepage */

body.homepage .hero-v2 {
    padding: 60px 0;
    text-align: center;
}

body.homepage .hero-v2 h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
}

body.homepage .hero-v2 .subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    max-width: 650px;
    margin: 20px auto 40px;
}

body.dark-mode.homepage .hero-v2 .subtitle {
    color: #9CA3AF;
}

body.homepage .search-bar-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

body.homepage .search-bar-container i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

body.homepage #search-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    font-size: 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    background-color: var(--card-bg-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.homepage #search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

body.homepage .tools-section {
    padding: 60px 0;
}

body.homepage .section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 800;
}

body.homepage .tool-category {
    margin-bottom: 50px;
}

body.homepage .tool-category h3 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

body.homepage .tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

body.homepage .tool-card-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    background-color: var(--card-bg-light);
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

body.homepage .tool-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body.homepage .tool-card-v2 .icon-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

body.homepage .tool-card-v2 .text-container h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

body.homepage .tool-card-v2 .text-container p {
    margin: 0;
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.5;
}

body.dark-mode.homepage .tool-card-v2 p {
    color: #9CA3AF;
}

body.homepage .why-us-section {
    padding: 80px 0;
}

body.homepage .why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

body.homepage .why-us-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

body.homepage .why-us-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

body.homepage .why-us-item p {
    color: #6B7280;
}
body.dark-mode.homepage .why-us-item p {
    color: #9CA3AF;
}


/* Footer */
.footer {
    background-color: var(--card-bg-light);
    border-top: 1px solid var(--border-light);
    padding: 20px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 14px;
    color: #6B7280;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: #6B7280;
    text-decoration: none;
    margin-left: 20px;
}

body.dark-mode .footer, body.dark-mode .footer-links a {
    color: #9CA3AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container, .footer .container {
        flex-direction: column;
    }
    .main-nav {
        margin: 15px 0;
    }
    .footer-links {
        margin-top: 10px;
    }
}

/* --- ABOUT PAGE STYLES --- */
body.about-page .about-hero {
    padding: 60px 0;
    text-align: center;
    background-color: var(--card-bg-light);
}
body.about-page .about-hero h1 {
    font-size: 3rem;
    font-weight: 800;
}
body.about-page .about-hero .subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    max-width: 650px;
    margin: 20px auto 0;
}
body.dark-mode.about-page .about-hero .subtitle {
    color: #9CA3AF;
}
body.about-page .about-content {
    padding: 60px 0;
}
body.about-page .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}
body.about-page .about-card {
    background-color: var(--card-bg-light);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}
body.about-page .about-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
body.about-page .about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
body.about-page .about-card p {
    color: #6B7280;
    line-height: 1.8;
}
body.dark-mode.about-page .about-card p {
    color: #9CA3AF;
}
body.about-page .story-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
body.about-page .story-section h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}
body.about-page .story-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #6B7280;
    margin-bottom: 20px;
}
body.dark-mode.about-page .story-section p {
    color: #9CA3AF;
}

/* --- CONTACT PAGE STYLES --- */
body.contact-page .contact-hero {
    padding: 60px 0;
    text-align: center;
    background-color: var(--card-bg-light);
}
body.contact-page .contact-hero h1 {
    font-size: 3rem;
    font-weight: 800;
}
body.contact-page .contact-hero .subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    max-width: 650px;
    margin: 20px auto 0;
}
body.dark-mode.contact-page .contact-hero .subtitle {
    color: #9CA3AF;
}
body.contact-page .contact-main {
    padding: 60px 0;
}
body.contact-page .contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    background-color: var(--card-bg-light);
    padding: 40px;
    border-radius: 12px;
}
body.contact-page .contact-info h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 15px;
}
body.contact-page .contact-info p {
    color: #6B7280;
    margin-bottom: 30px;
}
body.dark-mode.contact-page .contact-info p {
    color: #9CA3AF;
}
body.contact-page .contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
body.contact-page .contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}
body.contact-page .contact-form {
    padding-left: 50px;
    border-left: 1px solid var(--border-light);
}

/* --- PRIVACY PAGE STYLES --- */
body.privacy-page .privacy-hero {
    padding: 60px 0;
    text-align: center;
    background-color: var(--card-bg-light);
}
body.privacy-page .privacy-hero h1 {
    font-size: 3rem;
    font-weight: 800;
}
body.privacy-page .privacy-hero .subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    max-width: 650px;
    margin: 20px auto 0;
}
body.dark-mode.privacy-page .privacy-hero .subtitle {
    color: #9CA3AF;
}
body.privacy-page .privacy-content-container {
    padding: 60px 0;
}
body.privacy-page .privacy-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg-light);
    padding: 40px;
    border-radius: 12px;
}
body.privacy-page .privacy-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}
body.privacy-page .privacy-content p, body.privacy-page .privacy-content li {
    line-height: 1.8;
    color: #6B7280;
}
body.dark-mode.privacy-page .privacy-content p, body.dark-mode.privacy-page .privacy-content li {
    color: #9CA3AF;
}
body.privacy-page .privacy-content ul {
    list-style: none;
    padding-left: 0;
}
body.privacy-page .privacy-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}
body.privacy-page .privacy-content ul li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--danger-color);
}


@media (max-width: 768px) {
    body.about-page .about-grid, body.contact-page .contact-grid {
        grid-template-columns: 1fr;
    }
    body.contact-page .contact-form {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-light);
        padding-top: 40px;
        margin-top: 40px;
    }
}
/* --- Blog Page Specific Styles --- */

.blog-hero {
    text-align: center;
    padding: 60px 0;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.blog-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.blog-hero .subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted);
}

.blog-listing {
    padding: 60px 0;
}

.post-preview {
    background: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.post-preview .post-title a {
    color: var(--text-color);
    text-decoration: none;
}

.post-preview .post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* --- Single Post Page Styles --- */

.post-container {
    padding: 60px 0;
}

.post-content {
    background: var(--card-background);
    padding: 40px;
    border-radius: 8px;
    max-width: 800px;
    margin: auto;
    border: 1px solid var(--border-color);
}

.post-content h1 {
    font-size: 2.5rem;
    margin-top: 0;
    line-height: 1.2;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

.post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.post-content a {
    font-weight: 600;
}

