/* 
   MediDash - Hospital Admin Template Landing Page 
   Modern CSS Rewrite
*/

:root {
    /* Premium Modern Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --bg-white: rgba(255, 255, 255, 0.7);
    --bg-light: transparent;
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
                   radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 40%),
                   linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-lg: 0 15px 35px -5px rgba(31, 38, 135, 0.15), 0 10px 15px -5px rgba(31, 38, 135, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-md: 20px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-gradient);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.btn-primary:hover::after {
    left: 150%;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(14, 61, 216, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f4ff;
}

.btn-white {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    border: var(--glass-border);
}

.btn-white:hover {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 1);
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

/* Header */
.main-header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.main-header .container {
    height: 100%;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links .btn {
    padding: 0.6rem 1.2rem;
    font-size: 14px;
    color: white !important; /* Ensure button text is white */
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero-section {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    background: transparent;
    overflow: hidden;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.badge-soft {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(14, 61, 216, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.hero-title {
    background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-img-wrapper {
    perspective: 1000px;
}

@keyframes float {
    0% { transform: translateY(0px) rotateY(-5deg) rotateX(5deg); }
    50% { transform: translateY(-20px) rotateY(-2deg) rotateX(8deg); }
    100% { transform: translateY(0px) rotateY(-5deg) rotateX(5deg); }
}

.hero-img-wrapper img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: var(--glass-border);
    animation: float 6s ease-in-out infinite;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-img-wrapper:hover img {
    animation-play-state: paused;
    transform: rotateY(0) rotateX(0) scale(1.03);
    box-shadow: 0 30px 60px -15px rgba(14, 61, 216, 0.35);
}

/* Demos */
.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.demo-card-wrapper {
    text-align: center;
}

.demo-card {
    position: relative;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
    padding-bottom: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: var(--glass-border);
    margin-bottom: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.demo-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.7);
}

.browser-frame {
    display: flex;
    align-items: center;
    padding: 0 0.5rem 0.5rem;
}

.browser-dots {
    display: flex;
    gap: 4px;
}

.browser-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.demo-card img {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    width: 100%;
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(79, 70, 229, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-card:hover .demo-overlay {
    opacity: 1;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
}

.cta-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 5rem 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2, .cta-content p {
    color: white;
}

/* Support Section */
.support-section {
    background-color: transparent;
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.support-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.main-footer {
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.875rem;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Scroll Top */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background-color: var(--text-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 900;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 2.75rem; }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content { margin: 0 auto;}
    .hero-actions { justify-content: center; }
    .demos-grid { gap: 2rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Features Section */
.features-section {
    background-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    border: var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.7);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Modules Section */
.modules-section {
    background-color: transparent;
}

.modules-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.module-group {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-group:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.7);
}

.module-header {
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.module-header i {
    font-size: 1.5rem;
}

.color-admin { background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%); }
.color-doctor { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
.color-patient { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.module-list {
    padding: 1.5rem;
    flex-grow: 1;
}

.module-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.module-list li:before {
    content: "•";
    color: #cbd5e1;
    font-weight: bold;
    margin-right: 0.75rem;
}

.module-list li:last-child {
    border-bottom: none;
}

.module-footer {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    border-top: var(--glass-border);
}

/* Tech Stack Section */
.tech-section {
    padding: 4rem 0;
    background: transparent;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.tech-item {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    box-shadow: var(--shadow-sm);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.tech-item:hover {
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.text-primary {
    color: var(--primary-color) !important;
}

.section-desc {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
