/* Site Layout - Sticky Footer */
.site {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding-top: 76px; /* Account for fixed navbar */
    padding-bottom: clamp(24px, 3vw, 56px); /* Default spacing for tools/results */
}

.site-footer {
    margin-top: clamp(24px, 2vw, 48px); /* Default spacing for tools/results */
    flex-shrink: 0;
}

/* Tighter spacing only on the home page */
.is-home .site-main {
    padding-bottom: 0; /* Zero space before footer on home */
}

.is-home .site-footer {
    margin-top: 0; /* Zero space before footer on home */
}

/* Premium Tools Section Styling */
.premium-tools-section {
    position: relative;
    overflow: hidden;
}

.premium-tools-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.03) 0%, 
        rgba(139, 92, 246, 0.03) 50%, 
        rgba(37, 99, 235, 0.03) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Section Container - Perfect Centering */
.premium-tools-section .container {
    position: relative;
    z-index: 1;
    max-width: 1200px; /* Consistent max width */
    margin: 0 auto;
    padding: 0 1rem; /* Equal side padding */
}

/* Section Headings - Aligned with Grid Center */
.premium-tools-section .row.justify-content-center {
    margin-left: 0;
    margin-right: 0;
}

.premium-tools-section .col-lg-8 {
    padding-left: 0;
    padding-right: 0;
}

.premium-tools-section h2 {
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.premium-tools-section .lead {
    margin-bottom: 3rem;
    line-height: 1.6;
    text-align: center;
}

/* Premium Tools Grid - Perfect Centering */
.premium-tools-grid {
    gap: 2rem !important;
    justify-content: center; /* Center the grid */
}

/* Ensure last row is centered when it has fewer cards */
.premium-tools-grid .row {
    justify-content: center;
}

/* Add gap to the centered grid */
.premium-tools-grid.justify-content-center {
    gap: 2rem !important;
}

/* Premium Tool Cards - Stable Layout */
.premium-tool-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(37, 99, 235, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0; /* Remove any residual margins */
}

.premium-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.premium-tool-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.3), 
        rgba(139, 92, 246, 0.3), 
        rgba(37, 99, 235, 0.3));
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.premium-tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(37, 99, 235, 0.2);
}

.premium-tool-card:hover::before {
    opacity: 1;
}

.premium-tool-card:hover::after {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Premium Tool Links - Normal Flow Layout */
.premium-tool-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

.premium-tool-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Premium Tool Icons - Fixed Size */
.premium-tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.9), 
        rgba(139, 92, 246, 0.9));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    box-shadow: 
        0 8px 24px rgba(37, 99, 235, 0.3),
        0 4px 12px rgba(139, 92, 246, 0.2);
    position: relative;
    flex-shrink: 0;
}

.premium-tool-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.5), 
        rgba(139, 92, 246, 0.5));
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.premium-tool-card:hover .premium-tool-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 12px 32px rgba(37, 99, 235, 0.4),
        0 6px 16px rgba(139, 92, 246, 0.3);
}

.premium-tool-card:hover .premium-tool-icon::before {
    opacity: 1;
}

.premium-tool-icon i {
    font-size: 2rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Premium Tool Categories - Fixed Height */
.premium-tool-category {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1), 
        rgba(139, 92, 246, 0.1));
    color: rgba(37, 99, 235, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    height: 2rem;
    line-height: 1;
}

.premium-tool-card:hover .premium-tool-category {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.2), 
        rgba(139, 92, 246, 0.2));
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

/* Premium Tool Titles - Natural Height */
.premium-tool-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
    line-height: 1.3;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.premium-tool-card:hover .premium-tool-title {
    color: #1e293b;
}

/* Premium Tool Descriptions - Flexible Height */
.premium-tool-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

/* Premium Tool CTA - Pinned to Bottom */
.premium-tool-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1), 
        rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    margin-top: auto;
    flex-shrink: 0;
    height: 3.5rem;
}

.premium-tool-card:hover .premium-tool-cta {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.2), 
        rgba(139, 92, 246, 0.2));
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.premium-cta-text {
    font-weight: 600;
    color: rgba(37, 99, 235, 0.9);
    font-size: 0.9rem;
}

.premium-cta-icon {
    color: rgba(37, 99, 235, 0.7);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.premium-tool-card:hover .premium-cta-icon {
    color: rgba(37, 99, 235, 1);
    transform: translateX(4px);
}

/* Premium CTA Button */
.premium-cta-btn {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.9), 
        rgba(139, 92, 246, 0.9));
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-weight: 600;
    box-shadow: 
        0 8px 24px rgba(37, 99, 235, 0.3),
        0 4px 12px rgba(139, 92, 246, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.premium-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.premium-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(37, 99, 235, 0.4),
        0 6px 16px rgba(139, 92, 246, 0.3);
}

.premium-cta-btn:hover::before {
    left: 100%;
}

/* Responsive Design - Maintain Natural Heights */
@media (max-width: 768px) {
    .premium-tools-section .container {
        padding: 0 0.75rem;
    }
    
    .premium-tool-card {
        border-radius: 16px;
    }
    
    .premium-tool-link {
        padding: 1.5rem;
    }
    
    .premium-tool-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }
    
    .premium-tool-icon i {
        font-size: 1.5rem;
    }
    
    .premium-tool-title {
        font-size: 1.25rem;
    }
    
    .premium-tool-description {
        font-size: 0.9rem;
    }
    
    .premium-tool-category {
        height: 1.75rem;
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
    }
    
    .premium-tool-cta {
        height: 3rem;
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 576px) {
    .premium-tools-section .container {
        padding: 0 0.5rem;
    }
    
    .premium-tool-link {
        padding: 1.25rem;
    }
    
    .premium-tool-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    
    .premium-tool-icon i {
        font-size: 1.25rem;
    }
    
    .premium-tool-title {
        font-size: 1.1rem;
    }
    
    .premium-tool-description {
        font-size: 0.85rem;
    }
    
    .premium-tool-category {
        height: 1.5rem;
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .premium-tool-cta {
        height: 2.75rem;
        padding: 0.625rem 1rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top:hover,
.back-to-top:focus {
    background: rgba(37, 99, 235, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top:focus {
    outline: 2px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
    
    .back-to-top:hover,
    .back-to-top:focus {
        transform: none;
    }
    
    .premium-tool-card {
        transition: none;
    }
    
    .premium-tool-card:hover {
        transform: none;
    }
    
    .premium-tool-icon {
        transition: none;
    }
    
    .premium-tool-card:hover .premium-tool-icon {
        transform: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .site-main {
        padding-top: 66px; /* Slightly less padding for mobile navbar */
        padding-bottom: clamp(20px, 2.5vw, 40px); /* Adjusted for mobile */
    }
    
    .site-footer {
        margin-top: clamp(20px, 1.5vw, 32px); /* Adjusted for mobile */
    }
    
    /* Tighter spacing for home page on mobile */
    .is-home .site-main {
        padding-bottom: 0;
    }
    
    .is-home .site-footer {
        margin-top: 0;
    }
    
    .back-to-top {
        width: 44px;
        height: 44px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 480px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .back-to-top svg {
        width: 16px;
        height: 16px;
    }
}

/* Handle edge cases for very short content */
@media (max-height: 600px) {
    .site-main {
        min-height: calc(100vh - 76px - 200px); /* Account for navbar and footer */
    }
} 

/* Guest Layout Specific Styles */
.guest-body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.guest-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 200px);
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: #667eea;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #667eea !important;
}

.nav-link.active {
    color: #667eea !important;
    font-weight: 600;
}

/* Footer Styles */
.footer {
    background: #343a40 !important;
    color: #ffffff !important;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border-color: #6b7280;
}

.btn-outline-secondary:hover {
    background: #6b7280;
    color: white;
}

.btn-outline-warning {
    background: transparent;
    color: #d97706;
    border-color: #d97706;
}

.btn-outline-warning:hover {
    background: #d97706;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.is-invalid {
    border-color: #ef4444;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.bg-success {
    background: #10b981 !important;
    color: white !important;
}

.bg-warning {
    background: #f59e0b !important;
    color: white !important;
}

.bg-secondary {
    background: #6b7280 !important;
    color: white !important;
}

.bg-danger {
    background: #ef4444 !important;
    color: white !important;
}

/* Utility Classes */
.text-success {
    color: #059669 !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.text-muted {
    color: #6b7280 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guest-main {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    display: none;
    margin-left: 0.5rem;
}

/* Focus States for Accessibility */
.btn:focus,
.form-input:focus,
.nav-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top {
        display: none !important;
    }
    
    .guest-main {
        background: white !important;
        color: black !important;
    }
} 