﻿/* Professional R&D Design - Mobile First */
:root {
    /* Professional Color Palette */
    --primary: #1a472a;
    --primary-light: #2e7d32;
    --primary-dark: #0d3b1e;
    --secondary: #1565c0;
    --accent: #ff9800;
    --success: #4caf50;
    --warning: #ffb300;
    --info: #2196f3;
    --text-primary: #1a237e;
    --text-secondary: #424242;
    --text-tertiary: #757575;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #f5f7fa;
    --border-light: #e0e0e0;
    --border-medium: #bdbdbd;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    /* Crop Colors */
    --veg: #e53935;
    --cereal: #43a047;
    --oil: #ffb300;
    --pulses: #8d6e63;
    --cotton: #2196f3;
    --other: #9c27b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Professional Hero */
.professional-hero {
    position: relative;
    padding: 80px 0;
    background: var(--primary-dark);
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 71, 42, 0.95), rgba(13, 59, 30, 0.95)), url('/images/research-hero.jpg') center/cover no-repeat;
    opacity: 0.9;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Quick Stats */
.quick-stats {
    padding: 40px 0;
    background: var(--bg-lighter);
    border-bottom: 1px solid var(--border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

    .section-header h2 {
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 15px;
    }

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-tertiary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Research Focus */
.research-focus {
    padding: 80px 0;
    background: var(--bg-white);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.focus-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .focus-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }

    .focus-card.primary {
        border: 2px solid var(--primary);
        box-shadow: 0 0 0 1px var(--primary);
    }

        .focus-card.primary:hover {
            box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary);
        }

.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.focus-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-lighter);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

.focus-tag {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.focus-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.focus-desc {
    color: var(--text-tertiary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.focus-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

    .focus-list li {
        padding: 8px 0;
        border-bottom: 1px solid var(--border-light);
        color: var(--text-secondary);
        font-size: 0.9375rem;
    }

        .focus-list li:last-child {
            border-bottom: none;
        }

.focus-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.metric {
    text-align: center;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.crop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

    .crop-tags span {
        background: var(--bg-lighter);
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 0.875rem;
        color: var(--text-secondary);
    }

.progress-container {
    margin-top: 25px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-lighter);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 4px;
    transition: width 0.6s ease;
}

.oil-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.oil-stat {
    text-align: center;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.pulse-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

    .feature i {
        color: var(--primary);
    }

.cotton-specs {
    background: var(--bg-lighter);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 25px;
}

.spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

    .spec:last-child {
        border-bottom: none;
    }

.spec-value {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Performance Metrics */
.performance-metrics {
    padding: 80px 0;
    background: var(--bg-lighter);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.metric-chart {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

    .chart-header h3 {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

.trend-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-lighter);
    color: var(--text-secondary);
}

    .trend-badge.up {
        background: #e8f5e9;
        color: var(--success);
    }

/* Bar Chart */
.bar-chart {
    padding: 20px 0;
}

.bar-group {
    margin-bottom: 20px;
}

.bar-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bar-container {
    height: 30px;
    background: var(--bg-lighter);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar {
    height: 100%;
    border-radius: 15px;
    position: relative;
    transition: width 1s ease;
}

    .bar.veg {
        background: linear-gradient(90deg, #ff8a80, var(--veg));
    }

    .bar.cereal {
        background: linear-gradient(90deg, #a5d6a7, var(--cereal));
    }

    .bar.oil {
        background: linear-gradient(90deg, #ffd54f, var(--oil));
    }

    .bar.pulses {
        background: linear-gradient(90deg, #bcaaa4, var(--pulses));
    }

.bar-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Pie Chart - Fixed Version */
.allocation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

@media (min-width: 768px) {
    .allocation-container {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }
}

.pie-chart-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.pie-chart {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient( var(--veg) 0% 40%, var(--cereal) 40% 65%, var(--oil) 65% 80%, var(--pulses) 80% 90%, var(--other) 90% 100% );
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Pie Chart Segments with CSS variables */
.pie-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 50% 0%);
    border-radius: 50%;
}

    .pie-segment.veg {
        background: var(--veg);
        transform: rotate(0deg) skewY(-30deg);
    }

    .pie-segment.cereal {
        background: var(--cereal);
        transform: rotate(144deg) skewY(-30deg); /* 40% of 360 = 144deg */
    }

    .pie-segment.oil {
        background: var(--oil);
        transform: rotate(234deg) skewY(-30deg); /* 40%+25% of 360 = 234deg */
    }

    .pie-segment.pulses {
        background: var(--pulses);
        transform: rotate(288deg) skewY(-30deg); /* 40%+25%+15% of 360 = 288deg */
    }

    .pie-segment.other {
        background: var(--other);
        transform: rotate(324deg) skewY(-30deg); /* 40%+25%+15%+10% of 360 = 324deg */
    }

.allocation-details {
    flex: 1;
    max-width: 300px;
    min-width: 250px;
}

.allocation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

    .allocation-item:last-child {
        border-bottom: none;
    }

.allocation-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.allocation-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.allocation-percentage {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .legend-dot.veg {
        background: var(--veg);
    }

    .legend-dot.cereal {
        background: var(--cereal);
    }

    .legend-dot.oil {
        background: var(--oil);
    }

    .legend-dot.pulses {
        background: var(--pulses);
    }

    .legend-dot.other {
        background: var(--other);
    }

/* Timeline */
.timeline {
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

    .timeline-item:last-child {
        border-bottom: none;
    }

.year {
    width: 80px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.variety-count {
    text-align: center;
    padding: 0 20px;
}

    .variety-count span {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary);
    }

    .variety-count small {
        display: block;
        font-size: 0.75rem;
        color: var(--text-tertiary);
        margin-top: 4px;
    }

.crop-dots {
    flex: 1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

    .dot.veg {
        background: var(--veg);
    }

    .dot.cereal {
        background: var(--cereal);
    }

    .dot.oil {
        background: var(--oil);
    }

    .dot.pulses {
        background: var(--pulses);
    }

/* Key Varieties */
.key-varieties {
    padding: 80px 0;
    background: white;
}

.varieties-tabs {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tabs-nav {
    display: flex;
    background: var(--bg-lighter);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    scrollbar-width: none;
}

    .tabs-nav::-webkit-scrollbar {
        display: none;
    }

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .tab-btn.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        background: white;
    }

.tab-content {
    display: none;
    padding: 0;
}

    .tab-content.active {
        display: block;
    }

.table-container {
    overflow-x: auto;
    padding: 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

    .data-table th {
        background: var(--bg-lighter);
        padding: 16px;
        text-align: left;
        font-weight: 600;
        color: var(--text-primary);
        border-bottom: 2px solid var(--border-light);
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .data-table td {
        padding: 16px;
        border-bottom: 1px solid var(--border-light);
        color: var(--text-secondary);
        font-size: 0.875rem;
    }

    .data-table tr:hover {
        background: rgba(26, 71, 42, 0.02);
    }

    .data-table strong {
        color: var(--primary);
    }

.status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

    .status.active {
        background: #e8f5e9;
        color: var(--success);
    }

    .status.new {
        background: #fff3e0;
        color: var(--warning);
    }

/* Infrastructure */
.infrastructure {
    padding: 80px 0;
    background: var(--bg-lighter);
}

.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.infra-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

    .infra-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

.infra-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-lighter);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
}

.infra-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.infra-card p {
    color: var(--text-tertiary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.infra-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

    .infra-specs span {
        background: var(--bg-lighter);
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 0.875rem;
        color: var(--text-secondary);
    }

/* Research Contact */
.research-contact {
    padding: 60px 0;
    background: white;
}

.contact-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: var(--shadow-lg);
}

.contact-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-content p {
    opacity: 0.9;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--primary);
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .contact-btn:hover {
        transform: translateX(5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .professional-hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .focus-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .pie-chart-container {
        width: 180px;
        height: 180px;
    }

    .pie-chart {
        width: 180px;
        height: 180px;
    }

    .tab-btn {
        min-width: 100px;
        padding: 16px;
        font-size: 0.875rem;
    }

    .table-container {
        padding: 20px;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 30px;
    }

    .infra-grid {
        grid-template-columns: 1fr;
    }

    .allocation-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 25px 15px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .focus-card {
        padding: 25px;
    }

    .focus-metrics,
    .oil-stats,
    .pulse-features {
        grid-template-columns: 1fr;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .tab-btn {
        min-width: calc(50% - 2px);
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 0.8125rem;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }

    .pie-chart-container {
        width: 150px;
        height: 150px;
    }

    .pie-chart {
        width: 150px;
        height: 150px;
    }
}

/* Print Styles */
@media print {
    .professional-hero {
        background: white !important;
        color: black !important;
        padding: 40px 0 !important;
    }

    .hero-bg {
        display: none;
    }

    .hero-title {
        color: black !important;
    }

    .focus-card,
    .metric-chart,
    .infra-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .contact-card {
        display: none;
    }
}
