/* Common styles for all pages */
:root {
    --gold-metallic: #D4AF37;
    --gold-accent: #FFD700;
    --deep-brown: #1F1B12;
    --white: #FFFFFF;
    --warm-off-white: #FEFDF8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}


* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* FAQ Styles */
.faq-section {
    padding: 4rem 0;
    background: var(--warm-off-white);
}

.faq-section h2 {
    text-align: center;
    color: var(--deep-brown);
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-box {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-btn {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-brown);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-btn:hover {
    background: linear-gradient(135deg, var(--gold-accent) 0%, var(--gold-metallic) 100%);
    color: var(--white);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold-metallic);
    transition: var(--transition);
}

.faq-btn:hover .faq-icon {
    color: var(--white);
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--white);
}

.faq-content.active {
    max-height: 300px;
}

.faq-content p {
    padding: 1.5rem;
    margin: 0;
    color: var(--deep-brown);
    line-height: 1.6;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--deep-brown);
    background: linear-gradient(135deg, var(--warm-off-white) 0%, var(--white) 100%);
    min-height: 100vh;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-metallic);
    text-decoration: none;
    margin-right: 20px;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 12px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-left: auto;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--deep-brown);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px 12px;
    position: relative;
    overflow: hidden;
}

.nav-links > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-metallic), var(--gold-light));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links > li > a:hover::before {
    width: 80%;
}

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

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.6s;
}

.dropdown:hover .dropdown-toggle::before {
    left: 100%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    list-style: none;
    padding: 12px 0;
    margin: 0;
    backdrop-filter: blur(10px);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-left: 2px solid #e0e0e0;
    border-top: 2px solid #e0e0e0;
    z-index: -1;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.dropdown-menu li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-metallic), var(--gold-light));
    transition: width 0.3s ease;
}

.dropdown-menu li:hover::after {
    width: 100%;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--deep-brown);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
    font-size: 0.95rem;
    position: relative;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.05) 50%, transparent 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
}

.dropdown-menu a:hover {
    background-position: 0% 0;
    color: var(--deep-brown);
    transform: translateX(8px);
    font-weight: 600;
}

.dropdown-menu a:active {
    transform: translateX(4px) scale(0.98);
}

/* Staggered animation for dropdown items */
.dropdown-menu li:nth-child(1) a { transition-delay: 0.05s; }
.dropdown-menu li:nth-child(2) a { transition-delay: 0.1s; }
.dropdown-menu li:nth-child(3) a { transition-delay: 0.15s; }
.dropdown-menu li:nth-child(4) a { transition-delay: 0.2s; }
.dropdown-menu li:nth-child(5) a { transition-delay: 0.25s; }
.dropdown-menu li:nth-child(6) a { transition-delay: 0.3s; }

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 8px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--deep-brown) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 2px;
    transform-origin: center center;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hamburger animation - cross icon when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background: var(--gold-metallic);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background: var(--gold-metallic);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gold-metallic);
    cursor: pointer;
}

/* Main Content */
main {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

h1 {
    font-size: 2.5rem;
    color: var(--gold-metallic);
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    color: var(--deep-brown);
    margin: 2rem 0 1rem 0;
}

h3 {
    font-size: 1.4rem;
    color: var(--deep-brown);
    margin: 1.5rem 0 1rem 0;
}

h4 {
    font-size: 1.2rem;
    color: var(--deep-brown);
    margin: 1rem 0 0.5rem 0;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: left;
}

/* List Styles */
ul, ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.7;
}

li {
    margin-bottom: 0.5rem;
}

/* Cards and Sections */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section {
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    background: var(--gold-metallic);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--gold-accent);
    transform: translateY(-2px);
}

.back-link {
    color: var(--gold-metallic);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 1rem;
        gap: 1rem;
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 35px !important;
        height: 30px !important;
        z-index: 9999 !important;
        box-shadow: none !important;
        padding: 5px !important;
    }
    
    .hamburger span {
        background: var(--deep-brown) !important;
        width: 25px !important;
        height: 4px !important;
        margin: 2px 0 !important;
        border-radius: 2px !important;
        display: block !important;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        pointer-events: auto;
        width: 100%;
        justify-content: space-between;
        background: rgba(212, 175, 55, 0.1);
        border-radius: 8px;
        margin: 0.5rem 0;
    }
    
    .dropdown-toggle::before {
        display: none;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(248, 248, 248, 0.95);
        border-radius: 8px;
        padding: 0 8px;
        margin: 0;
        min-width: auto;
        backdrop-filter: none;
        transition: all 0.3s ease;
    }
    
    .dropdown.mobile-active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 400px;
        padding: 8px;
        margin: 0.5rem 0;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-menu li::after {
        display: none;
    }
    
    .dropdown-menu a {
        padding: 12px 16px;
        font-size: 0.9rem;
        background: white;
        border-radius: 6px;
        margin-bottom: 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transform: none !important;
        background-size: 100% 100%;
        background-position: 0% 0%;
    }
    
    .dropdown-menu a:hover {
        transform: none !important;
        background: var(--gold-light);
    }
    
    .dropdown-menu a:active {
        transform: scale(0.98) !important;
    }
    
    /* Remove staggered delays on mobile */
    .dropdown-menu li:nth-child(1) a,
    .dropdown-menu li:nth-child(2) a,
    .dropdown-menu li:nth-child(3) a,
    .dropdown-menu li:nth-child(4) a,
    .dropdown-menu li:nth-child(5) a,
    .dropdown-menu li:nth-child(6) a {
        transition-delay: 0s;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        height: 28px;
        margin-right: 8px;
    }
    
    .logo span {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        font-size: 1.1rem;
        text-indent: -9999px;
    }
    
    .logo span::before {
        content: "ScrapGold";
        text-indent: 0;
    }
    
    .logo span::after {
        content: "Calculator";
        font-size: 0.85em;
        text-indent: 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    main {
        padding: 2rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 0.95rem;
    }
    
    .logo img {
        height: 24px;
        margin-right: 6px;
    }
    
    .logo span::before {
        font-size: 0.95rem;
    }
    
    .logo span::after {
        font-size: 0.8em;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    p {
        font-size: 1rem;
    }
}
