/*
  Global Styles
  Used for fonts, scrollbar, and shared custom button animations
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@800;900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #595CFF;
    border-radius: 4px;
}

/*
  SHINY BUTTON EFFECT
  Based on your request: Linear Gradient 90deg #595cff to #c6f8ff
*/
.btn-valora {
    background: linear-gradient(90deg, hsla(239, 100%, 67%, 1) 0%, hsla(187, 100%, 89%, 1) 100%);
    background-size: 200% auto;
    color: white;
    transition: 0.5s;
    box-shadow: 0 0 15px rgba(89, 92, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-valora:hover {
    background-position: right center;
    box-shadow: 0 0 25px rgba(198, 248, 255, 0.7);
    transform: translateY(-2px);
}

/* --- SHARED HEADER & MOBILE MENU STYLES --- */

/* Desktop Nav Items */
.nav-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #475569;
    border-radius: 99px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
}

.nav-item:hover, .nav-item.active {
    color: #595CFF;
    background-color: #eff6ff;
}

/* Dropdown Menu (Desktop) */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

.dropdown-item .icon-bg {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Mobile Drawer Links */
.mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    color: #475569;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

.mobile-link:hover, .mobile-link.active {
    background: #eff6ff;
    color: #595CFF;
}

/* Submenu indentation on mobile */
.pl-4 { 
    padding-left: 1.5rem !important; 
}

/* ============================================
   LOGO STYLES & ENHANCEMENTS
   ============================================ */

/* Logo container hover effect */
header a[href="index.html"] {
    position: relative;
}

/* Logo image smooth transitions */
header a[href="index.html"] img {
    filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.15));
    transition: all 0.3s ease;
}

header a[href="index.html"]:hover img {
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
    transform: scale(1.1) rotate(5deg);
}

/* Logo text gradient animation on hover */
header a[href="index.html"]:hover .logo-text {
    background: linear-gradient(135deg,
        #4F46E5 0%,
        #6366F1 50%,
        #06B6D4 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    animation: gradientSlide 2s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Mobile drawer logo */
#mobile-drawer img {
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

/* ============================================
   LOGO TYPOGRAPHY - UNIVERSAL
   ============================================ */

.logo-text {
    font-family: 'Urbanist', sans-serif;
    font-weight: 900;
    letter-spacing: -0.025em;
    font-size: 1.5rem; /* 24px */
    background: linear-gradient(135deg,
        #4F46E5 0%,
        #6366F1 50%,
        #06B6D4 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Hover efekat */
header a[href="index.html"]:hover .logo-text {
    background-position: right center;
    letter-spacing: 0;
    transform: scale(1.02);
}

/* Responzivne veličine */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1.25rem; /* 20px na mobilnom */
        font-weight: 800;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.1rem; /* 18px na malim ekranima */
    }
}

/* ============================================
   DROPDOWN FIX - FORCED VISIBILITY
   ============================================ */

/* Osiguraj da header i nav nemaju overflow hidden */
header,
header > div,
header nav {
    overflow: visible !important;
}

/* Dropdown parent container */
.relative.group {
    position: relative;
    z-index: 100;
}

/* Dropdown wrapper */
.relative.group > div:last-child {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999 !important;
}

/* Hover state */
.relative.group:hover > div:last-child {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Dropdown box */
.relative.group > div:last-child > div {
    background: white;
    border-radius: 1rem;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.15),
        0 10px 10px -5px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    min-width: 280px;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dropdown items styling */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #475569;
}

.dropdown-item:hover {
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.08) 0%,
        rgba(6, 182, 212, 0.08) 100%
    );
    transform: translateX(4px);
}

/* Icon background */
.dropdown-item .icon-bg {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: transform 0.2s;
}

.dropdown-item:hover .icon-bg {
    transform: scale(1.1) rotate(5deg);
}

/* Text u dropdown-u */
.dropdown-item span {
    line-height: 1.4;
    display: block;
}

.dropdown-item span:first-child {
    font-weight: 700;
    color: #1e293b;
}

.dropdown-item span:last-child {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Animation */
@keyframes dropdown-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.relative.group:hover > div:last-child > div {
    animation: dropdown-slide 0.3s ease;
}

/* Chevron rotation */
.relative.group:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* Responsive - hide na mobilnom */
@media (max-width: 768px) {
    .relative.group > div:last-child {
        display: none !important;
    }
}