/**
 * VitaminSage Landing Page Styles
 */

/* General Styles */
.entry-content,
.ast-article-single .entry-content {
    margin: 0;
    padding: 0;
}

/* Remove gap above hero section */
.page-template-landing-page-template #primary,
body.ast-separate-container #primary,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single:not(.ast-related-post),
.site-main article.post,
.site-main article.page,
#main.site-main,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-author-box,
.ast-separate-container .ast-404-layout-1,
.ast-separate-container .no-results,
.ast-separate-container .entry-content,
.ast-separate-container .entry-header,
.ast-separate-container .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Target desktop-specific padding */
@media (min-width: 1201px) {
    .ast-separate-container .ast-article-post,
    .ast-separate-container .ast-article-single,
    .ast-separate-container .ast-author-box,
    .ast-separate-container .ast-404-layout-1,
    .ast-separate-container .no-results,
    .ast-separate-container .entry-content,
    .ast-separate-container .entry-header,
    .ast-separate-container .site-content,
    .ast-separate-container #primary,
    .ast-separate-container .content-area,
    .ast-plain-container.ast-no-sidebar #primary,
    .ast-plain-container #primary,
    .ast-separate-container .site-main,
    .ast-separate-container .ast-article-inner {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Connect hero section with header while keeping the subtle line */
    .vitaminsage-hero {
        margin-top: 0 !important;
    }

    /* Remove any padding from the content container */
    .ast-container {
        padding-top: 0 !important;
    }

    /* Fix for specific desktop layout */
    .ast-separate-container .site-content {
        padding: 0 !important;
    }

    /* Ensure no gap between header and content but keep the subtle line */
    .site-header {
        margin-bottom: 0 !important;
    }

    /* Preserve the header bottom border */
    .ast-primary-header-bar {
        margin-bottom: 0 !important;
        border-bottom-width: 1px !important;
        border-bottom-style: solid !important;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #333;
}

/* Hero Section */
.vitaminsage-hero {
    background-color: #f5f5f5; /* Default background color */
    background-size: cover;
    background-position: center;
    padding: 35px 0; /* Reduced by 10% from 64px to match left image */
    text-align: center;
    position: relative;
    margin-top: 0 !important; /* Remove gap between hero and nav bar but keep the line */
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.vitaminsage-hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: #333;
}

.hero-subheading {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
    font-style: italic;
}

.hero-search {
    width: 90%;
    max-width: 750px;
    margin: 30px auto 0;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
}

.hero-search .search-field {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hero-search .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 80px;
    background-color: #ff6b00;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Features Section */
.vitaminsage-features {
    padding: 80px 0;
    background-color: #fff;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.feature-item {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.database-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>');
}

.planner-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>');
}

.interaction-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>');
}

.feature-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
    margin-bottom: 20px;
}

.feature-link {
    display: inline-block;
    color: #0274be;
    font-weight: bold;
    text-decoration: none;
}

.feature-link:hover {
    text-decoration: underline;
}

/* Categories Section */
.vitaminsage-categories {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Category Icons */
.vitamins-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>');
}

.amino-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg>');
}

.herbs-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>');
}

.probiotics-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>');
}

.nootropics-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"></path></svg>');
}

.performance-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>');
}

.antioxidants-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>');
}

.specialty-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="%230274be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>');
}

.category-item h3 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

/* Recent Additions Section */
.vitaminsage-recent {
    padding: 80px 0;
    background-color: #fff;
}

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

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.recent-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.recent-item:hover {
    transform: translateY(-5px);
}

.recent-image {
    height: 200px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 300 200"><rect fill="%23f5f5f5" width="300" height="200"/><text fill="%23cccccc" font-family="Arial" font-size="20" x="150" y="100" text-anchor="middle">Image Placeholder</text></svg>');
    background-size: cover;
    background-position: center;
}

.recent-title {
    padding: 20px 20px 10px;
    margin: 0;
    font-size: 20px;
    color: #333;
}

.recent-excerpt {
    padding: 0 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.recent-excerpt p {
    margin: 0 0 15px;
}

.recent-meta {
    padding: 0 20px 15px;
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.recent-link {
    display: block;
    padding: 15px 20px;
    text-align: right;
    color: #0274be;
    text-decoration: none;
    font-weight: bold;
    border-top: 1px solid #eee;
}

.recent-link:hover {
    background-color: #f9f9f9;
}

.no-recent-items {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Newsletter Section */
.vitaminsage-newsletter {
    padding: 60px 0;
    background-image: url('assets/images/ws_email_half.jpg');
    background-size: cover;
    background-position: center;
    color: black;
    text-align: center;
    margin-bottom: 0;
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.vitaminsage-newsletter h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: black;
}

.vitaminsage-newsletter p {
    font-size: 18px;
    margin-bottom: 30px;
    font-style: italic;
    color: black;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    height: 50px;
}

.newsletter-form input,
.vitaminsage-newsletter .wpcf7-form-control-wrap input[type="email"] {
    flex: 0 0 75%;
    padding: 0 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    height: 50px; /* Fixed height */
    box-sizing: border-box;
    width: 100%;
    line-height: normal;
    margin: 0;
    min-height: 0;
    max-height: 50px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fix for the form after submission - prevent long input field */
.vitaminsage-newsletter .wpcf7 form.sent .wpcf7-form-control-wrap input[type="email"] {
    display: none !important;
}

.newsletter-button,
.vitaminsage-newsletter .wpcf7-submit {
    flex: 0 0 25%;
    background-color: #ff6b00;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-button:hover,
.vitaminsage-newsletter .wpcf7-submit:hover {
    background-color: #e86000;
}

/* Contact Form 7 specific styles for newsletter */
.vitaminsage-newsletter .wpcf7-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hide response output by default */
.vitaminsage-newsletter .wpcf7 form.init .wpcf7-response-output {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.vitaminsage-newsletter .wpcf7-form p {
    margin: 0;
    display: flex;
    width: 100%;
    height: 50px;
}

.vitaminsage-newsletter .wpcf7-form-control-wrap {
    flex: 0 0 75%;
    display: block;
}

/* Fix for the newsletter form wrapper */
.vitaminsage-newsletter .newsletter-form-wrapper {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
}

/* Override any theme or CF7 styles that might be causing the height issue */
.vitaminsage-newsletter .wpcf7-form-control-wrap {
    margin: 0;
    padding: 0;
}

.vitaminsage-newsletter .wpcf7-form-control-wrap .wpcf7-form-control {
    margin: 0;
    padding: 0 15px;
    vertical-align: middle;
}

/* Ensure the form doesn't have extra spacing */
.vitaminsage-newsletter .wpcf7-form br {
    display: none;
}

/* Style the success message */
.vitaminsage-newsletter .wpcf7 form .wpcf7-response-output {
    margin: 15px auto 0;
    padding: 10px 15px;
    border: 1px solid #46b450;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    text-align: center;
    width: 100%;
    max-width: 500px;
    clear: both;
    display: none; /* Hide by default */
    box-sizing: border-box;
}

/* Success message specific styling */
.vitaminsage-newsletter .wpcf7 form.sent .wpcf7-response-output {
    border-color: #46b450;
    background-color: rgba(70, 180, 80, 0.1);
    font-weight: 500;
    font-size: 16px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
    display: block !important; /* Force display when form is sent */
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide the form after successful submission */
.vitaminsage-newsletter .wpcf7 form.sent .wpcf7-form-control-wrap,
.vitaminsage-newsletter .wpcf7 form.sent .wpcf7-submit,
.vitaminsage-newsletter .wpcf7 form.sent p {
    display: none !important;
}

/* Fix for the form after submission */
.vitaminsage-newsletter .wpcf7 form.sent {
    height: auto;
    min-height: 50px;
    display: block;
    position: relative;
}

/* Additional fixes for form after submission */
.vitaminsage-newsletter .wpcf7 form.sent:after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 5;
}

/* Error message specific styling */
.vitaminsage-newsletter .wpcf7 form.invalid .wpcf7-response-output,
.vitaminsage-newsletter .wpcf7 form.unaccepted .wpcf7-response-output,
.vitaminsage-newsletter .wpcf7 form.failed .wpcf7-response-output,
.vitaminsage-newsletter .wpcf7 form.spam .wpcf7-response-output,
.vitaminsage-newsletter .wpcf7 form.aborted .wpcf7-response-output {
    border-color: #dc3232;
    background-color: rgba(220, 50, 50, 0.1);
    display: block !important; /* Force display when form has errors */
    visibility: visible !important;
    opacity: 1 !important;
}

.vitaminsage-newsletter .wpcf7-submit {
    height: 50px;
    margin-left: 0;
}

/* Fix for responsive layout */
@media (max-width: 768px) {
    .vitaminsage-newsletter .wpcf7-form {
        flex-direction: column;
        height: auto;
    }

    .vitaminsage-newsletter .wpcf7-form p {
        flex-direction: column;
    }

    .vitaminsage-newsletter .wpcf7-form-control-wrap {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }

    .vitaminsage-newsletter .wpcf7-form-control-wrap input[type="email"] {
        border-radius: 4px;
        width: 100%;
    }

    .vitaminsage-newsletter .wpcf7-submit {
        border-radius: 4px;
        width: 100%;
        margin-left: 0;
    }
}

/* Footer Info Section */
.vitaminsage-footer-info {
    padding: 40px 0;
    background-color: #f5f5f5;
    color: #333;
}

.footer-info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info-text {
    flex: 0 0 60%;
    font-size: 16px;
    line-height: 1.5;
}

.footer-info-links {
    flex: 0 0 35%;
    text-align: right;
}

.footer-info-links a {
    display: inline-block;
    margin-left: 20px;
    color: #333; /* Match top nav color */
    text-decoration: none !important; /* Force no underline */
    font-weight: 500;
}

.footer-info-links a:hover {
    color: #0274be; /* Use theme accent color on hover */
    text-decoration: none !important; /* Force no underline on hover */
}

/* Global Footer Link Styles - Remove underlines from all footer links */
.site-footer a,
.site-footer a:hover,
.site-footer a:focus,
.site-footer a:active,
footer a,
footer a:hover,
footer a:focus,
footer a:active {
    text-decoration: none !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .vitaminsage-hero {
        padding: 20px 0; /* Reduced by 10% from 38px to match left image */
    }

    .vitaminsage-hero h1 {
        font-size: 32px;
    }

    .hero-content {
        padding: 30px 20px;
    }

    .hero-search {
        margin: 20px auto 0;
        width: 90%;
    }

    .hero-search .search-field {
        padding: 12px 15px;
    }

    .hero-search .search-submit {
        width: 60px;
    }

    .features-container {
        flex-direction: column;
    }

    .feature-item {
        min-width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .newsletter-form {
        flex-direction: column;
        height: auto;
    }

    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 10px;
        height: 50px;
    }

    .newsletter-button {
        border-radius: 4px;
        width: 100%;
        height: 50px;
    }

    .footer-info-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-info-text {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }

    .footer-info-links {
        flex: 0 0 100%;
        text-align: center;
    }

    .footer-info-links a {
        margin: 0 10px;
    }
}
