/* ========================================
   IBERAY.COM - AI Tools Directory
   Modern, Clean, Conversion-Optimized Design
======================================== */

:root {
    --primary: #4A90E2;
    --primary-dark: #357ABD;
    --secondary: #10B981;
    --accent: #F59E0B;
    --dark: #1F2937;
    --gray: #6B7280;
    --light-gray: #F3F4F6;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

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

.logo-dot {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    transition: 0.3s;
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 3rem;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========== BUTTONS ========== */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--light-gray);
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-cta {
    background: var(--secondary);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
}

.btn-cta:hover {
    background: #059669;
}

/* ========== SECTIONS ========== */
.featured-section,
.categories-section,
.comparisons-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ========== TOOL CARDS ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: 0.3s;
    position: relative;
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tool-badge.best-value {
    background: var(--secondary);
}

.tool-badge.trending {
    background: #EF4444;
}

.tool-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.tool-name {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.tool-rating {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stars {
    color: #F59E0B;
    font-size: 1rem;
}

.rating-score {
    color: var(--gray);
    font-size: 0.9rem;
}

.tool-description {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--light-gray);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark);
}

.tool-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-pricing {
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ========== CATEGORIES ========== */
.categories-section {
    background: var(--light-gray);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: 0.3s;
    border: 2px solid transparent;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.category-desc {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.category-count {
    display: inline-block;
    background: var(--light-gray);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* ========== COMPARISONS ========== */
.comparisons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.comparison-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.comparison-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.comparison-vs {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.vs-divider {
    color: var(--gray);
    font-weight: 400;
}

.comparison-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.comparison-desc {
    color: var(--gray);
    font-size: 0.9rem;
}

.comparison-arrow {
    font-size: 1.5rem;
    color: var(--primary);
}

/* ========== NEWSLETTER ========== */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.newsletter-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto 1rem;
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-btn {
    padding: 1rem 2rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-btn:hover {
    background: #059669;
}

.newsletter-privacy {
    font-size: 0.85rem;
    opacity: 0.85;
}

.newsletter-privacy a {
    color: var(--white);
    text-decoration: underline;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark);
    color: #D1D5DB;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-desc {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-social a {
    text-decoration: none;
    transition: 0.3s;
}

.footer-social a:hover {
    transform: scale(1.2);
}

.footer-heading {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #D1D5DB;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

    .hero-search {
        flex-direction: column;
    }

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

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

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

    .comparison-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .hero-stats {
        gap: 1.5rem;
    }

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