/* Home page styles (moved out of index.html inline <style> for CSP) */

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #ECECEC;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Hero styles */
.hero-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #f5f5f5;
    max-width: 100%;
    margin: 0 auto;
}

.hero-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #333;
    margin-bottom: 2rem;
    font-family: "Toyota-Type-Bold";
    line-height: 1.2;
}

.view-designs-btn {
    padding: 1rem 2rem;
    background: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.view-designs-btn:hover {
    transform: translateY(-2px);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

.grid-item {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    transition: transform 0.2s;
    background-color: #ddd;
}

.grid-item:hover {
    transform: scale(1.05);
}

.hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 280px;
}

.promo-card {
    flex: 1;
    padding: 2rem;
    border-radius: 8px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    position: relative;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: left;
    transition: transform 0.5s ease;
}

.promo-card:hover::before {
    transform: scale(1.05);
}

.promo-card.branding::before {
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.2)), url('https://media.toyota-gib.com/web/fleet-services/e-learning-hub.webp');
}

.promo-card.personalised::before {
    background-image: url('https://media.toyota-gib.com/web/news/discounted-models/discounted-models-main.webp');
}

.promo-card > * {
    position: relative;
    z-index: 1;
}

.promo-card h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
    font-family: "Toyota-Type-Bold";
    position: relative;
    display: inline-block;
}

.promo-card:hover h3 {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


.promo-card button {
    align-self: flex-end;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
    font-family: "Toyota-Type-Bold";
    text-transform: uppercase;
    background: white;
    color: #000;
}

.promo-card:hover button {
    transform: translateY(-4px);
    background: #A20011;
    color: white;
}

.promo-card button:hover {
    transform: none;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-right {
        flex-direction: row;
        min-width: 100%;
    }

    .promo-card {
        min-height: 300px;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .hero-container {
        padding: 1rem;
        gap: 1rem;
    }


    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-right {
        flex-direction: column;
    }
}

/* Video styles */
.hero-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.desktop-video {
    display: block;
}

.mobile-video {
    display: none;
}

@media (max-width: 768px) {
    .desktop-video {
        display: none;
    }
    .mobile-video {
        display: block;
    }
}

/* "Watch our TGS video" button + modal */
.hero-content {
    position: relative;
}

.watch-video-btn {
    position: absolute;
    left: 0;
    bottom: 2rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 0 5px 5px 0;
    background: #000;
    color: white;
    font-size: 1em;
    font-family: "Toyota-Type-light";
    cursor: pointer;
    transition: background 0.2s;
}

.watch-video-btn:hover,
.watch-video-btn:focus-visible {
    background: #A20011;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.video-modal[hidden] {
    display: none;
}

.video-modal-content {
    margin: 10% auto;
    padding: 20px;
    max-width: 60%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-modal-content video {
    display: block;
    height: auto;
    object-fit: contain;
}

.video-modal-close {
    float: right;
    padding: 0;
    border: none;
    background: none;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
    color: white;
}

body.video-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .watch-video-btn {
        bottom: 1rem;
    }

    .video-modal-content {
        margin: 30% auto;
        max-width: 95%;
        padding: 10px;
    }
}

/* Replacements for former inline style="" attributes */
a.promo-card.promo-link {
    text-decoration: none;
    padding: 0;
}

.bg-grey {
    background-color: #ECECEC;
}

.bg-white {
    background-color: #ffffff;
}

img.w-40 {
    width: 40%;
}

.font-bold {
    font-family: "Toyota-Type-Bold";
}
