/* RESET */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

body{
    background:linear-gradient(135deg,#e8f5e9,#f1f8e9);
    color:#333;
}

/* SECTION */
.section{
    padding:90px 20px;
    text-align:center;
}

.section:nth-child(even){
    background:#f7faf7;
}

h2{
    color:#2e7d32;
    margin-bottom:40px;
}

/* HERO */
/* BRAND */
.brand{
    position:absolute;
    top:25px;
    left:40px;
    display:flex;
    align-items:center;
    gap:10px;
    color:white;
    font-weight:600;
    font-size:20px;
}

/* emoji mangga */
.logo{
    font-size:28px;
}

/* teks brand */
.brand-name{
    letter-spacing:0.5px;
}

.hero{
    background:linear-gradient(135deg,#2e7d32,#66bb6a);
    color:white;
    text-align:center;
    padding:110px 20px 120px;
}

.hero h1{
    font-size:44px;
    margin-bottom:20px;
}

.hero p{
    max-width:700px;
    margin:auto;
}

.hero-buttons{
    margin-top:30px;
}

.btn-primary{
    background:white;
    color:#2e7d32;
    padding:14px 30px;
    border-radius:30px;
    text-decoration:none;
    margin-right:10px;
    font-weight:600;
}

.btn-outline{
    border:2px solid white;
    color:white;
    padding:12px 28px;
    border-radius:30px;
    text-decoration:none;
}

/* BADGE */
.badge{
    display:inline-block;
    background:#2e7d32;
    color:white;
    padding:6px 16px;
    border-radius:20px;
    margin-bottom:15px;
    font-size:13px;
}

/* GRID */
.tech-grid{
    max-width:1100px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:25px;
}

/* CARD */
.tech-card{
    background:white;
    padding:30px 20px;
    border-radius:18px;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    transition:.3s;
}

.tech-card:hover{
    transform:translateY(-6px);
    border:2px solid #4caf50;
    box-shadow:0 0 0 3px rgba(76,175,80,0.2);
}

.icon{
    font-size:32px;
    margin-bottom:10px;
}

/* DISEASE */
.disease-grid{
    max-width:1100px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:25px;
}

.disease-card{
    background:white;
    padding:25px;
    border-radius:18px;
    text-align:left;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    transition:.3s;
}

.disease-card:hover{
    transform:translateY(-6px);
    border:2px solid #4caf50;
    box-shadow:0 0 0 3px rgba(76,175,80,0.2);
}

.disease-card h3{
    color:#2e7d32;
    margin-bottom:8px;
}
/* rapikan bullet ciri-ciri */
.disease-card ul{
    list-style: disc;
    padding-left: 18px;
    margin-top: 5px;
}
/* UPLOAD */
.upload-card{
    width:500px;
    margin:auto;
    background:white;
    padding:45px;
    border-radius:25px;
    box-shadow:0 20px 50px rgba(0,0,0,0.12);
}

.upload-title h2{
    margin-bottom:5px;
}

.upload-title p{
    color:#666;
    margin-bottom:20px;
}

.upload-box{
    display:block;
    border:2px dashed #4caf50;
    padding:50px 20px;
    border-radius:18px;
    cursor:pointer;
    transition:.3s;
}

.upload-box:hover{
    background:#eef7ee;
    border-color:#2e7d32;
}

.upload-icon{
    font-size:40px;
    margin-bottom:10px;
}

.upload-card input{
    display:none;
}

.upload-card button{
    margin-top:20px;
    background:#2e7d32;
    color:white;
    border:none;
    padding:14px 40px;
    border-radius:30px;
    font-size:16px;
    cursor:pointer;
    box-shadow:0 10px 25px rgba(0,0,0,0.2);
    transition:.3s;
}
.section-desc{
    max-width:600px;
    margin:0 auto 35px;
    color:#666;
}


.upload-card button:hover{
    transform:scale(1.05);
}

/* RESPONSIVE */
@media(max-width:768px){
    .hero h1{font-size:30px;}
    .upload-card{width:90%;}
}
/* ================= DETECT SECTION ================= */

.detect-header {
    text-align: center;
    max-width: 700px;
    margin: auto;
    margin-bottom: 35px;
}

.detect-header h2 {
    font-size: 30px;
    color: #2e7d32;
    margin-bottom: 10px;
}

.detect-header p {
    color: #666;
    line-height: 1.6;
}

/* wrapper */
.upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* upload box */
.upload-area {
    width: 620px;
    min-height: 320px;
    border: 2px dashed #cfcfcf;
    border-radius: 18px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.upload-area:hover {
    border-color: #4caf50;
    background: #f3faf3;
}

/* upload content */
.upload-content {
    text-align: center;
}

.upload-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.upload-content h3 {
    margin-bottom: 6px;
}

.upload-content p {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

.btn-upload {
    background: linear-gradient(90deg,#28a745,#20c997);
    border: none;
    color: white;
    padding: 10px 26px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* preview image */
.preview-image {
    max-width: 280px;
    border-radius: 10px;
    display: none;
}

/* detect button */
.btn-detect {
    margin-top: 25px;
    background: linear-gradient(90deg,#2e7d32,#43a047);
    border: none;
    color: white;
    padding: 16px 60px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.btn-detect:hover {
    transform: scale(1.05);
}

/* loading box */
.loading-box {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #c8e6c9;
    border-top: 4px solid #2e7d32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* responsive */
@media (max-width: 768px) {
    .upload-area {
        width: 95%;
        min-height: 260px;
    }
}
/* sembunyikan tombol choose file */
.upload-area input[type="file"] {
    display: none;
}
.description{
    margin-top:15px;
    font-size:16px;
    color:#444;
    line-height:1.6;
    text-align:justify;
}
.recommendation-box {
    background: #e8f5e9;
    border-left: 6px solid #2e7d32;
}

.recommendation-box li {
    color: #2e7d32;
}


/* judul */
.recommendation-box h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

/* isi list */
.recommendation-box li {
    color: #ffffff;
    margin-bottom: 8px;
}

/* bullet */
.recommendation-box ul {
    padding-left: 18px;
}

/* ================= RESULT RECOMMENDATION BOX ================= */

.recommend-box,
.recommendation-box {
    background: linear-gradient(135deg,#2e7d32,#43a047);
    padding: 22px 25px;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    text-align: left;
    border: none;
}

/* judul */
.recommend-box h3,
.recommendation-box h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

/* isi list */
.recommend-box li,
.recommendation-box li {
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* bullet */
.recommend-box ul,
.recommendation-box ul {
    padding-left: 18px;
}
