/* css/home.css */
.page-title {
    /* Specific styling for the main H1 on homepage */
    text-align: center;
    margin-bottom: 0.5rem;
    /* Reduced margin for tighter coupling with intro text */
    color: var(--dark-color);
}

#tool-cards .section-intro {
    /* Intro text below H1 on homepage */
    margin-bottom: 2.5rem;
    /* More space before cards */
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    /* Approx 24px */
    margin-bottom: 2rem;
}

.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
    /* Use global box shadow on hover */
    text-decoration: none;
    color: var(--primary-color);
}

.card .card-icon {
    font-size: 2.5rem;
    /* Approx 40px */
    margin-bottom: 1rem;
    background-color: var(--primary-color-light, #e7f3ff);
    /* A light variant of primary */
    color: var(--primary-color);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.card h3 {
    font-size: 1.25rem;
    /* Approx 20px */
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.card:hover h3 {
    color: var(--primary-color);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-grow: 1;
    /* Helps keep card heights somewhat consistent if text length varies */
}

.view-all-tools-container {
    text-align: center;
    margin-top: 2rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-item {
    text-align: center;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-item .service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.service-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Reasons Grid */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.reason-item {
    padding: 1.5rem;
    background-color: #fff;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reason-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* All Tools List */
#all-tools-list .tool-list {
    list-style: none;
    padding: 0;
    columns: 2;
    /* Create two columns for the tool list */
    -webkit-columns: 2;
    -moz-columns: 2;
    gap: 1rem;
}

#all-tools-list .tool-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#all-tools-list .tool-list li a {
    font-weight: 500;
    color: var(--dark-color);
    display: block;
}

#all-tools-list .tool-list li a:hover {
    color: var(--primary-color);
}


@media (max-width: 768px) {
    #all-tools-list .tool-list {
        columns: 1;
        /* Single column on smaller screens */
        -webkit-columns: 1;
        -moz-columns: 1;
    }
}


/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.testimonial {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial p {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.testimonial footer {
    font-weight: bold;
    color: var(--dark-color);
    text-align: right;
}

/* How to Use Section */
.how-to-steps {
    list-style-type: none;
    counter-reset: step-counter;
    padding-left: 0;
    /* max-width: 700px; */
    margin: 2rem auto 0;
}

.how-to-steps li {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    padding: 1rem 1rem 1rem 3.5rem;
    /* Add padding for the counter */
    position: relative;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.how-to-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.how-to-steps li strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}


/* css/home.css -> Add this at the end */

/* === NEW HOW-TO-USE SECTION STYLES === */
#how-to-use {
    background-color: var(--white-color);
    /* Use a clean white background */
    padding-top: 50px;
    padding-bottom: 50px;
}

.how-to-grid {
    margin-top: 3rem;
    display: grid;
    gap: 3rem;
    /* Space between each step */
}

.how-to-step {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column on mobile */
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .how-to-step {
        grid-template-columns: 1fr 1fr;
        /* Two columns on larger screens */
    }

    /* Alternate image and text for a zig-zag layout */
    .how-to-step:nth-child(even) .how-to-image {
        order: 2;
        /* Move image to the right on even-numbered steps */
    }
}

.how-to-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    /* Ensures the image respects the border-radius */
    box-shadow: var(--box-shadow);
}

.how-to-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Special styling for the step that uses an icon instead of an image */
.how-to-image.icon-step {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    min-height: 250px;
}

.how-to-image.icon-step .fas {
    font-size: 6rem;
    color: var(--white-color);
    opacity: 0.8;
}

.how-to-content .step-number {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    /* Pill shape */
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.how-to-content h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.how-to-content p {
    color: var(--text-muted);
    line-height: 1.8;
}


/* === HOMEPAGE GENERATOR SECTION === */
#home-generator-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: var(--light-color);
}

#home-generator-section .tool-header h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--dark-color);
    text-align: center;
}

#home-generator-section .section-intro {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

#home-generator-section .tool-interactive-area {
    max-width: 1100px;
    /* Constrain the width of the tool itself */
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

@media (min-width: 768px) {
    #home-generator-section .tool-interactive-area {
        padding: 2rem;
    }
}

#home-generator-section .text-input-area {
    margin-bottom: 1.5rem;
}

#home-generator-section .text-input-area textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#home-generator-section .text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 196, 162, .25);
}

#home-generator-section .input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

/* Styles for the dynamic output list, borrowing from tool pages */
#home-generator-section .output-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    /* max-height: 500px; */
    /* Give it a max height to prevent a huge page */
    overflow-y: auto;
    /* Make the list scrollable */
    /*padding: 1rem;*/
    background-color: var(--section-alt-bg);
    border-radius: var(--border-radius);
}

#home-generator-section .output-item {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    margin: 4px;
}

#home-generator-section .output-item.default-preview .fancy-text-preview {
    opacity: 0.65;
}

#home-generator-section .style-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

#home-generator-section .fancy-text-preview {
    font-size: 1rem;
    background-color: var(--light-color);
    padding: 0.75rem;
    border-radius: calc(var(--border-radius) - 2px);
    margin-bottom: 0.75rem;
    overflow-wrap: break-word;
    word-break: break-all;
    min-height: 48px;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

#home-generator-section .copy-fancy-text-btn {
    align-self: flex-start;
}

#home-generator-section .copy-fancy-text-btn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: var(--white-color) !important;
}



/* === NEW TESTIMONIALS SLIDER SECTION === */
#happy-customers {
    background-color: var(--dark-color, #2c3e50);
    /* Dark background for this section */
    padding-top: 50px;
    padding-bottom: 50px;
    overflow: hidden;
    /* Prevent horizontal scrollbar from the container itself */
}

#happy-customers h2 {
    color: var(--white-color, #fff);
    text-align: center;
}

#happy-customers .section-intro {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 2.5rem;
}

/* This is the container that acts as the slider's "window" */
.testimonial-slider-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    /* Hide the parts of the track that are off-screen */
}

/* This track holds all the cards and will be animated by JavaScript */
.testimonial-slider-track {
    display: flex;
    /* Lay out slides in a row */
    gap: 1.5rem;
    /* Space between cards */
    /* Padding on the sides so the first card doesn't start at the very edge */
    padding: 1rem 1.5rem;
    width: max-content;
    /* Ensure the track is wide enough for all its children */
}

/* Pause animation on hover for better user experience */
.testimonial-slider-container:hover .testimonial-slider-track {
    animation-play-state: paused;
}

/* Individual testimonial card styling */
.testimonial-card {
    background-color: var(--dark-color-light, #34495e);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 320px;
    /* Give cards a fixed width */
    flex-shrink: 0;
    /* Prevent cards from shrinking */
    display: flex;
    flex-direction: column;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.testimonial-info {
    line-height: 1.3;
}

.testimonial-name {
    display: block;
    font-weight: 600;
    color: var(--white-color);
}

.testimonial-stars {
    color: #ffd700;
    font-size: 0.8rem;
}

.testimonial-quote {
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    flex-grow: 1;
    line-height: 1.6;
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fade effect on the edges of the slider */
.testimonial-slider-container::before,
.testimonial-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
}

.testimonial-slider-container::before {
    left: 0;
    background: linear-gradient(to right, var(--dark-color, #2c3e50), transparent);
}

.testimonial-slider-container::after {
    right: 0;
    background: linear-gradient(to left, var(--dark-color, #2c3e50), transparent);
}


/* === BLOG PREVIEW SECTION === */
#blog-preview-section {
    background-color: var(--section-alt-bg);
}

#blog-preview-section h2,
#blog-preview-section .section-intro {
    text-align: center;
}

/* Reusing .blog-grid and .blog-card styles from blog.css (make sure these are in home.css or style.css) */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card-image-link {
    display: block;
}

.blog-card-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image-link img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.blog-card-meta .fas {
    margin-right: 0.35rem;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex-grow: 1;
}

.blog-card-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.blog-card .btn {
    align-self: flex-start;
}


#home-generator-section {
    padding-top: 20px;
    padding-bottom: 3rem;
    background-color: var(--section-alt-bg, #f0f2f5);
}

#home-generator-section .tool-header h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--dark-color);
    text-align: center;
}

#home-generator-section .section-intro {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

#home-generator-section .tool-interactive-area {
    max-width: 1100px;
    /* Constrain the width of the tool itself */
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    #home-generator-section .tool-interactive-area {
        padding: 2rem;
    }
}

#home-generator-section .text-input-area {
    margin-bottom: 1.5rem;
}

#home-generator-section .text-input-area textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#home-generator-section .text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 196, 162, .25);
}

#home-generator-section .input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}