/**
 * Internship Grid Shortcode CSS
 * Responsive grid layout for displaying internships
 * 
 * @package Airugby
 * @since 1.1.8.9
 */

/* ==========================================================================
   GRID LAYOUT
   ========================================================================== */

.airugby-internship-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

/* Grid column layouts */
.airugby-grid-cols-1 { grid-template-columns: 1fr; }
.airugby-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.airugby-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.airugby-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.airugby-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.airugby-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */

.airugby-internship-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.airugby-internship-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.airugby-internship-card:nth-child(n+2) { animation-delay: 0.1s; }
.airugby-internship-card:nth-child(n+3) { animation-delay: 0.2s; }
.airugby-internship-card:nth-child(n+4) { animation-delay: 0.3s; }
.airugby-internship-card:nth-child(n+5) { animation-delay: 0.4s; }
.airugby-internship-card:nth-child(n+6) { animation-delay: 0.5s; }

/* ==========================================================================
   IMAGE COMPONENTS
   ========================================================================== */

.airugby-internship-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #6aea66 0%, #51a24b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Default: Square aspect ratio for circular mask */
.airugby-internship-image.circular-mask {
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
}

/* 16:9 aspect ratio for rectangular display */
.airugby-internship-image.aspect-16-9 {
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio (9/16 * 100) */
}

/* Circular mask overlay - only for circular-mask class */
.airugby-internship-image.circular-mask::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    z-index: 1;
}

.airugby-internship-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Circular thumbnail for circular mask */
.circular-mask .airugby-internship-thumb {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

/* Rectangular thumbnail for 16:9 aspect */
.aspect-16-9 .airugby-internship-thumb {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

.airugby-internship-thumb.airugby-placeholder {
    opacity: 0.7;
    filter: grayscale(20%);
}

.airugby-internship-thumb.airugby-site-logo {
    object-fit: contain;
    padding: 10%;
    background: rgba(255, 255, 255, 0.9);
}

/* Video Container Styles */
.airugby-video-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Circular video container for circular mask */
.circular-mask .airugby-video-container {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

/* Rectangular video container for 16:9 aspect */
.aspect-16-9 .airugby-video-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

.airugby-video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: auto;
}

/* Circular video iframe - needs oversizing to fill circular container */
.circular-mask .airugby-video-container iframe {
    width: 200% !important;
    height: 200% !important;
}

/* Rectangular video iframe - normal sizing */
.aspect-16-9 .airugby-video-container iframe {
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    transform: none;
}

/* ==========================================================================
   CONTENT COMPONENTS  
   ========================================================================== */

.airugby-internship-content {
    padding: 1.5rem;
    text-align: center;
}

.airugby-internship-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.airugby-internship-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.airugby-internship-title a:hover {
    color: #667eea;
}

.airugby-internship-dates,
.airugby-internship-location,
.airugby-internship-price {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.airugby-internship-description {
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
    text-align: center;
    font-style: italic;
}

.airugby-internship-meta {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* ==========================================================================
   META COMPONENTS
   ========================================================================== */

.airugby-meta-gender {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.airugby-meta-gender-male {
    background: rgba(34, 113, 177, 0.1);
    color: #2271b1;
}

.airugby-meta-gender-female {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
}

.airugby-meta-gender-mixed {
    background: rgba(0, 163, 42, 0.1);
    color: #00a32a;
}

.airugby-meta-participants {
    font-weight: 500;
}

/* ==========================================================================
   ICONS
   ========================================================================== */

.airugby-icon-calendar::before { content: '📅'; margin-right: 0.25rem; }
.airugby-icon-location::before { content: '📍'; margin-right: 0.25rem; }


/* ==========================================================================
   UTILITY COMPONENTS
   ========================================================================== */

.airugby-no-internships {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin: 3rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .airugby-grid-cols-4,
    .airugby-grid-cols-5,
    .airugby-grid-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .airugby-internship-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .airugby-grid-cols-3,
    .airugby-grid-cols-4,
    .airugby-grid-cols-5,
    .airugby-grid-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .airugby-internship-grid {
        gap: 1rem;
    }
    
    .airugby-internship-content {
        padding: 1rem;
    }
    
    .airugby-internship-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .airugby-grid-cols-2,
    .airugby-grid-cols-3,
    .airugby-grid-cols-4,
    .airugby-grid-cols-5,
    .airugby-grid-cols-6 {
        grid-template-columns: 1fr;
    }
    
    .airugby-internship-grid {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .airugby-internship-card {
        border-radius: 8px;
    }
    
    .airugby-internship-content {
        padding: 1rem;
    }
    
    .airugby-internship-dates,
    .airugby-internship-location,
    .airugby-internship-price {
        font-size: 0.85rem;
    }
}

.airugby-internship-card:hover .airugby-internship-image[data-has-video="true"]::after {
    opacity: 1;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.airugby-internship-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.airugby-internship-title a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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