/* assets/css/main.css */
/* Redesigned Global Styles for UnlockingWizard */

/* 1. Core Variables & Reset
-------------------------------------------------- */
:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --secondary-color: #eef4ff;
    --secondary-hover: #dce7fa;
    --background-color: #ffffff;
    --body-bg-color: #f7f9fc;
    --text-dark: #2c3e50;
    --text-light: #8fa4b8;
    --text-primary: #4a90e2;
    --border-color: #e6eaf0;
    --shadow-color: rgba(44, 62, 80, 0.1);
    --success-color: #2e7d32;
    --danger-color: #c62828;
    --header-height: 70px;
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--body-bg-color);
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
}

.main-content {
    padding-top: var(--header-height);
    min-height: calc(100vh - 300px); /* Ensure content pushes footer down */
}


/* 2. Site Header & Navigation
-------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px var(--shadow-color);
    border-bottom-color: var(--border-color);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.25rem;
}

.logo img {
    height: 36px;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(-10deg);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-dropdown:hover > .nav-link {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-dropdown:hover > .nav-link::after {
    width: 100%;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    background-color: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow-color);
    list-style: none;
    padding: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.nav-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: 100%;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.dropdown-menu li a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
    border: none;
}

.logout-link { color: var(--danger-color) !important; }
.logout-link:hover { background-color: rgba(198, 40, 40, 0.1) !important; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border-color: var(--secondary-color);
}

.btn-secondary:hover { background-color: var(--secondary-hover); }

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    padding: 5px;
    border-radius: 25px;
    transition: background-color 0.2s ease;
}

.profile-dropdown:hover .profile-toggle { background-color: var(--secondary-color); }

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.profile-name {
    font-weight: 600;
    color: var(--text-dark);
}

.pro-badge {
    background: linear-gradient(45deg, #f6d365, #fda085);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}


/* 3. Mobile Navigation
-------------------------------------------------- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* This class is added by JS */
.mobile-menu-toggle.open .bar:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.mobile-menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open .bar:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Hide mobile-specific actions on desktop */
.mobile-actions {
    display: none;
}


/* 4. Site Footer (Dark Theme)
-------------------------------------------------- */
.site-footer {
    background-color: #1a202c; /* Dark background */
    color: #a0aec0; /* Lighter text for readability */
    padding: 60px 0 30px 0;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column .logo span {
    color: #ffffff; /* Make logo text white */
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links a {
    color: #a0aec0; /* Match footer text color */
    font-size: 1.2rem;
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color); /* Use primary color for hover */
}

.footer-heading {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff; /* White headings */
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a0aec0; /* Match footer text color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff; /* White on hover */
    text-decoration: underline;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item i {
    color: var(--primary-color);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid #2d3748; /* Darker border */
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

.copyright {
    margin-bottom: 5px;
    color: #ffffff; /* White copyright text */
    font-weight: 500;
}

.disclaimer {
    font-size: 0.8rem;
}


/* 5. Responsive Design
-------------------------------------------------- */
@media (max-width: 1024px) {
    /* Hide desktop-only elements */
    .header-actions { 
        display: none; 
    }
    .main-nav .nav-links {
        display: none; /* Hide the desktop nav links container */
    }

    /* Show mobile hamburger menu */
    .mobile-menu-toggle { 
        display: flex; 
    }

    /* Main mobile navigation container - slides in from right */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--background-color);
        flex-direction: column;
        align-items: flex-start; /* Align items to the start */
        padding: 20px 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        display: flex;
        justify-content: space-between; /* Pushes actions to the bottom */
    }

    /* This class is added by JS to show the menu */
    .main-nav.open {
        transform: translateX(0);
    }
    
    /* Re-enable nav-links inside the mobile menu */
    .main-nav.open .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: left;
        gap: 0;
    }
    .main-nav.open .nav-link {
        font-size: 1.1rem;
        padding: 15px 20px;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav.open .nav-link::after {
        display: none; /* Hide the underline hover effect on mobile */
    }
    
    .main-nav.open .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 10px 0 0 0;
        background: transparent;
        display: none; /* Hidden by default */
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
    }
    
    /* This class is added by JS to show dropdown content */
    .main-nav.open .nav-dropdown.open > .dropdown-menu { 
        display: block; 
    }
    .main-nav.open .nav-dropdown > .nav-link { 
        cursor: pointer; 
    }
    .main-nav.open .dropdown-menu li a {
        padding-left: 40px;
    }

    /* Style the mobile actions container */
    .main-nav.open .mobile-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 20px;
        gap: 15px;
        border-top: 1px solid var(--border-color);
    }
    .main-nav.open .mobile-actions .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    .main-nav.open .mobile-actions .profile-toggle {
        justify-content: flex-start;
        padding: 10px;
        border: 1px solid var(--border-color);
    }
    .main-nav.open .mobile-actions .profile-dropdown .dropdown-menu {
        border: none;
        margin-top: 0;
        padding-top: 0;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .social-links {
        margin-bottom: 20px;
    }
    .contact-item {
        justify-content: center;
    }
}
.sticky-footer {
  position: fixed;      /* Keeps it in a fixed position */
  bottom: 0;            /* Aligns it to the bottom */
  right: 0;             /* Aligns it to the right */
  padding: 10px 15px;   /* Adds space so the text isn't at the very edge */
  font-size: 12px;      /* Makes the text small */
  color: #555;          /* Sets a dark grey text color */
  z-index: 999;         /* Ensures it stays on top of other content */
}

.sticky-footer p {
  margin: 0; /* Removes default paragraph margin */
}