/* Main Styles for IndiaLinks Directory Website */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --light: #f3f4f6;
    --dark: #1f2937;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #ffffff;
    --text: #374151;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow);
}

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

/* Search Styles */
.search-container {
    margin: 20px auto;
    text-align: center;
    position: relative;
}

.search-box {
    width: 70%;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    background-color: var(--background);
    color: var(--text);
    box-shadow: 0 2px 10px var(--shadow);
}

.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon {
    position: absolute;
    right: 16%;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Site Description Styles */
.site-description {
    text-align: center;
    margin: 30px auto;
    max-width: 800px;
    padding: 30px;
    background-color: var(--background);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
}

.site-description h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Category Styles */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category {
    background-color: var(--background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-header {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.category-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.category:hover .category-content {
    max-height: 800px;
}

/* Service Item Styles */
.service-item {
    text-align: center;
    padding: 15px 10px;
    border-radius: 12px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.service-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.service-item:hover .service-logo {
    transform: scale(1.1);
}

.service-name {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

/* See More Button Styles */
.see-more {
    text-align: center;
    padding: 15px;
    background-color: var(--light);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-top: 1px solid var(--border);
}

.see-more:hover {
    background-color: var(--primary);
    color: white;
}

/* Category Page Styles */
.category-page {
    display: none;
    padding: 30px;
    background-color: var(--background);
    border-radius: 16px;
    margin-top: 30px;
    box-shadow: 0 4px 20px var(--shadow);
}

.category-page.active {
    display: block;
}

.category-page-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 20px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: var(--primary-dark);
}

.category-page-title {
    font-size: 24px;
    color: var(--primary);
}

.category-page-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

/* Footer Styles */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 70px;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-item {
    animation: fadeIn 0.3s ease forwards;
}

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
.service-item:nth-child(4) { animation-delay: 0.4s; }
.service-item:nth-child(5) { animation-delay: 0.5s; }
.service-item:nth-child(6) { animation-delay: 0.6s; }
.service-item:nth-child(7) { animation-delay: 0.7s; }
.service-item:nth-child(8) { animation-delay: 0.8s; }

/* Responsive Styles */
@media (max-width: 768px) {
    .search-box {
        width: 90%;
    }
    
    .search-icon {
        right: 10%;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .category-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-page-content {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .category-content {
        grid-template-columns: 1fr;
    }
    
    .category-page-content {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
