/* ==========================================
   VARIABLES & RESET
========================================== */
:root {
    --primary-color: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --secondary-color: #f97316;
    --secondary-light: #fb923c;
    --dark-color: #1f2937;
    --gray-color: #6b7280;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    /*font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;*/
    font-family: "Poppins", sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: visible;
}

/* ==========================================
   TYPOGRAPHY
========================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   HEADER
========================================== */
/* ==========================================
   HEADER
========================================== */
.owt-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

/* Nav Link Styling */
.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-color) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active,
.navbar-nav .show>.nav-link {
    color: var(--primary-color) !important;
    background: rgba(37, 99, 235, 0.05);
}

/* Dropdown Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 10px !important;
    /* Slight spacing for safe hover */
    display: none;
    /* Ensure hidden by default */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Mega Menu Grid Styling */
.dropdown-menu.mega-menu-grid {
    display: none;
    /* Force hidden initially */
}

.dropdown-menu.mega-menu-grid.show {
    display: grid !important;
    /* Force grid layout when shown */
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* Specific styling: Image Tools */
.dropdown-menu.mega-menu-image.show {
    min-width: 400px;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    /* Reset transform to handle custom positioning */
    margin-top: 10px !important;
}

/* Specific styling: SEO Tools */
.dropdown-menu.mega-menu-seo.show {
    min-width: 600px;
    /* Wider for "proper" mega menu feel */
    left: auto !important;
    right: 0 !important;
    /* Anchor to right */
    transform: none !important;
    /* Reset transform */
    margin-top: 10px !important;
}

/* Hover Bridge */
.nav-item.dropdown .dropdown-menu {
    margin-top: 0.25rem !important;
}

/* Remove animation keyframes if transitioning via standard properties */
/* Keeping slide for non-mega if desired, but transition is cleaner */
/* The animation keyframes are removed as transitions are now used */
/* @keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

.dropdown-item {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--gray-color);
    transition: var(--transition);
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    color: var(--primary-color);
    transform: translateX(3px);
}

.dropdown-item:active {
    background: var(--primary-color);
    color: white;
}

/* Toggle */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f3f4f6;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ==========================================
   HERO SECTION
========================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
    padding: 100px 0 120px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-badge .badge {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    line-height: 1.8;
}

.hero-stats {
    margin-top: 3rem;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-color);
    margin-top: 0.25rem;
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider path {
    fill: var(--white);
}

/* ==========================================
   TOOLS SECTION
========================================== */
.tools-section {
    background: var(--white);
    padding: 80px 0;
}

.tool-card {
    height: 100%;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid #f3f4f6;
    position: relative;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-inner {
    padding: 2rem;
}

.tool-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.tool-icon-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-radius: 20px;
    transform: rotate(45deg);
}

.tool-icon {
    position: relative;
    font-size: 2.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tool-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    text-align: center;
}

.tool-description {
    font-size: 0.938rem;
    color: var(--gray-color);
    text-align: center;
    margin-bottom: 1.25rem;
    min-height: 48px;
}

.tool-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.tool-features li {
    font-size: 0.875rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features i {
    color: var(--primary-color);
    font-size: 1rem;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.938rem;
    transition: var(--transition);
}

.tool-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateX(4px);
}

.tool-btn i {
    transition: var(--transition);
}

.tool-btn:hover i {
    transform: translateX(4px);
}

/* ==========================================
   FEATURES SECTION
========================================== */
.features-section {
    background: var(--light-bg);
    padding: 80px 0;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    height: 100%;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-text {
    font-size: 0.938rem;
    color: var(--gray-color);
    line-height: 1.7;
    margin: 0;
}

/* ==========================================
   CTA SECTION
========================================== */
.cta-section {
    padding: 80px 0;
    background: var(--white);
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cta-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.btn-light {
    background: var(--white);
    color: var(--primary-color);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
}

.btn-light:hover {
    background: var(--light-bg);
    color: var(--primary-dark);
    transform: scale(1.05);
}

/* ==========================================
   FOOTER
========================================== */
.owt-footer {
    background: var(--dark-color);
    padding: 2rem 0;
}

.owt-footer h5 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .tools-section {
        padding: 60px 0;
    }

    .features-section {
        padding: 60px 0;
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-card {
        padding: 2rem;
        text-align: center;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .btn-light {
        margin-top: 1rem;
    }
}

/* ==========================================
   UTILITIES
========================================== */
.bg-primary-soft {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
















/* ==========================================
   TOOL PAGE STYLES
========================================== */

/* Tool Header */
.tool-header {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
}

.tool-breadcrumb a {
    text-decoration: none;
    transition: var(--transition);
}

.tool-breadcrumb a:hover {
    color: var(--primary-color) !important;
}

.tool-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.tool-page-description {
    font-size: 1.125rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Area */
.upload-area {
    margin-bottom: 2rem;
}

.upload-area-inner {
    border: 3px dashed #d1d5db;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--white);
    transition: var(--transition);
    cursor: pointer;
}

.upload-area-inner:hover,
.upload-area-inner.drag-over {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.upload-subtitle {
    font-size: 1rem;
    color: var(--gray-color);
    margin-bottom: 0;
}

.upload-note {
    font-size: 0.875rem;
    color: var(--gray-color);
    margin: 0;
}

/* Compression Controls */
.compression-controls {
    margin-bottom: 2rem;
}

.setting-group {
    border-bottom: 1px solid #f3f4f6;
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0;
}

.quality-value {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.form-range {
    height: 8px;
}

.form-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
}

.btn-check:checked+.btn-outline-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading State */
.loading-state {
    margin-bottom: 2rem;
}

/* Comparison Area */
.comparison-area {
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    margin: 0;
}

.image-preview-box {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
}

.image-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1;
}

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

/* Feature Steps */
.feature-step {
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.feature-step h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* FAQ */
.accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.accordion-button {
    font-weight: 600;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}


.accordion-button:focus {
    box-shadow: none;
    border-color: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-page-title {
        font-size: 2rem;
    }

    .upload-area-inner {
        padding: 3rem 1.5rem;
    }

    .upload-icon {
        font-size: 3rem;
    }
}



/* ==========================================
   CROP IMAGE TOOL STYLES
========================================== */

/* Crop Container */
.crop-container {
    position: relative;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#cropCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Crop Box */
.crop-box {
    position: absolute;
    border: 2px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
}

.crop-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

/* Crop Handles */
.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10;
}

.crop-handle-nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-handle-n {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.crop-handle-s {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.crop-handle-e {
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.crop-handle-w {
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.crop-handle:hover {
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

/* Ratio Buttons */
.ratio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ratio-btn {
    flex: 1 0 calc(33.333% - 0.5rem);
    min-width: 60px;
    font-size: 0.875rem;
}

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

/* Cropped Preview */
.cropped-preview-box {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    padding: 1rem;
}

.cropped-preview-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Download Options */
.download-options {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

/* How Steps */
.how-step {
    text-align: center;
    padding: 1.5rem;
}

.how-step .step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.how-step h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Form Controls */
.setting-group {
    padding-bottom: 1rem;
}

.setting-group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* Responsive */
@media (max-width: 992px) {

    .crop-editor .col-lg-8,
    .crop-editor .col-lg-4 {
        width: 100%;
    }

    .crop-container {
        min-height: 300px;
    }

    .ratio-btn {
        flex: 1 0 calc(50% - 0.5rem);
    }
}

@media (max-width: 576px) {
    .crop-box {
        border-width: 1px;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
    }

    .crop-handle-nw {
        top: -8px;
        left: -8px;
    }

    .crop-handle-ne {
        top: -8px;
        right: -8px;
    }

    .crop-handle-sw {
        bottom: -8px;
        left: -8px;
    }

    .crop-handle-se {
        bottom: -8px;
        right: -8px;
    }

    .crop-handle-n {
        top: -8px;
    }

    .crop-handle-s {
        bottom: -8px;
    }

    .crop-handle-e {
        right: -8px;
    }

    .crop-handle-w {
        left: -8px;
    }
}




/* new testing auto deploy */