/* ========================================
   CONVERTY PRO - COMPONENTS STYLESHEET
   Navigation, Cards, Forms, Footer
   ======================================== */

/* === DASHBOARD LAYOUT === */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-main);
}

/* Sidebar */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xxl);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--text-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: var(--spacing-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-link:hover {
    background: #fff;
    color: var(--accent-blue-deep);
}

.nav-link.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Pro Card */
.pro-card {
    background: #f8faff;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-xl);
    text-align: center;
}

/* Sidebar Bottom */
.sidebar-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-lg);
}

/* Main Area */
.main-content {
    padding: var(--spacing-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    scroll-behavior: smooth;
}

/* Right Panel */
.right-panel {
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    padding-bottom: 120px;
    /* Prevent content from being hidden at the bottom */
}

/* Mobile Navigation Header */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    padding: 0 var(--spacing-md);
    align-items: center;
    color: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}


.mobile-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: -0.5px;
}

@media (max-width: 1200px) {
    .mobile-nav {
        display: flex;
    }

    .dashboard-wrapper {
        padding-top: 60px;
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 60px;
        bottom: 0;
        width: 280px;
        z-index: 2100;
        height: calc(100vh - 60px);
        background: var(--bg-sidebar);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        transition: left var(--transition-base);
        display: flex;
        flex-direction: column;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.1);
    }

    .navbar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        color: var(--primary-gray);
        font-size: 1.4rem;
        cursor: pointer;
        transition: var(--transition-base);
    }

    .dashboard-header .navbar-toggle,
    .hero-content .navbar-toggle {
        display: none !important;
    }
}

.navbar-toggle {
    display: none;
}

/* === DASHBOARD ELEMENTS === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-greeting h1 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.user-greeting p {
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    min-height: 180px;
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #f8f8f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-up {
    color: #4caf50;
}

.trend-down {
    color: #f44336;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

/* Tool Cards Grid */
.tool-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.tool-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    border: 1px solid var(--border-color);
    will-change: transform;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue-deep);
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-main);
}

.tool-status {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-time {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-card-icon {
    font-size: 1.5rem;
    color: var(--accent-blue-deep);
}

.tool-card-info h3 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.tool-card-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Company Details Card */
.company-details-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Softer, widespread shadow */
    transition: all var(--transition-normal);
    /* margin-bottom: var(--spacing-xxl); */
    /* Add significant bottom margin */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    /* Prevent shrinking in flex container */
    min-height: min-content;
    /* Ensure it grows to fit content */
}

.company-details-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.company-details-card:hover {
    box-shadow: 0 10px 30px rgba(42, 42, 114, 0.1);
    transform: translateY(-2px);
}



.company-logo {
    width: 100%;
    height: 80px;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.company-logo img {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-info {
    text-align: center;
}

.company-info h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.company-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.contact-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 8px;
    transition: all var(--transition-fast);
}

.contact-pill:hover {
    background: white;
    border-color: var(--accent-blue-deep);
    color: var(--accent-blue-deep);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    border: 1px solid transparent;
}

.alert-info {
    background: rgba(42, 42, 114, 0.1);
    color: var(--accent-blue-deep);
    border-color: rgba(42, 42, 114, 0.2);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.2);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-color: rgba(244, 67, 54, 0.2);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    color: #ef6c00;
    border-color: rgba(255, 152, 0, 0.2);
}

/* Activity Feed */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.activity-item {
    display: flex;
    gap: 12px;
}

.activity-user {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* === TOOL PAGE LAYOUT === */
.tool-page {
    display: flex;
    min-height: calc(100vh - 70px);
}

.tool-sidebar {
    width: 280px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.tool-sidebar-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-blue);
}

.tool-list {
    list-style: none;
}

.tool-list-item {
    margin-bottom: var(--spacing-xs);
}

.tool-list-item button {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tool-list-item button:hover {
    background: var(--secondary-blue);
    color: white;
    border-color: var(--secondary-blue);
}

.tool-list-item button.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* Professional Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a2a72;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #2a2a72;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    /* Shown via JS */
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(42, 42, 114, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #3d3d99;
    box-shadow: 0 8px 25px rgba(42, 42, 114, 0.4);
}

@media (max-width: 1200px) {
    .back-to-top {
        right: 30px;
    }
}

/* Tool Grid on Category Pages */
.subtool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.subtool-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    text-align: center;
    align-items: center;
}

.subtool-item:hover {
    border-color: var(--accent-blue-deep);
    background: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(42, 42, 114, 0.08);
}

.subtool-item.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue-deep);
    box-shadow: 0 4px 15px rgba(42, 42, 114, 0.1);
}

.subtool-icon {
    width: 54px;
    height: 54px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue-deep);
    font-size: 1.4rem;
    transition: all var(--transition-fast);
}

.subtool-item:hover .subtool-icon {
    background: var(--accent-blue-deep);
    color: white;
    border-color: var(--accent-blue-deep);
}

.subtool-info h4 {
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.subtool-info p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* === TOOL PAGE LAYOUT === */
.tool-split-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    align-items: start;
}

@media (max-width: 992px) {
    .tool-split-layout {
        grid-template-columns: 1fr;
    }

    .tool-quick-tips {
        position: static;
        width: 100%;
        margin-top: var(--spacing-lg);
    }
}

.tool-main-work-area {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tool-quick-tips {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    position: sticky;
    top: var(--spacing-lg);
}

.tool-quick-tips h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.tool-quick-tips h3 i {
    color: var(--accent-orange);
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    line-height: 1.4;
}

.tips-list li i {
    color: var(--accent-blue-deep);
    margin-top: 3px;
    font-size: 0.75rem;
}

/* === FILE UPLOAD ZONE === */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    background: var(--bg-light);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--secondary-blue);
    background: rgba(42, 42, 114, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--secondary-blue);
    margin-bottom: var(--spacing-md);
}

.upload-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.file-input {
    display: none;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(42, 42, 114, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* === FOOTER === */
/* === CONTACT HERO CARD === */
.contact-hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: var(--spacing-xl);
}

.contact-hero-card {
    max-width: 800px;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    padding: 60px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    z-index: -1;
}

.contact-hero-content h2 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.contact-btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.btn-linkedin {
    background: #0077b5;
    color: white;
}

.btn-linkedin:hover {
    background: #005a8a;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 119, 181, 0.3);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

@media (max-width: 768px) {
    .contact-hero-card {
        padding: 40px 20px;
    }

    .contact-hero-content h2 {
        font-size: 2.2rem;
    }

    .contact-hero-content p {
        font-size: 1.1rem;
    }

    .btn-contact {
        width: 100%;
        justify-content: center;
    }
}

.footer {
    background: linear-gradient(135deg, var(--secondary-blue-dark) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    color: white;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-brand {
    font-weight: 600;
    color: white;
}

/* === SECTION === */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* === ALERT === */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

body.low-performance .contact-hero-card,
body.low-performance .tool-card,
body.low-performance .card {
    background: #ffffff !important;
    backdrop-filter: none !important;
    border: 1px solid #e2e8f0 !important;
}

body.low-performance .contact-hero-card::before,
body.low-performance .contact-hero-card::after {
    display: none !important;
}