/* ========================================
   RASAMED - Main Stylesheet
======================================== */

:root {

    --primary: #0ea5e9;
    --primary-dark: #0369a1;

    --secondary: #14b8a6;

    --success: #10b981;

    --warning: #f59e0b;

    --danger: #ef4444;

    --bg: #f4f7fb;

    --card-bg: rgba(255,255,255,0.75);

    --glass-border: rgba(255,255,255,0.4);

    --text: #1f2937;

    --text-light: #6b7280;

    --shadow:
        0 10px 30px rgba(0,0,0,.08);

    --radius: 18px;

    --transition: all .3s ease;

}

/* ========================================
   RESET
======================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:
        Inter,
        Segoe UI,
        sans-serif;

    color:var(--text);

    background:
        linear-gradient(
            135deg,
            #dff7ff,
            #eefcf8,
            #f9fbff
        );

    min-height:100vh;
}

/* ========================================
   TOPBAR
======================================== */

.topbar{

    position:sticky;
    top:0;

    z-index:1000;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 40px;

    backdrop-filter:blur(14px);

    background:
        rgba(255,255,255,.75);

    border-bottom:
        1px solid rgba(255,255,255,.4);

    box-shadow:
        0 4px 20px rgba(0,0,0,.04);

}

.logo{

    font-size:24px;

    font-weight:800;

    color:var(--primary);

    display:flex;

    gap:10px;

    align-items:center;

}

.logo i{

    color:var(--secondary);

}

/* ========================================
   NAVIGATION
======================================== */

nav{

    display:flex;

    gap:10px;

}

.tab-btn{

    border:none;

    background:transparent;

    padding:10px 18px;

    border-radius:999px;

    cursor:pointer;

    font-weight:600;

    color:var(--text);

    transition:var(--transition);

}

.tab-btn:hover{

    background:#e7f8ff;

}

.tab-btn.active{

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color:white;

}

/* ========================================
   TAB CONTENT
======================================== */

.tab-content{

    display:none;

    animation:fadeIn .35s ease;

    padding:40px;

}

.tab-content.active{

    display:block;

}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(12px);
    }

    to{
        opacity:1;
        transform:none;
    }

}

/* ========================================
   HERO
======================================== */

.hero{

    text-align:center;

    margin-bottom:30px;

}

.hero h1{

    font-size:60px;

    font-weight:900;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

}

.hero p{

    margin-top:10px;

    color:var(--text-light);

    font-size:18px;

}

/* ========================================
   DISCLAIMER
======================================== */

.disclaimer{

    background:
        linear-gradient(
            90deg,
            #fff9db,
            #fff4c7
        );

    border-left:5px solid var(--warning);

    padding:18px;

    border-radius:12px;

    margin-bottom:25px;

    color:#6b4f00;

    line-height:1.5;

}

.disclaimer i{

    margin-right:10px;

}

/* ========================================
   SEARCH CARD
======================================== */

.search-card{

    background:var(--card-bg);

    backdrop-filter:blur(14px);

    border:1px solid var(--glass-border);

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:25px;

    margin-bottom:30px;

}

.search-mode{

    display:flex;

    gap:25px;

    margin-bottom:18px;

}

.search-mode label{

    font-weight:600;

    cursor:pointer;

}

.search-box{

    display:flex;

    gap:10px;

}

.search-box input{

    flex:1;

    border:none;

    outline:none;

    padding:15px;

    border-radius:14px;

    background:white;

    box-shadow:
        inset 0 0 0 1px #e5e7eb;

    font-size:15px;

}

.search-box button{

    border:none;

    cursor:pointer;

    color:white;

    font-weight:700;

    padding:0 28px;

    border-radius:14px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    transition:var(--transition);

}

.search-box button:hover{

    transform:translateY(-2px);

}

/* ========================================
   STATS
======================================== */

.stats-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(220px,1fr));

    gap:20px;

    margin-bottom:35px;

}

.stat-card{

    position:relative;

    overflow:hidden;

    padding:25px;

    border-radius:var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.9),
            rgba(255,255,255,.65)
        );

    backdrop-filter:blur(16px);

    border:1px solid rgba(255,255,255,.5);

    box-shadow:var(--shadow);

}

.stat-card::before{

    content:"";

    position:absolute;

    width:120px;
    height:120px;

    border-radius:50%;

    background:
        rgba(14,165,233,.1);

    top:-40px;
    right:-40px;

}

.stat-card h2{

    font-size:40px;

    color:var(--primary);

    margin-bottom:8px;

}

.stat-card p{

    color:var(--text-light);

    font-weight:600;

}

/* ========================================
   TABLE
======================================== */

.table-wrapper{

    background:white;

    border-radius:var(--radius);

    overflow:hidden;

    box-shadow:var(--shadow);

}

table{

    width:100%;

    border-collapse:collapse;

}

thead{

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color:white;

}

th{

    padding:16px;

    text-align:left;

}

td{

    padding:15px;

    border-bottom:
        1px solid #f0f0f0;

}

tbody tr{

    cursor:pointer;

    transition:var(--transition);

}

tbody tr:hover{

    background:#f0fbff;

}

/* ========================================
   GLASS CARDS
======================================== */

.glass-card{

    background:var(--card-bg);

    border:1px solid var(--glass-border);

    border-radius:var(--radius);

    padding:25px;

    margin-bottom:25px;

    backdrop-filter:blur(15px);

    box-shadow:var(--shadow);

}

.glass-card h3{

    margin-bottom:15px;

    color:var(--primary);

}

/* ========================================
   FAQ
======================================== */

.faq{

    display:grid;

    gap:20px;

}

.faq-item{

    background:white;

    border-radius:16px;

    padding:20px;

    box-shadow:var(--shadow);

}

.faq-item h3{

    margin-bottom:10px;

    color:var(--primary);

}

/* ========================================
   ADVANCED SEARCH
======================================== */

#queryBuilder{

    background:white;

    padding:25px;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

}

#addCondition,
#runAdvanced{

    border:none;

    cursor:pointer;

    padding:12px 20px;

    border-radius:12px;

    color:white;

    font-weight:700;

}

#addCondition{

    background:var(--secondary);

}

#runAdvanced{

    background:var(--primary);

    margin-top:20px;

}

.condition-row{

    display:grid;

    grid-template-columns:
        2fr
        2fr
        2fr
        1fr;

    gap:10px;

    margin-top:15px;

}

.condition-row select,
.condition-row input{

    padding:10px;

    border-radius:10px;

    border:1px solid #ddd;

}

/* ========================================
   MODAL
======================================== */

.modal{

    display:none;

    position:fixed;

    inset:0;

    background:
        rgba(0,0,0,.55);

    z-index:5000;

    justify-content:center;

    align-items:center;

}

.modal.show{

    display:flex;

}

.modal-content{

    width:min(900px,90vw);

    max-height:85vh;

    overflow:auto;

    background:white;

    border-radius:24px;

    padding:30px;

    position:relative;

    animation:popup .25s ease;

}

.modal-content #footerClose {
      
    display: flex;
    
    justify-content: flex-end;
}

@keyframes popup{

    from{
        transform:scale(.9);
        opacity:0;
    }

    to{
        transform:scale(1);
        opacity:1;
    }

}

#closeModal{

    position:absolute;

    top:15px;

    right:20px;

    font-size:32px;

    cursor:pointer;

    color:#999;

}

#closeModal:hover{

    color:var(--danger);

}

.detail-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(250px,1fr));

    gap:15px;

}

.detail-item{

    background:#f8fafc;

    border-radius:12px;

    padding:14px;

}

.detail-item strong{

    display:block;

    color:var(--primary);

    margin-bottom:6px;

}

/* ========================================
   FOOTER
======================================== */

footer{

    margin-top:40px;

    padding:25px;

    text-align:center;

    background:white;

    border-top:
        1px solid #e5e7eb;

}

footer a{

    margin:0 12px;

    text-decoration:none;

    color:var(--primary);

    font-weight:600;

}

footer a:hover{

    text-decoration:underline;

}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width:768px){

    .topbar{

        flex-direction:column;

        gap:15px;

        padding:15px;

    }

    nav{

        flex-wrap:wrap;

        justify-content:center;

    }

    .hero h1{

        font-size:42px;

    }

    .search-box{

        flex-direction:column;

    }

    .condition-row{

        grid-template-columns:1fr;

    }

    .tab-content{

        padding:20px;

    }

}

.footer-info{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;

    padding:20px;
    margin-top: 0;

    background:#f5f5f5;
    border-top:1px solid #ddd;

    font-size:14px;
}

.footer-left,
.footer-center,
.footer-right{
    flex:1;
    min-width:250px;
    text-align:center;
}

.footer-logo{
    max-height:80px;
}

.license-img{
    max-height:40px;
    margin-bottom:10px;
}

.footer-center p{
    margin-top:8px;
}


/* Component styles */
.autocomplete-container{
    position:relative;
    width:100%;
}

#searchInput{
    width:100%;
}

.suggestions-dropdown{

    position:absolute;
    top:100%;
    left:0;
    right:0;

    background:white;

    border:1px solid #dcdcdc;
    border-top:none;

    max-height:300px;
    overflow-y:auto;

    z-index:9999;

    box-shadow:
        0 4px 10px rgba(0,0,0,.08);

    display:none;
}

.suggestion-item{

    padding:12px 16px;
    cursor:pointer;

    white-space:normal;      /* allows wrapping */
    word-break:break-word;
}

.suggestion-item:hover{

    background:#f4f7ff;
}



/* Custom CSS */
.about-header{
    margin-bottom: 20px;
}

.modal h2 {
    margin-top: -20px;
    margin-bottom: 20px;
}

.results-note{
    margin:10px 0;
    padding:10px 15px;

    background:#f8f9ff;
    border-left:4px solid #4f46e5;

    color:#444;
    font-size:14px;
}

.seo-content{
    max-width:1200px;
    margin:40px auto;
    padding:20px;
    font-size:15px;
    line-height:1.8;
    color:#444;
}