/* Facility Template Styles */

/* General template styles */
.facility-content {
    position: relative;
}

/* Template 1: Alternating Layout */
.template-alternating .facility-image {
    overflow: hidden;
    border-radius: 8px;
}

.template-alternating .facility-description {
    padding: 1rem;
}

/* Template 2: Gallery Layout */
.template-gallery .section-title {
    color: #007bff;
    font-weight: 600;
    position: relative;
}

.template-gallery .section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #007bff;
    margin: 10px auto;
}

.template-gallery .gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.template-gallery .gallery-text {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.template-gallery .gallery-text-border-left {
    border-left: 4px solid #007bff;
    margin-right: 2rem;
}

.template-gallery .gallery-text-border-right {
    border-right: 4px solid #007bff;
    margin-left: 2rem;
}

.template-gallery .gallery-text:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.15);
}

.template-gallery .gallery-text-border-right:hover {
    transform: translateX(-5px);
}

/* Template 3: Card Layout */
.template-cards .card {
    border: none;
    transition: all 0.3s ease;
}

.template-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.template-cards .card-img-top {
    transition: transform 0.3s ease;
}

.template-cards .card:hover .card-img-top {
    transform: scale(1.05);
}

/* Template 4: Hero Layout */
.template-hero .hero-section {
    margin-bottom: 3rem;
}

.template-hero .hero-overlay {
    backdrop-filter: blur(1px);
}

.template-hero .hero-content {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Template 5: Timeline Layout */
.template-timeline .timeline-container {
    padding: 2rem 0;
}

.template-timeline .timeline-item {
    animation: fadeInSlide 0.6s ease forwards;
    opacity: 0;
    min-height: 250px;
    align-items: stretch;
}

.template-timeline .timeline-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.template-timeline .timeline-item:nth-child(even) {
    animation-delay: 0.2s;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-timeline .timeline-content {
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
}

.template-timeline .timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.template-timeline .timeline-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.template-timeline .timeline-dot {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10;
    box-shadow: 0 0 0 4px white, 0 0 0 6px #007bff;
}

/* Ensure equal heights for timeline items */
.template-timeline .row {
    display: flex;
    align-items: stretch;
}

.template-timeline .col-md-5 {
    display: flex;
    flex-direction: column;
}

/* Template 6: Tabs Layout */
.template-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.template-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0;
    background: none;
}

.template-tabs .nav-link:hover {
    color: #007bff;
    background: rgba(0,123,255,0.05);
}

.template-tabs .nav-link.active {
    color: #007bff;
    background: rgba(0,123,255,0.1);
}

.template-tabs .tab-content {
    padding: 2rem 0;
}

.template-tabs .tab-pane {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .template-timeline .timeline-line {
        left: 30px !important;
    }
    
    .template-timeline .timeline-dot {
        left: 30px !important;
        top: 20px !important;
        transform: translateX(-50%) !important;
    }
    
    .template-timeline .timeline-item {
        min-height: auto;
    }
    
    .template-timeline .timeline-item .col-md-5 {
        margin-left: 60px;
        margin-bottom: 15px;
    }
    
    .template-timeline .timeline-item .col-md-2 {
        display: none;
    }
    
    .template-hero .hero-content {
        padding: 1.5rem !important;
    }
    
    .template-hero .display-5 {
        font-size: 1.75rem !important;
    }
    
    .template-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Loading animation for dynamic content */
.template-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.template-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
