/**
 * layout.css
 * 
 * Contains styles for structural elements like header, footer,
 * navigation, and basic page layout.
 */

/* ========================
   HEADER & NAVIGATION
   ======================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 15px var(--box-shadow);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 0;
    background-color: var(--header-bg);
    box-shadow: 0 5px 20px var(--box-shadow-hover);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    height: 80px;
    transition: height 0.3s ease;
}

header.scrolled nav {
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    transition: all var(--transition-medium);
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #9b59b6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    font-size: 1.2rem;
    transition: all var(--transition-medium);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), #9b59b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.logo-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    margin: 0 5px;
    position: relative;
}

.nav-item {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 30px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.nav-item span {
    position: relative;
    z-index: 2;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(52, 152, 219, 0.08);
    transition: all var(--transition-medium);
    z-index: 1;
    border-radius: 30px;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item:hover::before {
    height: 100%;
}

.nav-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), #9b59b6);
    color: white;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.nav-cta {
    margin-left: 15px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-medium);
    margin-left: 10px;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
    background-color: rgba(52, 152, 219, 0.08);
}

.theme-toggle:hover {
    background-color: rgba(52, 152, 219, 0.15);
}

.theme-toggle i {
    font-size: 1.3rem;
    transition: all var(--transition-medium);
}

.theme-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: translateY(-20px);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Mobile Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================
   FOOTER
   ======================== */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 30px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
}

.footer-links li {
    margin: 0 15px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color var(--transition-medium);
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
}

.social-links li {
    margin: 0 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all var(--transition-medium);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.9rem;
    color: var(--footer-text);
    opacity: 0.5;
}