/* ============================================
   ToolBox Tamil - Modern, Beautiful Styling
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #FF6B6B;
    --primary-dark: #FF5252;
    --secondary-color: #FF8E53;
    --accent-color: #FFA07A;
    --tamil-special: #FF4757;

    --bg-color: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;

    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;

    --border-color: #E1E8ED;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-tamil: 'Noto Sans Tamil', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Header
   ============================================ */

.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.logo-tagline {
    font-family: var(--font-tamil);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.language-switcher {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 2rem;
}

.lang-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 1.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF8F0 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 2rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feature-badge span:first-child {
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   Tools Section
   ============================================ */

.tools-section {
    padding: var(--spacing-xl) 0;
}

.category {
    margin-bottom: var(--spacing-xl);
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.tamil-section .category-title {
    border-bottom-color: var(--tamil-special);
    background: linear-gradient(135deg, var(--primary-color), var(--tamil-special));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.tool-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

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

.tool-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.tool-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tamil-special {
    border-left: 4px solid var(--tamil-special);
}

.tamil-special::before {
    background: linear-gradient(90deg, var(--tamil-special), var(--primary-color));
}

.tamil-special:hover {
    border-color: var(--tamil-special);
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.2);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: linear-gradient(135deg, #2D3436 0%, #2C3E50 100%);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-info {
    max-width: 400px;
}

.footer-info .logo-text h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.footer-info .logo-text p {
    font-family: var(--font-tamil);
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-tagline {
    margin-top: var(--spacing-sm);
    opacity: 0.8;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-xl);
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.privacy-note {
    color: var(--accent-color);
    font-weight: 500;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .hero-features {
        flex-direction: column;
        align-items: stretch;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .logo-text h1 {
        font-size: 1.25rem;
    }

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

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

/* ============================================
   Animations
   ============================================ */

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

.tool-card {
    animation: fadeIn 0.5s ease forwards;
}

.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; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   Utility Classes
   ============================================ */

.text-tamil {
    font-family: var(--font-tamil);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Advertisement Banners
   ============================================ */

.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-lg) 0;
    padding: 0 var(--spacing-sm);
}

.ad-banner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ad-banner:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Ad Placeholder (will be replaced with actual ads) */
.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed var(--border-color);
}

.ad-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Top Leaderboard - 728x90 */
.ad-top-leaderboard .ad-banner {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* After Hero - Large Leaderboard - 970x90 */
.ad-after-hero .ad-banner {
    width: 970px;
    height: 90px;
    max-width: 100%;
}

/* Mid Section - Medium Rectangle - 300x250 */
.ad-mid-section {
    margin: var(--spacing-xl) 0;
}

.ad-mid-section .ad-banner {
    width: 300px;
    height: 250px;
}

/* Before Footer - Leaderboard - 728x90 */
.ad-before-footer .ad-banner {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* Sidebar Ad (for tool pages) - 160x600 or 300x600 */
.ad-sidebar {
    position: sticky;
    top: 100px;
    margin: var(--spacing-md) 0;
}

.ad-sidebar .ad-banner {
    width: 160px;
    height: 600px;
}

/* Large Sidebar Ad */
.ad-sidebar-large .ad-banner {
    width: 300px;
    height: 600px;
}

/* Responsive Ad Styles */
@media (max-width: 1024px) {
    .ad-after-hero .ad-banner {
        width: 728px;
        height: 90px;
    }

    .ad-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .ad-container {
        margin: var(--spacing-md) 0;
    }

    /* Mobile - Show smaller ads */
    .ad-top-leaderboard .ad-banner,
    .ad-after-hero .ad-banner,
    .ad-before-footer .ad-banner {
        width: 320px;
        height: 100px;
    }

    .ad-mid-section .ad-banner {
        width: 300px;
        height: 250px;
    }

    .ad-sidebar .ad-banner,
    .ad-sidebar-large .ad-banner {
        width: 300px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .ad-top-leaderboard .ad-banner,
    .ad-after-hero .ad-banner,
    .ad-before-footer .ad-banner {
        width: 100%;
        max-width: 320px;
        height: 100px;
    }

    .ad-mid-section .ad-banner {
        width: 100%;
        max-width: 300px;
        height: 250px;
    }
}

/* Google AdSense Compatibility */
ins.adsbygoogle {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hide ad label when real ads are loaded */
.ad-banner.ad-loaded .ad-placeholder {
    display: none;
}
