/* ===================================
   TrivoxTech - Components
   Navbar, Footer, Buttons, Theme Toggle, Back to Top
   =================================== */

/* Navigation */
.navbar {
    padding: 20px 0;
    background: transparent;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
}

body.light-theme .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light) !important;
    transition: var(--transition-normal);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.brand-icon {
    font-size: 28px;
    margin-right: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-gray) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 5px;
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.navbar .nav-link.active,
.navbar .nav-link.show {
    color: var(--text-light) !important;
}

/* Dropdown Menu Styling */
.navbar .dropdown-menu {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(153, 153, 153, 0.2);
    border-radius: 15px;
    padding: 10px;
    margin-top: 15px;
    box-shadow: var(--shadow-lg);
    animation: fadeInDown 0.3s ease;
}

body.light-theme .navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar .dropdown-item {
    color: var(--text-gray);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    transition: var(--transition-normal);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item.active {
    background: var(--gradient-primary);
    color: white !important;
    transform: translateX(5px);
}

body.light-theme .navbar .dropdown-item {
    color: var(--text-gray);
}

body.light-theme .navbar .dropdown-item:hover {
    color: #ffffff !important;
}

/* Buttons */
.nav-cta {
    background: var(--gradient-primary);
    color: white !important;
    border-radius: 50px;
    padding: 10px 25px !important;
    margin-left: 15px;
    font-weight: 600;
    border: none;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
    transform: translateY(-3px);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-normal);
    margin-left: 10px;
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.theme-toggle i {
    position: absolute;
    font-size: 20px;
    transition: var(--transition-normal);
}

.sun-icon {
    color: #fbbf24;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.moon-icon {
    color: #818cf8;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* FAQ Accordion */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.accordion-item:hover {
    border-color: rgba(26, 156, 176, 0.3);
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    padding: 20px 25px;
    border: none;
    transition: var(--transition-normal);
}

.accordion-button:not(.collapsed) {
    background: var(--bg-card);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a9cb0'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: var(--transition-normal);
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}

.accordion-body {
    padding: 20px 25px;
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 16px;
}

.accordion-collapse {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-darker);
}

body.light-theme .form-control {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-light);
}

body.light-theme .form-control:focus {
    background: #ffffff;
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 30px;
}

body.light-theme .footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-brand i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    transition: var(--transition-normal);
}

.footer-social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-gray);
    font-size: 14px;
    transition: var(--transition-normal);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-newsletter p {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.newsletter-form .input-group {
    display: flex;
}

.newsletter-form .form-control {
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.newsletter-form .btn {
    border-radius: 0 10px 10px 0;
    padding: 15px 25px;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition-normal);
}

.footer-bottom-links a:hover {
    color: var(--primary-light);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
}