/* Interactive Core Pages with UserFlow Experience
   Created for Saql Al Mawahib Schools by PUIUX
   May 2025
*/

.core-pages-interactive {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(36, 187, 189, 0.1) 100%);
}

.core-pages-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.core-pages-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

.core-pages-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 4px;
}

.core-pages-description {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

/* Category Navigation Tabs */
.pages-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-tab {
    background-color: #fff;
    border: 2px solid var(--light-gray);
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    min-width: 150px;
    text-align: center;
}

.category-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(36, 187, 189, 0.3);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(36, 187, 189, 0.3);
}

/* Pages Grid Layout */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Individual Page Card */
.page-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
    height: 380px; /* Reduced height after removing preview buttons */
}

.page-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.page-card:hover .page-icon {
    transform: scale(1.1) translateZ(20px);
}

.page-icon-container {
    padding: 2.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    background-color: rgba(36, 187, 189, 0.05);
    overflow: hidden;
}

.page-icon-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2324bbbd' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.page-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(36, 187, 189, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-content {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100% - 150px); /* Adjust to fill remaining space */
}

.page-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-description {
    color: var(--dark-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1; /* Let description fill the space */
}

/* Flow Lines - Userflow Visualization */
.flow-lines-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.flow-line {
    position: absolute;
    background-color: rgba(36, 187, 189, 0.1);
    z-index: 0;
}

.flow-line.horizontal {
    height: 2px;
    top: 50%;
}

.flow-line.vertical {
    width: 2px;
    left: 50%;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .pages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .pages-grid {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .pages-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .page-card {
        height: auto;
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .pages-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-tab {
        width: 100%;
        max-width: 250px;
    }
}