/**
 * Shared CSS - MySmartKid Platform
 * Common styles used across all public pages
 */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #f44336;
    --kid-color: #FF6B6B;
    --parent-color: #4ECDC4;
    --dark: #2c3e50;
    --light: #f8f9fa;
}

/* Base Typography */
body {
    font-family: 'Heebo', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    background: white;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--dark);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
.nav-link:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-on-scroll {
        animation: none !important;
    }
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand .emoji {
    font-size: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
    margin: 0 15px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Button Styles */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Demo Button in Navbar */
.btn-demo-navbar {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border: none;
    color: white !important;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-demo-navbar::before {
    content: '\1F3AF';
    margin-left: 8px;
    font-size: 1.1rem;
}

.btn-demo-navbar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
    color: white !important;
}

.btn-demo-navbar:active {
    transform: translateY(0);
}

/* Removed pulse animation - was annoying */

.btn-demo-navbar:hover,
.btn-demo-navbar:focus {
    animation: none;
}

/* Login Dropdown Styling */
.dropdown-menu {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-item {
    padding: 12px 25px;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary);
    padding-right: 30px;
}

.dropdown-item i {
    margin-left: 8px;
    width: 20px;
    text-align: center;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 20px;
}

.section-title .subtitle {
    font-size: 1.3rem;
    color: #666;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 25px;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* Green Gift Button - For free trial sections */
.btn-success-gift {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-success-gift:hover {
    background: linear-gradient(135deg, #388E3C 0%, #4CAF50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
    color: white;
}

.btn-success-gift:active {
    transform: translateY(0);
}

/* Compact demo button on medium screens to prevent line break */
@media (min-width: 768px) and (max-width: 1100px) {
    .btn-demo-navbar::before {
        content: '';
        margin-left: 0;
    }

    .btn-demo-navbar {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .btn-primary-gradient {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .nav-link {
        margin: 0 8px;
        font-size: 0.95rem;
    }
}

/* Mobile Navbar Styles */
@media (max-width: 991px) {
    /* Navbar toggler button */
    .navbar-toggler {
        border: 2px solid var(--primary);
        border-radius: 8px;
        padding: 8px 12px;
        background: white;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Collapsed menu styling */
    .navbar-collapse {
        margin-top: 15px;
        padding: 20px;
        background: white;
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    /* Navigation links in mobile */
    .navbar-nav {
        margin-bottom: 20px;
        text-align: center;
    }

    .nav-item {
        margin: 0;
        padding: 0;
    }

    .nav-link {
        padding: 12px 15px !important;
        margin: 5px 0 !important;
        border-radius: 10px;
        font-size: 1.1rem;
        transition: all 0.3s;
        text-align: center;
        display: block;
    }

    .nav-link:hover,
    .nav-link:focus {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        padding-right: 20px !important;
    }

    /* Buttons container in mobile menu */
    .navbar-collapse .d-flex {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Demo button in mobile menu */
    .btn-demo-navbar {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    /* Login dropdown in mobile */
    .navbar-collapse .dropdown {
        width: 100%;
    }

    .navbar-collapse .dropdown .btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    .dropdown-menu {
        width: 100%;
        margin-top: 5px !important;
    }

    .dropdown-item {
        padding: 14px 20px;
        font-size: 1.05rem;
    }
}

/* Responsive Base */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem;
    }
}
