/* Facility Section Styles */
/* ======================== */

/* Import design tokens */
@import url('design-tokens.css');

/* Scroll Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container override for facility pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Facility main container */
main .container {
    padding: 0 2rem;
}

/* Hero Section */
.facility-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.facility-hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.facility-hero-video video,
.facility-hero-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.youtube-hero-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    min-width: 200%;
    min-height: 200%;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: none;
}

.facility-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.facility-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.facility-hero-text {
    margin-bottom: 2rem;
}

.facility-hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.facility-hero-description {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.facility-hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-smooth);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(199, 5, 50, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(199, 5, 50, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary-outlined {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary-outlined:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Our Services Section */
.our-services {
    padding: 4rem 0;
    background-color: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Service Card */
.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
    opacity: 0;
    transform: translateY(50px);
    text-decoration: none;
    color: inherit;
}

.service-card.animate-in {
    animation: fadeInUp 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(199, 5, 50, 0.2);
    border-color: var(--color-primary);
}

.service-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #F3F4F6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    transition: transform 0.5s ease;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-image {
    transform: scale(1.05);
}

.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    z-index: 1;
}

.service-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content h3 {
    font-size: 1.4rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-card-content p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-smooth);
    align-self: flex-start;
    font-size: 0.95rem;
}

.service-button:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(199, 5, 50, 0.3);
}

/* Featured Projects Section */
.featured-projects {
    padding: 4rem 0;
    background-color: #F9FAFB;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #E5E7EB;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.project-link:hover {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-category {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* System Videos Section */
.system-videos {
    padding: 4rem 0;
    background-color: var(--color-bg);
}

.videos-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.videos-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-video {
    width: 100%;
    height: 100%;
    display: block;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }

    .carousel-prev {
        left: 0.75rem;
    }

    .carousel-next {
        right: 0.75rem;
    }

    .carousel-indicators {
        bottom: 1rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-nav {
        width: 32px;
        height: 32px;
    }

    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }

    .carousel-indicators {
        bottom: 0.75rem;
        gap: 0.5rem;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* Standards & Compliance Section */
.standards-compliance {
    padding: 4rem 0;
    background-color: #F9FAFB;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.standard-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(50px);
}

.standard-card.animate-in {
    animation: fadeInUp 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.standard-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(199, 5, 50, 0.12);
}

.standard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #C70532, #E91E63);
    color: white;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.standard-card h3 {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.standard-card p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Contact CTA Section */
.contact-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #C70532 0%, #E91E63 100%);
    color: white;
}

.contact-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-cta h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0.95;
}

.contact-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-cta .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
}

.contact-cta .btn-primary:hover {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

.contact-cta .btn-secondary-outlined {
    color: white;
    border: 2px solid white;
    background: transparent;
}

.contact-cta .btn-secondary-outlined:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navbar Submenu */
.navbar-item-with-submenu {
    position: relative;
}

.navbar-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    border-radius: 6px;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-item-with-submenu:hover .navbar-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-submenu li {
    margin: 0;
}

.navbar-submenu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: static;
}

.navbar-submenu a::after {
    display: none;
}

.navbar-submenu a:hover {
    background: #F3F4F6;
    padding-left: 2rem;
    color: var(--color-text-primary) !important;
}

/* Override navbar-hierarchy.css styles */
.navbar-submenu li a {
    color: var(--color-text-secondary) !important;
    font-weight: normal;
}

.navbar-submenu li a.active {
    background-color: #F0F4F8;
    color: var(--color-primary) !important;
    font-weight: 500;
}

.navbar-submenu li a.active::before {
    display: none;
}

.navbar-submenu-category {
    display: none;
}

/* Products Preview Section */
.products-preview {
    padding: 4rem 0;
    background-color: var(--color-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(199, 5, 50, 0.15);
    border-color: var(--color-primary);
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #F3F4F6;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-category {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex: 1;
}

.products-footer {
    text-align: center;
}

.products-footer .btn {
    display: inline-flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    .facility-hero-title {
        font-size: 2rem;
    }

    .facility-hero-description {
        font-size: 1rem;
    }

    .facility-hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn,
    .btn-large {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .standards-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-cta .btn {
        width: 100%;
    }

    .navbar-submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .navbar-item-with-submenu:hover .navbar-submenu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }
}

@media (max-width: 480px) {
    .facility-hero {
        height: 70vh;
    }

    .facility-hero-title {
        font-size: 1.5rem;
    }

    .contact-cta h2 {
        font-size: 1.5rem;
    }

    .contact-cta p {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .service-card-content h3 {
        font-size: 1.2rem;
    }
}
