/* PG Tools Landing Page - Premium Modern Design */
/* Inspired by Apple, Notion, Linear, Arc browser */

/* === GLOBAL STYLES === */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* === HERO SECTION === */
.tools-hero {
    background: linear-gradient(135deg, 
        #A259FF 0%, 
        #8B5CF6 25%, 
        #7C3AED 50%, 
        #6366F1 75%, 
        #3B82F6 100%);
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0;
}

/* Smoother gradient transition overlay */
.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: subtleGlow 12s ease-in-out infinite;
    pointer-events: none;
}

/* Softer bottom fade */
.tools-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
    pointer-events: none;
}

@keyframes subtleGlow {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

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

.tools-title {
    font-size: 4rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.tools-subtitle {
    font-size: 1.3rem;
    color: #FFFFFF;
    font-weight: 400;
    line-height: 1.5;
    max-width: 560px;
    margin: 0 auto;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

/* === TOOLS GRID SECTION === */
.tools-grid-section {
    padding: 3rem 2rem 3rem;
    background: linear-gradient(to bottom, 
        rgba(139, 92, 246, 0.02) 0%, 
        rgba(99, 102, 241, 0.03) 50%,
        rgba(59, 130, 246, 0.02) 100%);
    min-height: auto;
}

.tools-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    align-items: stretch;
}

/* === TOOL CARDS === */
.tool-card {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    min-height: 240px;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUpCard 0.6s ease-out forwards;
}

@keyframes fadeUpCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }

/* Gradient accent overlay */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(127, 96, 255, 0.08) 0%, 
        rgba(76, 141, 255, 0.06) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Hover effects - subtle lift with soft glow */
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.8),
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(127, 96, 255, 0.2),
        0 0 32px rgba(127, 96, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
}

.tool-card:active {
    transform: translateY(-1px);
}

/* Featured Card (Video Generator) */
.tool-card-featured {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(127, 96, 255, 0.3);
}

.tool-card-featured::before {
    background: linear-gradient(135deg, 
        rgba(127, 96, 255, 0.12) 0%, 
        rgba(76, 141, 255, 0.08) 50%,
        rgba(74, 222, 128, 0.06) 100%);
    opacity: 1;
}

.tool-card-featured:hover {
    box-shadow: 
        0 0 0 1px rgba(127, 96, 255, 0.5),
        0 10px 32px rgba(0, 0, 0, 0.15),
        0 2px 12px rgba(127, 96, 255, 0.3),
        0 0 48px rgba(127, 96, 255, 0.2);
}

/* NEW Badge - Top Right with smooth pill style */
.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4ADE80;
    color: #FFFFFF;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 
        0 3px 10px rgba(74, 222, 128, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.15);
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.03);
        opacity: 0.9;
    }
}

/* === TOOL ICON === */
.tool-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tool-card:hover .tool-icon {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(127, 96, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3), 
        rgba(255, 255, 255, 0.2));
}

.tool-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: 
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15))
        contrast(1.1)
        saturate(1.15);
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon img {
    transform: scale(1.08);
    filter: 
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2))
        contrast(1.15)
        saturate(1.2);
}
/* === TOOL CONTENT === */
.tool-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    text-align: center;
}

.tool-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: #2D2D2D;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.3px;
}

.tool-description {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.5;
    font-weight: 400;
    text-shadow: none;
}

/* === TOOL BUTTON === */
.tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #7F60FF 0%, #4C8DFF 100%);
    color: #FFFFFF;
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
    box-shadow: 
        0 2px 8px rgba(127, 96, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    margin-top: auto;
}

.tool-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15), 
        rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover .tool-button {
    transform: scale(1.03);
    box-shadow: 
        0 4px 16px rgba(127, 96, 255, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.15);
}

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

/* Primary Button (Video Generator) */
.tool-button-primary {
    background: linear-gradient(135deg, #7F60FF 0%, #4C8DFF 100%);
    box-shadow: 
        0 3px 12px rgba(127, 96, 255, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.tool-button-primary::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.08));
}

.tool-card:hover .tool-button-primary {
    transform: scale(1.03);
    box-shadow: 
        0 4px 18px rgba(127, 96, 255, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.15);
}

/* === FOOTER === */
.tools-footer {
    background: transparent;
    padding: 28px 2rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-tagline {
    color: #6B7280;
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.instagram-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
    transition: all 0.3s ease;
}

.instagram-link:hover .instagram-icon {
    color: #ff66cc;
    filter: drop-shadow(0 0 8px rgba(255, 102, 204, 0.6));
    transform: scale(1.1);
}

.footer-copyright {
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.footer-links {
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.5;
}

.footer-links a {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #6A5ACD;
}

.footer-links .separator {
    color: #6B7280;
    font-weight: 300;
}

/* === RESPONSIVE DESIGN === */

/* Tablet and below */
@media (max-width: 768px) {
    .tools-hero {
        padding: 5rem 1.5rem 3.5rem;
    }
    
    .tools-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
    
    .tools-subtitle {
        font-size: 1.1rem;
    }
    
    .tools-grid-section {
        padding: 2.5rem 1.5rem 2.5rem;
    }
    
    .tools-footer {
        padding: 24px 1.5rem;
    }
    
    .footer-content {
        gap: 0.75rem;
    }
    
    .footer-tagline {
        font-size: 0.875rem;
    }
    
    .footer-links {
        font-size: 0.8125rem;
    }
    
    .tools-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
    }
    
    .tool-card {
        max-width: 100%;
        min-height: 220px;
        padding: 1.5rem 1.25rem;
    }
    
    .tool-icon {
        width: 56px;
        height: 56px;
    }
    
    .tool-icon img {
        width: 36px;
        height: 36px;
    }
    
    .tool-title {
        font-size: 1rem;
    }
    
    .tool-description {
        font-size: 0.85rem;
    }
    
    .tool-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .tools-footer-note {
        padding: 2.5rem 1.5rem 3rem;
    }
}

/* Mobile - Single column */
@media (max-width: 480px) {
    .tools-hero {
        padding: 4rem 1rem 3rem;
    }
    
    .tools-title {
        font-size: 2.2rem;
    }
    
    .tools-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid-section {
        padding: 2rem 1rem 2rem;
    }
    
    .tools-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 340px;
    }
    
    .tool-card {
        min-height: 240px;
    }
    
    .tools-footer {
        padding: 20px 1rem;
    }
    
    .footer-content {
        gap: 0.5rem;
    }
    
    .footer-tagline {
        font-size: 0.8125rem;
    }
    
    .instagram-icon {
        width: 18px;
        height: 18px;
    }
    
    .footer-copyright,
    .footer-links {
        font-size: 0.75rem;
    }
}

/* Desktop - Optimized grid */
@media (min-width: 769px) and (max-width: 1024px) {
    .tools-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }
}

@media (min-width: 1025px) {
    .tools-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === BASE STYLES & OPTIMIZATIONS === */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Performance optimization */
.tool-card {
    will-change: transform;
    contain: layout style paint;
}

.tool-card:hover {
    will-change: transform, box-shadow;
}

.tool-icon {
    will-change: transform;
}

/* === ACCESSIBILITY === */

/* Focus states */
.tool-card:focus-visible {
    outline: 2px solid rgba(162, 89, 255, 0.8);
    outline-offset: 4px;
    border-radius: 16px;
}

.tool-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tool-card {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
    
    .tool-button {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
}
