@import url('/fonts/space-grotesk-local.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --e2c-yellow: #F4D03F;
    --e2c-dark-yellow: #E8C547;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --background: #FEFEFE;
    --card-background: #FFFFFF;
    --border: #E5E8E8;
    --shadow: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    font-weight: 400;
    font-size: 20px;
}

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

.site-header {
    background-image: url('/img/notion_bg-1.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    min-height: 80px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 24px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo img {
    height: 48px;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 16px;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover {
    background: var(--e2c-yellow);
    border-color: var(--e2c-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    gap: 4px;
}

.mobile-menu-toggle:hover {
    background: var(--e2c-yellow);
    border-color: var(--e2c-yellow);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}

main {
    padding: 48px 0;
    min-height: calc(100vh - 200px);
}

footer {
    background: var(--card-background);
    border-top: 1px solid var(--border);
    padding: 48px 0 32px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.newsletter-signup {
    margin-top: 24px;
}

.custom-newsletter-form .form-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.email-input {
    flex: 1;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--e2c-yellow);
    box-shadow: 0 0 0 2px rgba(244, 208, 63, 0.2);
}

.email-input::placeholder {
    color: var(--text-secondary);
}

.subscribe-btn {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    background: var(--e2c-yellow);
    color: var(--text-primary);
    border: 2px solid var(--e2c-yellow);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.subscribe-btn:hover {
    background: var(--e2c-dark-yellow);
    border-color: var(--e2c-dark-yellow);
    transform: translateY(-1px);
}

.form-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

.footer-links {
    text-align: right;
}

.footer-links p {
    margin-bottom: 8px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--e2c-yellow);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-primary);
    text-decoration-color: var(--e2c-dark-yellow);
}

.btn {
    display: inline-block;
    padding: 4px 12px;
    background: var(--e2c-yellow);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    margin: 4px 0;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 2px solid var(--e2c-yellow);
}

.btn:hover {
    background: var(--e2c-dark-yellow);
    border-color: var(--e2c-dark-yellow);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.2s ease;
}

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

.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.hero {
    text-align: center;
    padding: 64px 0;
    background: linear-gradient(135deg, var(--background) 0%, #F8F9FA 100%);
    border-radius: 24px;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-section {
    padding: 4rem 2rem;
    margin: 0 auto 3rem auto;
    max-width: 1200px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-image {
    width: 300px;
    height: auto;
    border-radius: 16px;
    flex-shrink: 0;
}

.hero-text {
    flex: 1;
    max-width: 700px;
}

.hero-text h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.hero-text p {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

.intro-section {
    margin: 3rem 0;
    text-align: center;
    font-size: 1.2rem;
}

.intro-section h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.intro-section ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .intro-section ul {
        grid-template-columns: 1fr;
    }
}

.intro-section ul li {
    background: var(--card-background);
    border: 2px solid var(--e2c-yellow);
    color: var(--text-primary);
    padding: 24px 28px;
    border-radius: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.cards-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin: 3rem 0;
}

.card .button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--e2c-yellow);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 24px;
    margin-top: 16px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border: 2px solid var(--e2c-yellow);
}

.card .button:hover {
    background: var(--e2c-dark-yellow);
    border-color: var(--e2c-dark-yellow);
    transform: translateY(-1px);
}

.partnership-section {
    text-align: center;
    margin: 4rem 0;
    padding: 2rem;
    background: #F8F9FA;
    border-radius: 16px;
}

.partnership-image {
    width: 200px;
    height: auto;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.main-sections {
    margin: 4rem 0;
}

.main-sections h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.primary-cards {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 2rem;
}

.primary-card {
    background: var(--card-background);
    border: 2px solid var(--e2c-yellow);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 24px var(--shadow);
    transition: all 0.3s ease;
}

.primary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px var(--shadow);
    border-color: var(--e2c-dark-yellow);
}

.primary-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.primary-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.secondary-actions {
    margin: 3rem 0;
    padding: 2rem;
    background: #F8F9FA;
    border-radius: 16px;
}

.secondary-actions h3 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.secondary-cards {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.secondary-card {
    background: var(--card-background);
    border: 3px solid var(--text-primary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.secondary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.secondary-card h4 {
    font-size: 1.1rem;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

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

.secondary-button {
    display: inline-block;
    padding: 8px 16px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border: 2px solid var(--text-primary);
    border-radius: 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.secondary-button:hover {
    background: var(--e2c-yellow);
    border-color: var(--e2c-yellow);
    transform: translateY(-1px);
}

/* Hide auto-generated cards on homepage only */
.home .grid {
    display: none !important;
}

/* Case study logo styling */
.case-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 16px;
    background: white;
    padding: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Case study detail page logo */
.case-detail-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 24px;
    background: white;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Case study logo overlay (used on both homepage and listing pages) */
.case-logo-overlay, .featured-case-logo-overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Content page styling for better readability */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.article-content {
    margin-bottom: 2rem;
}

/* Improved readability for content pages */
@media (min-width: 769px) {
    .article-content {
        max-width: 700px;
        margin: 0 auto 2rem auto;
        color: var(--text-primary);
        line-height: 1.8;
    }
    
    .article-content p {
        color: var(--text-primary);
        margin-bottom: 1.5rem;
    }
}

/* Bullet point positioning */
.article-content ul {
    list-style-position: outside;
    margin-left: 0;
    padding-left: 1.5rem;
}

.article-content ol {
    list-style-position: outside;
    margin-left: 0;
    padding-left: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-banner {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    max-height: 300px;
}

.case-detail-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-detail-logo-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: white;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Tags and button layout for content pages */
.tags-and-button {
    display: flex;
    align-items: flex-start;
    margin: 0.5rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 6px 10px;
    margin: 0.25rem 0.25rem 0 0;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--e2c-yellow);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.article-external-button {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tags-and-button {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-left: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        padding: 24px;
        transition: right 0.3s ease;
        z-index: 1002;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        margin-bottom: 16px;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 12px;
        text-align: center;
        margin: 0;
    }
    
    .logo {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    
    .logo img {
        height: 32px;
        margin-right: 5px;
    }
    
    .site-header {
        padding: 8px 0;
        min-height: 64px;
    }
    
    nav {
        position: relative;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 16px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        width: 200px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-section {
        margin: 0 0.5rem 2rem 0.5rem;
        padding: 2rem 1rem;
    }
    
    .primary-cards {
        grid-template-columns: 1fr;
    }
    
    .secondary-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .secondary-actions {
        margin: 3rem 0;
        padding: 2rem;
    }
    
    .secondary-actions h3 {
        font-size: 2.5rem;
    }
    
    .secondary-card {
        padding: 24px;
    }
    
    .secondary-card h4 {
        font-size: 1.5rem;
    }
    
    .secondary-card p {
        font-size: 1.1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .custom-newsletter-form .form-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .subscribe-btn {
        align-self: center;
        min-width: 120px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .primary-cards {
        grid-template-columns: 1fr;
    }
}

/* Contact Form Styling */
.contact-form-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    border: 1px solid var(--border);
}

.e2c-contact-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.e2c-contact-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.e2c-contact-form input[type="text"],
.e2c-contact-form input[type="email"],
.e2c-contact-form input[type="url"],
.e2c-contact-form select,
.e2c-contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    background: var(--background);
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    z-index: 0;
}

.e2c-contact-form input:focus,
.e2c-contact-form select:focus,
.e2c-contact-form textarea:focus {
    outline: none;
    border-color: var(--e2c-yellow);
    box-shadow: 0 0 0 2px rgba(244, 208, 63, 0.2);
}

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

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.e2c-contact-form input[type="checkbox"],
.e2c-contact-form input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: var(--e2c-yellow);
}

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--e2c-yellow);
    color: var(--text-primary);
    border: 2px solid var(--e2c-yellow);
    border-radius: 24px;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: var(--e2c-dark-yellow);
    border-color: var(--e2c-dark-yellow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .contact-form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Protect h2 elements from external script interference */
h2 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.intro-section h2,
.main-sections h2,
.featured-cases-section h2 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Minimal Action Network improvements - accept what we can achieve */
[id*="can-form-area"] h2 {
    display: none !important;
}

/* Larger labels and fix Email label positioning with maximum specificity */
div[id*="can-form-area"] label,
div#can-form-area-e2c-website-join-form label,
div#can-form-area-e2c-website-story-form label {
    font-size: 18px !important;
    font-weight: 500 !important;
    display: block !important;
    margin-bottom: 8px !important;
    margin-top: 12px !important;
    position: relative !important;
    z-index: 999999 !important;
    background: white !important;
    padding: 4px 0 !important;
    color: #2C3E50 !important;
    line-height: 1.3 !important;
}

/* Force proper spacing for form inputs */
div[id*="can-form-area"] input,
div[id*="can-form-area"] select,
div[id*="can-form-area"] textarea {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Fix checkbox positioning */
div[id*="can-form-area"] input[type="checkbox"],
div[id*="can-form-area"] input[type="radio"] {
    width: auto !important;
    display: inline-block !important;
    margin-right: 6px !important;
    vertical-align: top !important;
}