/**
 * Tile Component Styles
 * 
 * Reusable tile components for linking to tools and features.
 * Tiles use the client's primaryColor for background styling.
 * Designed for use on Research Tools and VIP Benefits pages.
 */

/* Grid container for responsive tile layout */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px 0;
}

/* Page header styling for tile pages (Research Tools, Benefits) - no top margin */
.tile-page-header {
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
}

.tile-page-header h1 {
    margin-top: 0;
    margin-bottom: 0;
}

.tile-page-header h1 small {
    display: block;
    margin-top: 8px;
}

/* Tile page layout - full-bleed background with centered content */
.tile-page {
    background: linear-gradient(160deg, #f0f2f5 0%, #e8ecf1 40%, #f5f3f0 100%);
    padding: 40px 24px;
    margin: 0 -15px; /* bleed past container-fluid padding */
}

.tile-page-inner {
    max-width: 880px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .tile-page {
        padding: 24px 16px;
    }
}

/* Individual tile styling - designed to look like prominent feature cards */
.tile {
    display: flex;
    align-items: center;
    padding: 24px 28px;
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;

    /* Prominent shadow for card-like depth */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Gradient overlay for depth */
.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.08) 100%);
    border-radius: 12px;
    pointer-events: none;
}

/* Animated shine sweep */
.tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    pointer-events: none;
    animation: tileShine 6s ease-in-out infinite;
}

@keyframes tileShine {
    0% { left: -100%; }
    40% { left: 100%; }
    100% { left: 100%; }
}

/* Ensure tile content sits above the overlays */
.tile-icon,
.tile-content {
    position: relative;
    z-index: 1;
}

/* Hover and focus states - subtle lift effect */
.tile:hover,
.tile:focus {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.tile:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Tile icon container - prominent icon box */
.tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-right: 20px;
    flex-shrink: 0;
    /* Subtle background to make icon stand out */
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
}

/* Icon styling - Font Awesome icons */
.tile-icon i {
    font-size: 26px;
    line-height: 1;
}

/* Tile text container - holds title and subtitle */
.tile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

/* Tile title - prominent and bold */
.tile-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

/* Tile subtitle - smaller descriptive text */
.tile-subtitle {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

/* Responsive breakpoints */

/* Extra large screens (1200px+): slightly larger */
@media (min-width: 1200px) {
    .tile-grid {
        gap: 24px;
    }
    
    .tile {
        padding: 28px 32px;
    }
    
    .tile-icon {
        width: 64px;
        height: 64px;
        margin-right: 24px;
        border-radius: 14px;
    }
    
    .tile-icon i {
        font-size: 30px;
    }
    
    .tile-title {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .tile-subtitle {
        font-size: 14px;
    }
}

/* Medium screens (768px - 991px): 2 columns, slightly compact */
@media (min-width: 768px) and (max-width: 991px) {
    .tile-grid {
        gap: 16px;
    }
    
    .tile {
        padding: 22px 24px;
    }
    
    .tile-icon {
        width: 52px;
        height: 52px;
        margin-right: 18px;
    }
    
    .tile-icon i {
        font-size: 24px;
    }
    
    .tile-title {
        font-size: 16px;
    }
    
    .tile-subtitle {
        font-size: 12px;
    }
}

/* Small screens (below 768px): single column */
@media (max-width: 767px) {
    .tile-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .tile {
        padding: 20px 24px;
    }
    
    .tile-icon {
        width: 52px;
        height: 52px;
        margin-right: 18px;
    }
    
    .tile-icon i {
        font-size: 24px;
    }
    
    .tile-title {
        font-size: 16px;
    }
    
    .tile-subtitle {
        font-size: 13px;
    }
}

/* Extra small screens (below 480px): more compact */
@media (max-width: 479px) {
    .tile-grid {
        gap: 12px;
        padding: 16px 0;
    }
    
    .tile {
        padding: 18px 20px;
        border-radius: 10px;
    }
    
    .tile-icon {
        width: 48px;
        height: 48px;
        margin-right: 16px;
        border-radius: 10px;
    }
    
    .tile-icon i {
        font-size: 22px;
    }
    
    .tile-title {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .tile-subtitle {
        font-size: 12px;
    }
}
