/* General Body & Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
}

/* Header and Navigation */
.navbar {
    background-color: rgba(0, 0, 0, 0.7);
    transition: background-color 0.5s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff !important;
}

.nav-link {
    color: #fff !important;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #00d1b2 !important;
}

/* Hero Section */
.hero-section {
    background: url('../images/real-robots-evolution.jpg') no-repeat center center/contain;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    transition: height 0.3s ease-in-out;
    max-height: 400px;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-text {
    z-index: 2;
}

.hero-text h1 {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* Section Title */
.section-title {
    margin-bottom: 2.5rem;
}

.section-title h2 {
    margin-bottom: 0.5rem;
}

.section-title .lead.text-muted {
    color: #495057 !important; /* Darker subtitle for better contrast */
}

/* Tickers Container */
.tickers-container {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ticker-title {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 1px;
    display: block;
}

a.ticker-title {
    text-decoration: none;
}

a.ticker-title:hover {
    text-decoration: underline;
}

/* Companies Carousel */
#robots-carousel-cards ~ .carousel-control-prev, #robots-carousel-cards ~ .carousel-control-next {
    background: linear-gradient(135deg, #00d1b2 60%, #007bff 100%);
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18), 0 1.5px 0 #007bff;
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    opacity: 0.98;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background 0.25s, box-shadow 0.25s, border 0.25s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#robots-carousel-cards ~ .carousel-control-prev-icon, #robots-carousel-cards ~ .carousel-control-next-icon {
    background-size: 70%;
    filter: none;
    width: 2.2rem;
    height: 2.2rem;
}

#robots-carousel-cards ~ .carousel-control-prev {
    left: -20px;
}
#robots-carousel-cards ~ .carousel-control-next {
    right: -20px;
}

#robots-carousel-cards ~ .carousel-control-prev:hover, #robots-carousel-cards ~ .carousel-control-next:hover {
    background: linear-gradient(135deg, #007bff 60%, #00d1b2 100%);
    color: #ffd700;
    border: 3px solid #ffd700;
    box-shadow: 0 10px 32px rgba(0,0,0,0.28), 0 2px 0 #ffd700;
    opacity: 1;
}
.company-card {
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-basis: calc(20% - 20px); /* 5 cards per row on large screens */
    max-width: calc(20% - 20px);
    min-width: 180px; /* Minimum width for smaller views */
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.company-card .card-link {
    text-decoration: none;
    color: inherit;
}

.company-card .card-img-top {
    height: 150px;
    object-fit: contain;
    padding-top: 1rem;
}

.company-card .card-body {
    text-align: center;
    padding: 1rem;
}

.company-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.25rem;
}

.company-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Responsive adjustments for company cards */
@media (max-width: 1200px) {
    .company-card {
        flex-basis: calc(25% - 20px);
        max-width: calc(25% - 20px);
    }
}

@media (max-width: 992px) {
    .company-card {
        flex-basis: calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .company-card {
        flex-basis: calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .company-card {
        flex-basis: calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
    #companies-carousel-section .carousel-control-prev,
    #companies-carousel-section .carousel-control-next {
        height: 40px;
        width: 40px;
    }
    #companies-carousel-section .carousel-control-prev {
        left: -10px;
    }
    #companies-carousel-section .carousel-control-next {
        right: -10px;
    }
}

/* Media Gallery Section */

/* Embedded YouTube Modal */
#mediaGalleryModal .modal-content {
    background: #111;
    border-radius: 12px;
    border: none;
}
#mediaGalleryModal .modal-header {
    border-bottom: 1px solid #222;
    background: #181818;
    color: #fff;
}
#mediaGalleryModal .modal-title {
    color: #fff;
}
#mediaGalleryModal .btn-close {
    filter: invert(1);
}
#mediaGalleryModal .modal-body {
    padding: 0;
}
#mediaGalleryModal .ratio {
    background: #000;
}

.media-gallery-card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    background: #fff;
    min-height: 340px;
    display: flex;
    flex-direction: column;
}
.media-gallery-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    transform: translateY(-2px) scale(1.03);
    border-color: #00d1b2;
}
.media-gallery-card img.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e5e5e5;
}
@media (max-width: 767px) {
    .media-gallery-card img.card-img-top {
        height: 160px;
    }
    .media-gallery-card {
        min-height: 260px;
    }
}

.company-card {
    transition: box-shadow 0.3s, transform 0.3s;
    border: 1px solid #e5e5e5;
    background: #fff;
    min-height: 120px;
    max-width: 290px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 10px;
}
.company-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    transform: translateY(-2px) scale(1.03);
    border-color: #00d1b2;
}
@media (max-width: 767px) {
    #companies-carousel-cards {
        flex-direction: column !important;
        align-items: center;
    }
    .company-card {
        width: 95% !important;
        max-width: 98vw;
    }
}

/* News Ticker */
.news-ticker-wrapper {
    position: relative;
}

/* Stock Ticker */
.stock-ticker-wrapper {
    position: relative;
}

.widget-container {
    position: relative;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.tradingview-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 300px; /* Set a fixed height for the carousel */
}

.tradingview-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.tradingview-carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #00d1b2 60%, #007bff 100%);
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18), 0 1.5px 0 #007bff;
    padding: 10px;
    cursor: pointer;
    z-index: 3;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 22px;
    line-height: 22px;
    text-align: center;
    opacity: 0.98;
    transition: background 0.25s, box-shadow 0.25s, border 0.25s, color 0.2s;
}

.carousel-arrow.prev {
    left: -18px;
}

.carousel-arrow.next {
    right: -18px;
}

.carousel-arrow:hover {
    background: linear-gradient(135deg, #007bff 60%, #00d1b2 100%);
    color: #ffd700;
    border: 3px solid #ffd700;
    box-shadow: 0 10px 32px rgba(0,0,0,0.28), 0 2px 0 #ffd700;
    opacity: 1;
}

.stock-item .symbol {
    font-weight: bold;
}

.stock-item .price {
    margin: 0 10px;
}

.stock-item .change.positive {
    color: #28a745;
}

.stock-item .change.negative {
    color: #dc3545;
}

/* News Panel */
.news-panel {
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.news-panel h2 {
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

.news-article-card {
    border: none;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.news-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.news-article-card img {
    border-radius: 0;
}

.news-article-card .card-body {
    padding: 25px;
}

.news-article-card .card-title {
    font-weight: bold;
}

.news-article-card .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.news-article-card .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

@media (max-width: 991px) {
    .hero-section {
        background-position: right center;
    }
}

/* Page Header for subpages */
.page-header {
    background-color: #001f3f; /* Dark navy blue */
    color: #ffffff;
    padding: 100px 0 40px;
    text-align: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
