/* Extracted and improved styles for index.php UI and design */

/* Body and background */
body {
    padding-top: 80px; /* To offset fixed navbar */
    background: #f8f9fa url('../indexbackground.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.85) 0%, rgba(32, 201, 151, 0.85) 100%), url('https://source.unsplash.com/1600x900/?farm,agriculture');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 20px;
    text-align: center;
    border-radius: 12px;
    margin: 30px auto 40px auto;
    max-width: 900px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeIn 1.5s ease-in-out;
    transition: box-shadow 0.3s ease;
}
.hero-section:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-section h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.75);
    letter-spacing: 1.5px;
    color: #fff !important;
}
.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 35px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
}

/* Buttons */
.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
    font-weight: 600;
    padding: 12px 28px;
    font-size: 1.2rem;
    border-radius: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #218838;
    border-color: #1e7e34;
    box-shadow: 0 0 10px rgba(33, 136, 56, 0.7);
    outline: none;
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 30px 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}
.section:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.section h2 {
    margin-bottom: 30px;
    color: #28a745;
    text-align: center;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

/* Stats Section */
.stats-section {
    text-align: center;
    padding: 50px 0;
}
.stat-item {
    display: inline-block;
    margin: 0 30px;
}
.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: #28a745;
    letter-spacing: 1.2px;
}
.stat-label {
    font-size: 1.3rem;
    color: #555;
    margin-top: 5px;
}

/* Grids */
.products-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.featured-products-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(1, 1fr);
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 20px;
    border-radius: 12px;
}
@media (min-width: 480px) {
    .featured-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .featured-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1024px) {
    .featured-products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
.traders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Cards */
.product-card, .trader-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: #fff;
    min-height: 300px;
}
.product-card:hover, .trader-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.featured-product-card {
    border: 2px solid #fd7e14;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: linear-gradient(145deg, #fff, #fff8e1);
    height: 300px;
}
.featured-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(253, 126, 20, 0.3);
    border-color: #e76f00;
}

.product-image, .trader-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

/* Featured Traders Profile Pictures - Circular and Coin-sized */
.trader-card .trader-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border-bottom: none;
    margin: 15px auto;
    display: block;
}
.product-info, .trader-info {
    padding: 20px;
}
.product-info h5, .trader-info h5 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #2c3e50;
}
.product-info p, .trader-info p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 6px;
}

.featured-product-info h5 {
    color: #fd7e14;
    font-weight: 800;
}

.featured-product-info p {
    color: #6c757d;
}

/* How It Works */
.how-it-works {
    text-align: center;
}
.step {
    display: inline-block;
    width: 30%;
    margin: 0 1.5%;
    vertical-align: top;
    padding: 15px;
    transition: transform 0.3s ease;
}
.step:hover {
    transform: scale(1.05);
}
.step-icon {
    font-size: 3.5rem;
    color: #28a745;
    margin-bottom: 15px;
}

/* Testimonials */
.testimonials {
    text-align: center;
    font-style: italic;
    color: #444;
}
.testimonial {
    margin: 25px 0;
    font-size: 1.2rem;
    line-height: 1.5;
}
.testimonial cite {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: #28a745;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-align: center;
    padding: 50px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: box-shadow 0.3s ease;
}
.cta-section:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.cta-section h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.cta-section p {
    font-size: 1.4rem;
    margin-bottom: 30px;
}
.btn-light {
    background-color: #e9f7ef;
    color: #28a745;
    font-weight: 700;
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 30px;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-light:hover, .btn-light:focus {
    background-color: #c1e7c9;
    color: #1e7e34;
    outline: none;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.news-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    background: #f9f9f9;
    transition: box-shadow 0.3s ease;
}
.news-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.news-item h5 {
    color: #28a745;
    margin-bottom: 12px;
    font-weight: 700;
}
.news-item small {
    color: #666;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    text-align: left;
}
.faq-item {
    margin-bottom: 20px;
}
.faq-question {
    font-weight: 700;
    color: #28a745;
    cursor: pointer;
    font-size: 1.1rem;
}
.faq-answer {
    margin-top: 8px;
    color: #555;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .hero-section p {
        font-size: 1.2rem;
    }
    .section {
        margin: 30px 15px;
        padding: 20px 15px;
    }
    .traders-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    .step {
        width: 100%;
        margin-bottom: 25px;
    }
}
