/* --- Global Settings & Variables --- */
:root {
    --primary-font: 'Lora', serif;
    --heading-font: 'Poppins', sans-serif;
    --text-color: #212529;
    --background-color: #fdfdfd;
    --accent-color: #E67E22;
    --border-color: #e9ecef;
}

body {
    font-family: var(--primary-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
}

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

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

/* --- Sticky Header --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--background-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    padding: 1rem 0;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.logo:hover {
    color: var(--text-color);
}

.header-form button {
    font-family: var(--heading-font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent-color);
    border-radius: 50em;
    background-color: transparent;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.header-form button:hover {
    background-color: var(--accent-color);
    color: white;
}

/* --- Main Content & Post Styling --- */
main {
    padding: 2rem 0;
    position: relative;
    z-index: 0;
}
.post-summary { 
    padding-bottom: 2rem; 
    margin-bottom: 2rem; 
    border-bottom: 1px solid var(--border-color);
    position: static;
}
.post-summary header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: static;
}

.post-date { font-size: 0.9rem; color: #6c757d; margin-bottom: 0.5rem; }
.post-title a { color: var(--text-color); }
.post-title { margin-top: 0; font-size: 2rem; }
.read-more { font-family: var(--heading-font); font-weight: 600; }

.full-post .post-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    position: static;
}
.full-post h1 {
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.post-content p { margin-bottom: 1.5rem; }
.post-content ul { margin-bottom: 1.5rem; padding-left: 20px; }
.post-content li { margin-bottom: 0.5rem; }

/* --- Product Callout Redesign --- */
.product-callout {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.product-callout p {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}
.product-callout a {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-color);
    transition: background-color 0.2s ease-in-out;
}
.product-callout a:hover {
    background-color: #fff9f2;
}


/* --- Footer --- */
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}
.social-links { margin-bottom: 1rem; }
.social-links a { color: #6c757d; margin: 0 0.75rem; font-family: var(--heading-font); font-weight: 600; font-size: 1.1rem; }
.social-links a:hover { color: var(--accent-color); }

/* --- NEW STYLE FOR THE MOBILE FOOTER STARTUP LINK --- */
.footer-startup-link {
    font-family: var(--heading-font);
    font-size: 1rem;
    margin: 2rem 0 0 0;
    color: #6c757d;
}
.footer-startup-link a {
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color);
}
.footer-startup-link a:hover {
     background-color: #fff9f2;
}

/* --- Share Button & Menu --- */
.share-container {
    position: relative;
    display: inline-block;
    margin-top: 2.5rem; 
}
.share-link-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.share-link-wrapper:hover {
    color: var(--text-color);
}
.share-icon {
    height: 18px;
    width: 18px;
    filter: invert(45%) sepia(11%) saturate(285%) hue-rotate(167deg) brightness(95%) contrast(85%);
    transition: filter 0.2s ease-in-out;
}
.share-link-wrapper:hover .share-icon {
    filter: invert(10%) sepia(7%) saturate(1471%) hue-rotate(167deg) brightness(96%) contrast(89%);
}
.share-menu {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 10;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out;
}
.share-menu.active {
    visibility: visible;
    opacity: 1;
    bottom: 140%;
}
.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-color);
    font-family: var(--heading-font);
    font-size: 0.9rem;
}
.share-menu-item:hover {
    background-color: #f8f9fa;
}
.share-menu-item img {
    height: 20px;
    width: 20px;
    object-fit: contain;
}

/* --- NEWSLETTER MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: var(--background-color);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
}
.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
}
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.modal-content p {
    color: #6c757d;
    margin-bottom: 2rem;
}
.modal-form {
    display: flex;
    gap: 0.5rem;
}
.modal-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50em;
    font-family: var(--primary-font);
    font-size: 1rem;
}
.modal-form button {
    font-family: var(--heading-font);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50em;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.modal-form button:hover {
    background-color: #d35400;
}
.modal-message-container {
    margin-top: 1.5rem;
    min-height: 24px;
    font-family: var(--heading-font);
    font-weight: 600;
}
.modal-message.success {
    color: #2a9d8f;
}
.modal-message.error {
    color: #e76f51;
}

/* --- Image & Icon Styling --- */
.social-links a img {
    height: 24px;
    width: auto;
    vertical-align: middle;
    transition: opacity 0.2s ease-in-out;
}
.social-links a:hover img {
    opacity: 0.7;
}

/* --- MOBILE FIRST: Hide Desktop Elements --- */
.header-actions {
    display: none;
}

/* --- RESPONSIVE DESIGN FOR TABLETS --- */
@media (max-width: 991px) {
    .logo {
        font-size: 1.3rem;
    }
    .header-form button {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    .post-title { font-size: 1.8rem; }
    .full-post h1 { font-size: 2.2rem; }
    footer {
        /* Make footer sticky to the bottom of the viewport */
        position: sticky;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 900; /* Below the header */

        /* Style it to look good when floating over content */
        background-color: var(--background-color);
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05); /* Shadow to separate from content */
        padding: 1rem 0; /* Adjust padding for sticky view */

        /* Animation for sliding in and out */
        transition: transform 0.3s ease-in-out;
        transform: translateY(0); /* Default visible state */
    }

    /* This class will be added by JavaScript to hide the footer */
    footer.footer--hidden {
        transform: translateY(100%); /* Moves the footer down off-screen */
    }

    /* Add some bottom margin to the main content so the footer doesn't overlap it */
    main {
        margin-bottom: 50px;
    }
}


/* --- DESKTOP STYLES --- */
@media (min-width: 992px) {
    /* 1. Expand the header container to full width */
    header .container {
        max-width: 100%;
        padding: 0 2rem;
    }

    /* 2. Show the header actions container and arrange its items */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 2rem; /* Space between startup link and social icons */
        margin-left: auto; 
        margin-right: 1.5rem;
    }

    /* 3. Style the startup link in the header */
    .header-startup-link {
        font-family: var(--heading-font);
        font-size: 0.9rem;
        font-weight: 600;
        color: #6c757d;
        transition: color 0.2s ease-in-out;
    }
    .header-startup-link:hover {
        color: var(--text-color);
    }

    /* 4. Style the social links in the header */
    .header-actions .social-links {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0;
    }
    .header-actions .social-links a img {
        height: 20px;
        opacity: 0.7;
        transition: opacity 0.2s ease-in-out;
    }
     .header-actions .social-links a:hover img {
        opacity: 1;
    }

    /* 5. Hide mobile-only elements on desktop */
    #footer-social-links,
    .footer-startup-link { /* <-- THIS IS THE NEW RULE */
        display: none;
    }
}

/* --- LARGE DESKTOP STYLES --- */
@media (min-width: 1400px) {
     header .container {
        max-width: 1320px;
        margin: 0 auto;
     }
}


.post-summary { 
    position: relative; /* This is essential */
    transition: box-shadow 0.2s ease-in-out;
}

/* 2. Add a hover effect to the whole card for user feedback */
.post-summary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 3. The magic trick: stretch the link's clickable area */
.post-summary .post-title a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Place the clickable layer on top */
}