/* 
  MEDICO LIFE SCIENCE - Design System
  ====================================
  Easily modify colors by changing the CSS variables below
*/

:root {
    /* Primary Colors */
    --primary: #fdf485;                /* Lemon Yellow */
    --primary-foreground: #000000;     /* Black for contrast */
    
    /* Secondary/Background Colors */
    --secondary: #ffffff;              /* White */
    --secondary-foreground: #4e4e4e;   /* Text color */
    
    /* Accent - Red */
    --accent: #710000;                 /* Red */
    --accent-foreground: #ffffff;      /* White */
    
    /* Green - Natural elements */
    --green: #6cdd51;                  /* Green */
    --green-foreground: #ffffff;
    
    /* Background */
    --background: #ffffff;
    --foreground: #4e4e4e;
    
    /* Light backgrounds */
    --light-bg: #f7f7fb;
    --frozen: #e4eaf1;
    --light-lemon: #fffeef;
    --sky-blue: #f1f5f9;
    
    /* Border */
    --border: #e6e6e6;
    --border-lemon: #eeecd3;
    
    /* Additional colors */
    --text-muted: #b6b6b6;
    --grey: #a7a7a7;
    --dark-grey: #363b3e;
    --brown: #433c30;
    --pink: #dd78a0;
    --yellow: #fbd12a;
    --peach: #ff6565;
    
    /* Spacing */
    --radius: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Archivo', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

/* Utility Classes */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* ======================================
   BUTTONS
   ====================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn i { width: 1.25rem; height: 1.25rem; }
.btn-icon { width: 1rem; height: 1rem; transition: transform var(--transition-normal); }
.btn:hover .btn-icon { transform: translateX(4px); }

.btn-hero {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 1rem 2rem;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(253, 244, 133, 0.3);
}
.btn-hero:hover {
    background-color: #fcef5e;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(253, 244, 133, 0.4);
}

.btn-hero-outline {
    background-color: transparent;
    color: var(--foreground);
    padding: 1rem 2rem;
    font-size: 1rem;
    border: 2px solid var(--border);
}
.btn-hero-outline:hover {
    background-color: var(--light-bg);
    border-color: var(--accent);
}

.btn-contact {
    background-color: var(--accent);
    color: var(--accent-foreground);
    padding: 0.625rem 1.25rem;
}
.btn-contact:hover {
    background-color: #4a0000;
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    color: var(--foreground);
    padding: 0.625rem 1.25rem;
}
.btn-ghost:hover { color: var(--accent); }

.btn-accent {
    background-color: var(--accent);
    color: var(--accent-foreground);
    padding: 0.75rem 1.5rem;
}
.btn-accent:hover {
    background-color: #4a0000;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background-color: var(--light-bg);
    border-color: var(--accent);
}

.btn-card {
    background-color: var(--accent);
    color: var(--accent-foreground);
    padding: 0.5rem 1rem;
    width: 100%;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--accent);
    padding: 1rem 2rem;
    font-size: 1rem;
}
.btn-secondary:hover {
    background-color: var(--light-bg);
}

.btn-full { width: 100%; }

/* ======================================
   KICKER / TAG
   ====================================== */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    background-color: rgba(92, 69, 191, 0.12);
    color: var(--accent);
}
.kicker-icon { width: 1rem; height: 1rem; }
.kicker-light {
    background-color: rgba(253, 244, 133, 0.2);
    color: var(--primary);
}
.kicker-testimonial {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--secondary);
}

/* ======================================
   FLOATING ICONS BACKGROUND
   ====================================== */
.floating-icons-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0; /* sits above the gradient overlay */
}

/* Ensure gradient overlay sits underneath floating icons */
.gradient-overlay { z-index: -1; }

/* Allow logo image sizing */
.logo-icon img { width: 8rem; object-fit: contain; display: block; border-radius: inherit; }

.gradient-overlay {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(30, 144, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(113, 0, 0, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(108, 221, 81, 0.03) 0%, transparent 60%),
        linear-gradient(180deg, var(--background) 0%, var(--light-bg) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Static decorative icons */
.static-icon {
    position: absolute;
    pointer-events: none;
    animation: pulse-glow 3s ease-in-out infinite;
}

.static-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.2;
}

.icon-stethoscope { color: var(--medical-blue); opacity: 0.2; }
.icon-stethoscope svg { width: 48px; height: 48px; }

.icon-heart { color: var(--accent); opacity: 0.15; animation-delay: 1s; }

.icon-pill { color: var(--green); opacity: 0.2; animation-delay: 2s; }
.icon-pill svg { width: 44px; height: 44px; }

.icon-test-tube { color: var(--medical-light-blue); opacity: 0.15; animation-delay: 1.5s; }
.icon-test-tube svg { width: 36px; height: 36px; }

.icon-shield { color: #d4a500; opacity: 0.2; animation-delay: 0.5s; }
.icon-shield svg { width: 42px; height: 42px; }

.icon-heart-pulse { color: var(--accent); opacity: 0.15; animation-delay: 2.5s; }
.icon-heart-pulse svg { width: 38px; height: 38px; }

/* Floating animated icons */
.floating-icon {
    position: absolute;
    pointer-events: none;
    opacity: 0.18; /* slightly more visible */
    will-change: transform, opacity;
}

.floating-icon svg {
    stroke-width: 1.5;
    width: 28px; height: 28px; /* default size if not set by JS */
} 

/* Animations */
@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.12;
    }
    90% {
        opacity: 0.12;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1);
        opacity: 0;
    }
}

@keyframes float-diagonal {
    0% {
        transform: translate(0, 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.1;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translate(100px, -100vh) rotate(180deg);
        opacity: 0;
    }
}

@keyframes drift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(10px) translateY(-5px);
    }
    50% {
        transform: translateX(-5px) translateY(-10px);
    }
    75% {
        transform: translateX(-10px) translateY(5px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(30, 144, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(30, 144, 255, 0.5));
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================
   HEADER
   ====================================== */
.header {
    position: fixed;
    top: 1rem;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    padding: 0.75rem 0;
    transition: all var(--transition-slow);
    
    /* 90% width with 5% margins on each side */
    width: 90vw;
    left: 5vw;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(92, 69, 191, 0.08);
    padding: 0.5rem 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-link:hover .logo-icon { transform: scale(1.05); }

.logo-icon {
    width: 8rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal);
}
.logo-icon span {
    color: var(--accent-foreground);
    font-weight: 700;
    font-size: 1.125rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--foreground);
    display: none;
}
@media (min-width: 640px) { .logo-text { display: block; } }

.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.875rem;
    transition: color var(--transition-normal);
}
.nav-link:hover { color: var(--accent); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-normal);
}
.active{
    color: var(--accent);
}
.nav-link:hover::after { width: 100%; }

.nav-icon { width: 1rem; height: 1rem; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-actions .btn-contact { display: none; }
.header-actions .btn-ghost { display: none; }
@media (min-width: 640px) { .header-actions .btn-contact { display: flex; } }
@media (min-width: 1024px) { .header-actions .btn-ghost { display: flex; } }

.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    transition: color var(--transition-normal);
}
.mobile-menu-btn:hover { color: var(--accent); }
.mobile-menu-btn i { width: 1.5rem; height: 1.5rem; }
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--secondary);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(92, 69, 191, 0.12);
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}
.mobile-menu.open { display: block; }

.mobile-nav { display: flex; flex-direction: column; gap: 0.5rem; }

.mobile-nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--foreground);
    font-weight: 600;
    transition: all var(--transition-normal);
}
.mobile-nav-link:hover {
    background-color: var(--light-bg);
    color: var(--accent);
}

.mobile-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ======================================
   MAIN CONTENT
   ====================================== */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 2rem;
    position: relative;
    z-index: 1;
}

/* ======================================
   LOGIN CARD
   ====================================== */
.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.9), 
        rgba(255, 255, 255, 0.98)
    );
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 
        0 10px 40px rgba(16, 24, 40, 0.06),
        0 0 0 1px rgba(230, 230, 230, 0.5);
}

.login-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    width: 8rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo span {
    color: var(--accent-foreground);
    font-weight: 700;
    font-size: 2rem;
}

.login-card-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.login-card-header p {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

/* ======================================
   FORM
   ====================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--foreground);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: calc(var(--radius) / 1.5);
    border: 1px solid var(--border);
    background-color: var(--card);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(113, 0, 0, 0.1), 0 8px 20px rgba(113, 0, 0, 0.06);
}

/* Lighter placeholder color for better readability */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(78,78,78,0.45);
}

/* Vendor prefixes for consistent behavior across browsers */
.form-group input::-webkit-input-placeholder,
.form-group textarea::-webkit-input-placeholder {
    color: rgba(78,78,78,0.45);
}
.form-group input:-ms-input-placeholder,
.form-group textarea:-ms-input-placeholder {
    color: rgba(78,78,78,0.45);
}

.password-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.password-field input {
    flex: 1;
}

.toggle-password {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--accent);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--accent-hover);
}

.toggle-password svg {
    width: 1.25rem;
    height: 1.25rem;
}

.field-error {
    color: var(--destructive);
    font-size: 0.875rem;
    min-height: 1.1rem;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #8b0000 100%);
    color: var(--accent-foreground);
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    transition: all var(--transition-normal);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #600000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(113, 0, 0, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.forgot-link {
    color: var(--muted-foreground);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--accent);
}

.form-message {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 1.2rem;
    margin-top: 0.5rem;
}

.form-message.success {
    color: var(--green);
}

.form-message.error {
    color: var(--destructive);
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 520px) {
    .login-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .login-logo {
        width: 4rem;
        height: 4rem;
    }
    
    .login-logo span {
        font-size: 1.5rem;
    }
}