/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf7 100%);
    padding-bottom: 20px;
}

/* Header Styles */
header {
    background: #2c3e50;
    color: #fff;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

header button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

header button:hover {
    background: #296291;
    transform: translateY(-50%) scale(1.05);
}

/* Main Content */
main {
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 auto;
}

.drug-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Drug Card Styles */
.drug-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.drug-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .2);
}

.drug-card h2 {
    background: #e4edf7;
    padding: 1.2rem;
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 1px solid #dce6f0;
}

.drug-card p {
    padding: 1.2rem;
    font-size: 1.1rem;
    color: #555;
}

.drug-card .dose-info, .drug-card .effects {
    background: #f9f9f9;
    padding: 0.8rem;
    border-top: 1px solid #e0e0e0;
}

.drug-card .dose-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.drug-card .effects h3 {
    color: #e74c3c;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.drug-card .effects p {
    color: #95a5a6;
    font-style: italic;
}

.drug-card .warning {
    background: #fff3f3;
    color: #e74c3c;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .drug-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        gap: 1.2rem;
    }

    header button {
        right: 1rem;
        top: 40%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }

    .drug-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .drug-card {
        max-height: 500px;
        overflow-y: auto;
    }

    .drug-card h2 {
        font-size: 1.2rem;
    }

    .drug-card p {
        font-size: 0.95rem;
    }

    .drug-card .dose-info h3,
    .drug-card .effects h3 {
        font-size: 1.1rem;
    }
}

/* Back to Top Button */
#backToTopBtn {
    display: none;
    z-index: 100;
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid #34495e;
    margin-top: 20px;
}
