@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Inter+Tight:ital,wght@0,300..700;1,300..700&display=swap');

/* --- Custom Variables & Tokens --- */
:root {
    --font-headings: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-paragraphs: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Color Palette */
    --color-bg-base: #f8fafc;
    --color-bg-surface: #ffffff;
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;
    
    --color-success: #10b981;
    --color-success-light: #ecfdf5;
    --color-danger: #ef4444;
    --color-danger-light: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    
    --color-border: #e2e8f0;
    --color-border-focus: #3b82f6;

    /* Shadow tokens */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Layout & spacing */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --header-height: 70px;
    --max-width: 1200px;
}

/* --- Reset and Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-paragraphs);
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 1.5rem; }
h3 { font-size: 1.25rem; margin-top: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* --- Layout Utility Classes --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* --- Sticky Header / Navbar --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
}

.nav-container {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.logo-img {
    height: 38px;
    width: auto;
    max-height: 100%;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Search Engine Bar --- */
.search-wrapper {
    position: relative;
    width: 320px;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 0.9rem;
    font-family: var(--font-paragraphs);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background-color: var(--color-bg-base);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon-svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: var(--color-text-muted);
    stroke-width: 2;
    pointer-events: none;
}

/* Search Dropdown Modal */
.search-results-modal {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 450px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    max-height: 480px;
}

@media(max-width: 768px) {
    .search-results-modal {
        width: 100vw;
        right: -1.5rem;
        left: -1.5rem;
        border-radius: 0;
        top: 100%;
        max-height: 60vh;
    }
}

.search-results-header {
    display: flex;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    gap: 0.5rem;
    flex-wrap: wrap;
    background-color: var(--color-bg-base);
}

.filter-chip {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active, .filter-chip:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.search-results-body {
    overflow-y: auto;
    padding: 0.5rem 0;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    gap: 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none !important;
}

.search-item:hover, .search-item.focus-active {
    background-color: var(--color-primary-light);
}

.search-item-info {
    display: flex;
    flex-direction: column;
}

.search-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.search-item-cat {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.search-section-title {
    padding: 0.5rem 1.25rem 0.25rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* --- Hero Banner Section --- */
.hero-section {
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: 5rem 0;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 1rem auto 2rem auto;
}

.hero-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search-wrapper .search-input {
    padding: 1rem 1.5rem 1rem 3.25rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-search-wrapper .search-icon-svg {
    left: 1.25rem;
    width: 1.35rem;
    height: 1.35rem;
}

.hero-search-wrapper .search-results-modal {
    width: 100%;
}

/* --- Breadcrumbs --- */
.breadcrumb-nav {
    padding: 1.25rem 0;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 0.85rem;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-text-secondary);
}

.breadcrumbs li::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumbs li:last-child::after {
    content: "";
}

.breadcrumbs li:last-child {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* --- Calculator Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
    margin-top: auto;
}

.card-tag {
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

/* --- Category Card Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-icon {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
}

.category-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* --- Calculator Engine Split Columns --- */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 992px) {
    .calculator-container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.calc-panel {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.calc-results-panel {
    background-color: var(--color-primary-light);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

/* --- Input Fields / Forms --- */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

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

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

label {
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--color-text-secondary);
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-paragraphs);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-error {
    font-size: 0.8rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
    display: none;
}

.input-field.error-border {
    border-color: var(--color-danger);
}

/* Button UI */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-paragraphs);
    flex-grow: 1;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
}

/* Result Styles */
.results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.result-item {
    margin-bottom: 1.25rem;
}

.result-item-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.result-item-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.result-table th, .result-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.result-table th {
    font-weight: 600;
    color: var(--color-text-primary);
}

.result-table td {
    color: var(--color-text-secondary);
}

.result-table tr:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Action items like Copy & Print */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 0;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background-color: var(--color-bg-base);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Share Toast */
.toast-msg {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--color-text-primary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Explanations, Formula & Examples --- */
.calc-guide {
    margin-top: 3rem;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.formula-box {
    background-color: var(--color-bg-base);
    border-left: 4px solid var(--color-primary);
    padding: 1.25rem;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.formula-explanation {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* --- FAQ Accordion --- */
.faq-accordion {
    margin-top: 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    user-select: none;
    color: var(--color-text-primary);
}

.faq-question::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.faq-item.open .faq-question::after {
    content: "\u2212";
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0, 1, 0, 1);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.faq-item.open .faq-answer {
    max-height: 1000px;
    margin-top: 0.75rem;
}

/* --- CTA Section --- */
.cta-section {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
    border-radius: var(--border-radius-lg);
    margin: 4rem 0;
}

.cta-section h2, .cta-section p {
    color: #ffffff !important;
}

.cta-section p {
    max-width: 600px;
    margin: 1rem auto 2rem auto;
    opacity: 0.9;
}

.cta-btn {
    background-color: #ffffff;
    color: var(--color-primary);
    padding: 0.85rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 0;
    transition: all 0.2s ease;
}

.cta-btn:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary-hover);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

/* --- Footer --- */
.footer {
    background-color: #ffffff;
    border-top: 1px solid var(--color-border);
    padding: 4rem 0 2rem 0;
    margin-top: 6rem;
}

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

.footer-logo-img {
    height: 34px;
    width: auto;
    margin-bottom: 1.25rem;
    display: block;
}

.footer-about {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.footer-col h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}

.footer-links.grid-2col li {
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Newsletter styling */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.newsletter-input {
    flex-grow: 1;
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background-color: var(--color-bg-base);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #ffffff;
}

.newsletter-btn {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* --- Mobile Menu Drawer --- */
@media(max-width: 991px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        z-index: 101;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
        display: block;
        padding: 0.75rem 0;
    }
    
    .search-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0.5rem 0;
        order: 2;
    }
}

/* --- Print Styles --- */
@media print {
    .header, .breadcrumb-nav, .calc-guide, .faq-accordion, .cta-section, .footer, .back-to-top, .btn-group, .action-grid, .social-join-container {
        display: none !important;
    }
    body {
        background-color: #ffffff;
        color: #000000;
        font-size: 12pt;
    }
    .calculator-container {
        display: block;
    }
    .calc-panel, .calc-results-panel {
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 20px;
        background-color: transparent !important;
        color: #000000 !important;
    }
    .result-item-value {
        color: #000000 !important;
    }
}

/* --- Social Join Groups --- */
.social-join-container {
    margin: 3rem auto 2rem auto;
    max-width: 1200px;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.group-card {
    position: relative;
    border: 2px solid transparent;
    border-radius: 5px;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    justify-content: space-between;
    overflow: hidden;
}

.whatsapp-card {
    animation: whatsapp-border-animation 1.5s infinite;
}
.telegram-card {
    animation: telegram-border-animation 1.5s infinite;
}
.instagram-card {
    animation: instagram-border-animation 1.5s infinite;
}

@keyframes whatsapp-border-animation {
    0% { border-color: transparent; }
    50% { border-color: #25d366; }
    100% { border-color: transparent; }
}
@keyframes telegram-border-animation {
    0% { border-color: transparent; }
    50% { border-color: #004F7A; }
    100% { border-color: transparent; }
}
@keyframes instagram-border-animation {
    0% { border-color: transparent; }
    50% { border-color: #E1306C; }
    100% { border-color: transparent; }
}

.seoquake-nofollow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none !important;
    padding: 6px 16px;
    border-radius: 0;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
    color: #ffffff !important;
}

.seoquake-nofollow i {
    margin-right: 6px;
}

.whatsapp-card .seoquake-nofollow {
    background: #25d366;
}
.telegram-card .seoquake-nofollow {
    background: #004F7A;
}
.instagram-card .seoquake-nofollow {
    background: #E1306C;
}

.seoquake-nofollow:hover {
    transform: scale(1.05);
}

/* --- Social Sidebar/Blog Widget --- */
.social-sidebar-widget {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-top: 2rem;
}

.social-sidebar-widget h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.social-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
}

.social-sidebar-link:last-child {
    margin-bottom: 0;
}

.social-sidebar-link:hover {
    transform: translateY(-2px);
}

.social-sidebar-link.whatsapp-link {
    background-color: #25d366;
}

.social-sidebar-link.telegram-link {
    background-color: #004F7A;
}

.social-sidebar-link.instagram-link {
    background-color: #E1306C;
}

@media print {
    .social-sidebar-widget {
        display: none !important;
    }
}
