/* ============================================
   FIGO - Base Styles
   ============================================ */

/* CSS Variables / Design Tokens */
:root {
    /* Colors */
    --color-primary: #334FE0;
    --color-primary-dark: #1B3DEB;
    --color-secondary: #E41C1E;
    --color-dark: #27282F;
    --color-dark-alt: #010724;
    --color-text: #1F2026;
    --color-light: #FAFAFA;
    --color-lighter: #FEFEFE;
    --color-gray: #EBEBF6;
    --color-gray-light: rgba(230, 230, 230, 0.4);
    --color-card-bg: rgba(239, 239, 247, 0.7);

    /* Typography */
    --font-primary: 'Nunito', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;

    /* Spacing - Scaled down */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    --spacing-xxl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 50px;

    /* Shadows */
    --shadow-card: -4px 12px 24px 10px rgba(254, 254, 254, 0.8);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-lighter);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1488px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.938rem;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-lighter);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-dark {
    background-color: var(--color-dark);
    color: var(--color-lighter);
}

.btn-dark:hover {
    background-color: var(--color-dark-alt);
    transform: translateY(-2px);
}

.btn-light {
    background-color: var(--color-light);
    color: var(--color-dark);
}

.btn-light:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
}

.btn-wide {
    min-width: 280px;
}

/* Gradient Text */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.gradient-1 {
    background-image: linear-gradient(103.69deg, #1B3DEB 50.633%, #E41C1E 89.246%);
}

.gradient-2 {
    background-image: linear-gradient(103.69deg, #E41C1E 1.734%, #1B3DEB 40.347%);
}

.gradient-3 {
    background-image: linear-gradient(102.45deg, #1B3DEB 40.951%, #E41C1E 55.817%);
}

.gradient-4 {
    background-image: linear-gradient(102.14deg, #E41C1E 1.734%, #1B3DEB 40.347%);
}

.gradient-5 {
    background-image: linear-gradient(115.94deg, #E41C1E 1.734%, #1B3DEB 40.347%);
}

/* Navigation Styles */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-light);
    border-bottom: 1px solid #F2F2F2;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--spacing-md);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 0.938rem;
    color: var(--color-dark-alt);
    transition: color var(--transition-fast);
}

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

.nav-auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-profile-menu {
    position: relative;
}

.nav-profile-menu summary {
    list-style: none;
}

.nav-profile-menu summary::-webkit-details-marker {
    display: none;
}

.nav-profile-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #E4E5EF;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-dark);
    cursor: pointer;
    padding: 4px 12px 4px 5px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-profile-trigger:hover,
.nav-profile-menu[open] .nav-profile-trigger {
    border-color: rgba(51, 79, 224, 0.36);
    box-shadow: 0 8px 24px rgba(31, 32, 38, 0.08);
}

.nav-profile-trigger i {
    color: #6b7083;
    font-size: 0.72rem;
    transition: transform var(--transition-fast);
}

.nav-profile-menu[open] .nav-profile-trigger i {
    transform: rotate(180deg);
}

.nav-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
}

.nav-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1001;
    display: none;
    min-width: 190px;
    border: 1px solid #E8EAF4;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(31, 32, 38, 0.13);
    padding: 8px;
}

.nav-profile-menu[open] .nav-profile-dropdown {
    display: grid;
    gap: 4px;
}

.nav-profile-dropdown a,
.nav-profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-dark);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 9px 10px;
    text-align: left;
}

.nav-profile-dropdown a:hover,
.nav-profile-dropdown button:hover {
    background: rgba(51, 79, 224, 0.08);
    color: var(--color-primary);
}

.nav-profile-dropdown button {
    color: #E41C1E;
}

.nav-auth-form,
.mobile-auth-form,
.footer-auth-form {
    margin: 0;
}

.nav-logout-btn {
    border: 0;
    cursor: pointer;
    font-family: var(--font-primary);
}

.footer-auth-form button {
    border: 0;
    background: transparent;
    color: #30323B;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    padding: 0;
    text-align: left;
    transition: color var(--transition-fast);
}

.footer-auth-form button:hover {
    color: var(--color-primary);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
    position: relative;
    transition: transform 0.3s ease, background-color 0.2s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-dark);
    left: 0;
    top: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.hamburger.active {
    background-color: transparent;
}

.hamburger.active::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger.active::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-light);
    padding: var(--spacing-md);
    border-bottom: 1px solid #F2F2F2;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.mobile-nav.active {
    max-height: 420px;
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.mobile-nav-links li {
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.mobile-nav-links li:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.mobile-nav-links a {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-dark-alt);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.mobile-nav-links a:hover {
    color: var(--color-primary);
}

.mobile-nav-links .btn {
    margin-top: 8px;
    justify-content: center;
}

.mobile-nav-links .nav-profile-dropdown a,
.mobile-nav-links .nav-profile-dropdown button {
    display: flex;
}

.mobile-nav-profile {
    width: 100%;
}

.mobile-nav-profile .nav-profile-trigger {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.mobile-nav-profile .nav-profile-trigger span:not(.nav-profile-avatar) {
    font-weight: 700;
}

.mobile-nav-profile .nav-profile-trigger i {
    margin-left: auto;
}

.mobile-nav-profile .nav-profile-dropdown {
    position: static;
    min-width: 0;
    margin-top: 6px;
    box-shadow: none;
}

/* Footer Styles - dark block with rounded corners, two sections */
.footer {
    background-color: #2C272F;
    border-radius: 24px;
    margin: var(--spacing-lg) var(--spacing-md);
    padding: 40px 48px 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
}

.footer-logo-icon {
    height: 22px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-logo {
    height: 35px;
    width: auto !important;
}

.footer-logo-badge .footer-logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

.footer-tagline {
    font-size: 0.813rem;
    font-weight: 500;
    color: rgba(250, 250, 250, 0.9);
    margin-bottom: 12px;
}

.footer-address {
    font-style: normal;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(250, 250, 250, 0.9);
}

.footer-separator {
    height: 1px;
    background-color: rgba(250, 250, 250, 0.2);
    margin: 28px 0 24px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 0.813rem;
    color: rgba(250, 250, 250, 0.9);
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 0.813rem;
    color: rgba(250, 250, 250, 0.9);
}

.footer-legal a:hover {
    text-decoration: underline;
}

.footer-column {
    min-width: 0;
}

.footer-heading {
    font-size: 0.938rem;
    font-weight: 600;
    color: rgba(250, 250, 250, 0.95);
    margin: 0 0 12px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(250, 250, 250, 0.85);
}

.footer-links a:hover {
    color: #fff;
}

.footer-social-column .footer-heading {
    margin-bottom: 12px;
}

.footer-social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-social-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    color: #2C272F;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.footer-social-icons .social-icon:hover {
    background-color: #fff;
    transform: scale(1.08);
}

.footer-social-icons .social-icon svg {
    width: 18px;
    height: 18px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .footer-top {
        gap: var(--spacing-lg);
    }

    .btn-wide {
        min-width: auto;
        width: 100%;
        max-width: 556px;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-auth-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .footer {
        margin: var(--spacing-sm);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .footer-top {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .footer-legal {
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 40px;
    }

    .nav-header {
        height: 60px;
    }

    .mobile-nav {
        top: 60px;
    }
}
