/* Theme V2 - Sophisticated Design System */

/* ================================
   CSS Variables
   ================================ */
:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --primary-light: #e8f4ff;
    --secondary: #6c757d;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* ================================
   Header V2
   ================================ */
.header-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-v2.scrolled {
    box-shadow: var(--shadow-md);
}

.header-v2 .nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-v2 .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.header-v2 .logo img {
    height: 32px;
}

.header-v2 .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-v2 .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.header-v2 .nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* Tools Dropdown */
.tools-dropdown {
    position: relative;
}

.tools-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tools-dropdown-trigger:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.tools-dropdown-trigger svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.tools-dropdown:hover .tools-dropdown-trigger svg {
    transform: rotate(180deg);
}

.tools-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 900px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.tools-dropdown:hover .tools-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mega-menu-section {
    padding: 0.75rem;
}

.mega-menu-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.15s ease;
}

.mega-menu-item:hover {
    background: var(--gray-50);
}

.mega-menu-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mega-menu-item-icon img {
    width: 18px;
    height: 18px;
}

.mega-menu-item-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.mega-menu-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: center;
}

.mega-menu-footer a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

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

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ================================
   Footer V2
   ================================ */
.footer-v2 {
    background: var(--gray-900);
    color: white;
    margin-top: 4rem;
}

/* Remove margin when footer follows CTA section (both are dark) */
.cta-section + .footer-v2 {
    margin-top: 0;
}

.footer-top {
    padding: 4rem 1.5rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 3rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.footer-brand .logo img {
    height: 32px;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column a:hover {
    color: white;
}

.footer-column .tool-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-column .tool-icon img {
    width: 12px;
    height: 12px;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding: 1.5rem;
}

.footer-bottom-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-payments {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-payments img {
    height: 28px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-payments img:hover {
    opacity: 1;
}

.footer-language {
    position: relative;
}

.footer-language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    color: var(--gray-300);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-language-btn:hover {
    background: var(--gray-700);
}

.footer-language-btn img {
    width: 18px;
    height: 14px;
    border-radius: 2px;
}

/* ================================
   Section Styles
   ================================ */
.section {
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ================================
   Stats Section
   ================================ */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 1.5rem;
}

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* ================================
   Highlights V2
   ================================ */
.highlights-v2 {
    background: var(--gray-50);
}

.highlights-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

.highlight-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.highlight-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.highlight-icon img {
    width: 28px;
    height: 28px;
}

.highlight-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.625rem;
}

.highlight-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ================================
   Features V2
   ================================ */
.features-v2 {
    background: var(--gray-50);
}

.features-cards-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .features-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Legacy features grid (keeping for tool pages) */
.features-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-content {
    padding-right: 2rem;
}

.feature-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.feature-content p {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.feature-list li svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ================================
   Tools Grid V2
   ================================ */
.tools-v2 {
    background: var(--gray-50);
}

.tools-grid-v2 {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .tools-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tools-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tools-grid-v2 {
        grid-template-columns: 1fr;
    }
}

.tool-card-v2 {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.tool-card-v2:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.tool-card-v2-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-card-v2-icon img {
    width: 22px;
    height: 22px;
}

.tool-card-v2-text h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.tool-card-v2-text p {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ================================
   CTA Section
   ================================ */
.cta-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    padding: 5rem 1.5rem;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-container h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.cta-container p {
    font-size: 1.125rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* ================================
   Testimonials
   ================================ */
.testimonials-section {
    background: white;
}

.testimonials-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

.testimonial-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.testimonial-stars svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
}

.testimonial-text {
    font-size: 0.9375rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
}

.testimonial-author-info strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.testimonial-author-info span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ================================
   Mobile Navigation
   ================================ */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-nav-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--gray-700);
}

@media (max-width: 1024px) {
    .header-v2 .nav-links,
    .header-v2 .header-actions {
        display: none;
    }

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

.mobile-menu-v2 {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu-v2.active {
    transform: translateX(0);
}

.mobile-menu-v2 .nav-link {
    display: block !important;
    padding: 1rem;
    font-size: 1rem;
    color: var(--gray-700) !important;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-menu-v2 .header-actions {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.mobile-menu-v2 .btn {
    width: 100%;
    justify-content: center;
}
