/* ==========================================================================
   Layout CSS - Header & Footer Styles
   Based on Tailwind Design System Colors
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
    --primary: #6f42c1;
    --primary-hover: #5a3e9d;
    --foreground: #0f172a;
    --muted-foreground: #64748b;
    --background: #ffffff;
    --border: #e2e8f0;
    --gradient-subtle: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    --transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   HEADER STYLES
   ========================================================================== */

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header-fixed.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

.header-spacer {
    height: 80px;
}

/* Navbar Styling */
.navbar {
    padding: 1rem 0;
    height: 65px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--foreground);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--foreground);
    opacity: 0.8;
}

/* Desktop Navigation */
.navbar-nav-desktop .navbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* CTA Buttons */
.cta-buttons {
    gap: 0.75rem;
}

.btn-hero {
    background-image: linear-gradient(to right, #7d00d6, #4e00c5);
    color: white;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
    font-size: 0.875rem;
}

.btn-hero:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
    font-size: 0.875rem;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    border-color: unset;
}

/* Hamburger Menu */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: transparent;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    display: none;
}

.navbar-toggler:focus {
    outline: none;
}

.hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background: var(--foreground);
    border-radius: 1px;
    transition: var(--transition);
}

.navbar-toggler.active .hamburger-icon span:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active .hamburger-icon span:last-child {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.navbar-actions {
    display: flex;
    gap: 10px;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu .navbar-nav {
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
}

.mobile-menu .nav-link {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-cta-buttons {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: none;
}

.mobile-cta-buttons .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

.mobile-cta-buttons .btn:last-child {
    margin-bottom: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1399px) {
    .navbar-nav-desktop {
        display: none !important;
    }

    .navbar-toggler {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .cta-buttons {
        display: none !important;
    }

    .mobile-cta-buttons {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .mobile-cta-buttons {
        display: none !important;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.site-footer {
    background: var(--gradient-subtle);
    border-top: 1px solid var(--border);
    padding: 3rem 0 0 0;
    margin-top: auto;
}

.footer-content {
    padding-bottom: 2rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 400px;
}

.footer-contact {
    display: flex;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-contact a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-heading {
    font-weight: 600;
    color: var(--foreground);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--foreground);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-copyright,
.footer-developer {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin: 0;
}

.footer-developer a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: var(--transition);
}

.footer-developer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.w-100 {
    width: 100%;
}

.me-2 {
    margin-right: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-md-0 {
    margin-top: 0;
}

@media (min-width: 768px) {
    .mt-md-0 {
        margin-top: 0 !important;
    }

    .text-md-end {
        text-align: right !important;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-content {
    animation: fadeIn 0.3s ease-out;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.navbar-toggler:focus,
.btn-hero:focus,
.btn-outline-primary:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --muted-foreground: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}