﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.rnd-section {
    padding: 5rem 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1e5a2e, #2b7e3a);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3a2f, #2b7e3a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #5a6e64;
    max-width: 600px;
    margin: 0 auto;
}

/* R&D Grid */
.rnd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
}

/* Card Styles */
.rnd-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
}

    .rnd-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rnd-card:hover .card-image {
    transform: scale(1.08);
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-content {
    padding: 1.5rem;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.insecticide-card .card-icon {
    color: #dc2626;
}

.fungicide-card .card-icon {
    color: #059669;
}

.herbicide-card .card-icon {
    color: #d97706;
}

.pgr-card .card-icon {
    color: #7c3aed;
}

.rnd-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.card-description {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.research-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #2b7e3a;
}

    .research-stats span {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .research-stats i {
        font-size: 0.75rem;
    }

/* View More Button */
.view-more-rnd {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    border: 2px solid;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.insecticide-card .view-more-rnd {
    border-color: #dc2626;
    color: #dc2626;
}

    .insecticide-card .view-more-rnd:hover {
        background: #dc2626;
        color: white;
    }

.fungicide-card .view-more-rnd {
    border-color: #059669;
    color: #059669;
}

    .fungicide-card .view-more-rnd:hover {
        background: #059669;
        color: white;
    }

.herbicide-card .view-more-rnd {
    border-color: #d97706;
    color: #d97706;
}

    .herbicide-card .view-more-rnd:hover {
        background: #d97706;
        color: white;
    }

.pgr-card .view-more-rnd {
    border-color: #7c3aed;
    color: #7c3aed;
}

    .pgr-card .view-more-rnd:hover {
        background: #7c3aed;
        color: white;
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    margin: 3rem auto;
    max-width: 800px;
    width: 90%;
    border-radius: 28px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #667085;
    transition: color 0.3s;
    z-index: 10;
}

    .close-modal:hover {
        color: #dc2626;
    }

.modal-header {
    background: linear-gradient(135deg, #1e3a2f, #2b7e3a);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 28px 28px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .modal-header i {
        font-size: 2rem;
    }

    .modal-header h2 {
        font-size: 1.6rem;
        font-weight: 700;
    }

.modal-body {
    padding: 2rem;
}

.modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.modal-body h3 {
    color: #1e3a2f;
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem 0;
}

.modal-body h4 {
    color: #2b7e3a;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
}

.modal-body p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
}

    .modal-body ul li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        position: relative;
        color: #475569;
    }

        .modal-body ul li:before {
            content: "✓";
            color: #2b7e3a;
            position: absolute;
            left: 0;
            font-weight: bold;
        }

.research-team {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 16px;
    margin-top: 1.5rem;
}

/* Mobile Responsive */
@media screen and (max-width: 1200px) {
    .rnd-grid {
        gap: 1.5rem;
    }
}

@media screen and (max-width: 1024px) {
    .rnd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .rnd-section {
        padding: 3rem 0.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-img {
        height: 180px;
    }
}

@media screen and (max-width: 640px) {
    .rnd-grid {
        grid-template-columns: 1fr;
    }

    .card-image-wrapper {
        height: 200px;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 2rem auto;
    }

    .modal-header {
        padding: 1rem;
    }

        .modal-header i {
            font-size: 1.5rem;
        }

    .research-stats {
        flex-direction: column;
        gap: 0.3rem;
    }
}
