/* ==========================================================================
   GEWA Landing Page Styles
   Single-product landing pages (werbeeimer, loescheimer, etc.)
   ========================================================================== */

/* Landing Page Body */
body.landing-page {
    background-color: #ffffff;
}

/* Override base.css #main flex layout for landing pages */
body.landing-page #main.landing-main {
    display: block !important;
    flex: none;
    background-color: #ffffff;
    padding: 0;
}

body.landing-page #main.landing-main .container {
    padding: 0 15px;
    max-width: 1400px;
    background-color: transparent;
}

/* Ensure sections stack vertically */
body.landing-page .landing-section {
    display: block;
    width: 100%;
    clear: both;
}

/* Hero section outside of main */
body.landing-page .landing-hero {
    display: block;
    width: 100%;
}


/* ==========================================================================
   Landing Header (simplified navigation)
   ========================================================================== */

.landing-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.landing-header .landing-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.landing-header .btn-cta {
    background-color: #e74c3c;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.landing-header .btn-cta:hover {
    background-color: #c0392b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.landing-header .btn-home {
    color: #ffffff;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.landing-header .btn-home:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.landing-hero {
    position: relative;
    background-color: #f8f9fa;
    overflow: hidden;
    width: 100%;
}

/* Only set min-height when hero has content */
.landing-hero:not(:empty) .hero-content:not(:empty) {
    min-height: 400px;
}

.landing-hero .hero-content {
    width: 100%;
}

/* Hide empty hero section */
.landing-hero:empty,
.landing-hero .hero-content:empty {
    min-height: 0;
    padding: 0;
}

/* Hero split layout — markup structured by import_landing_pages */
.landing-hero .hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
}

.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 50px;
    align-items: center;
}

.hero-media img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #003a62;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.7;
}

.hero-text ul {
    list-style: none;
    padding: 0;
    margin: 25px 0 30px;
}

.hero-text ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    color: #333;
}

.hero-text ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #2e9e44;
    font-weight: 700;
}

.hero-text > a {
    display: inline-block;
    background-color: #e74c3c;
    color: #ffffff;
    padding: 14px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.hero-text > a:hover {
    background-color: #c0392b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.hero-text > img {
    max-width: 110px;
    height: auto;
    margin-left: 25px;
    vertical-align: middle;
}

/* Hero image with overlay text - use with Bootstrap Card or custom plugin */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 58, 98, 0.85) 0%, rgba(0, 58, 98, 0.6) 50%, transparent 100%);
}

.hero-banner-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 60px;
    color: #ffffff;
}

.hero-banner-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-banner-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-banner-content .btn-primary {
    background-color: #e74c3c;
    border-color: #e74c3c;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hero-banner-content .btn-primary:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Made in Germany Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.hero-badge i {
    font-size: 1.5rem;
}

/* ==========================================================================
   Landing Sections (common styles)
   ========================================================================== */

.landing-section {
    padding: 60px 0;
    display: block;
    width: 100%;
}

.landing-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Alternate background colors */
.landing-intro {
    background-color: #ffffff;
}

.landing-features {
    background-color: #e8f2fa;
}

.landing-gallery {
    background-color: #ffffff;
}

.landing-details {
    background-color: #f8f9fa;
}

.landing-form {
    background-color: #003a62;
}

.landing-additional {
    background-color: #ffffff;
}

/* Hide empty sections in frontend view ONLY (not in CMS edit mode)
   CMS edit mode is detected by cms-toolbar-expanded class on body */
body.landing-page:not(.cms-toolbar-expanded) .landing-section:has(.cms-placeholder:empty):not(:has(.cms-plugin)) {
    display: none;
}

/* Hide empty placeholder divs in frontend view only */
body.landing-page:not(.cms-toolbar-expanded) .landing-section .cms-placeholder:empty {
    display: none;
}

/* Fallback for browsers without :has() support - hide sections with no visible content */
body.landing-page:not(.cms-toolbar-expanded) .landing-section:empty {
    display: none;
    padding: 0;
}

/* Section Headings */
.landing-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #003a62;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.landing-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #016cb8;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ==========================================================================
   Intro Section
   ========================================================================== */

.landing-intro .lead {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   Features Section (USPs / Quality Marks)
   ========================================================================== */

.landing-features {
    color: #333333;
}

.landing-features h2 {
    color: #003a62;
}

.landing-features h2::after {
    background-color: #016cb8;
}

/* Feature grid — markup structured by import_landing_pages */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card > img {
    display: block;
    height: 70px;
    width: auto;
    margin: 0 auto 20px;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 40px 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 58, 98, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 58, 98, 0.15);
    transform: translateY(-5px);
}

.feature-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background-color: #016cb8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #003a62;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

/* ==========================================================================
   Product Gallery Section
   ========================================================================== */

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.gallery-item-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    padding: 20px;
    background-color: #f8f9fa;
}

.gallery-item-content {
    padding: 20px;
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #003a62;
    margin-bottom: 8px;
}

.gallery-item-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Details section: intro texts (video teaser, variant lead) are centered
   like on the legacy pages. Covers bare text nodes too, hence the container. */
.landing-details .container {
    text-align: center;
}

.landing-details .container > p,
.landing-details .container > h3 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Product video in details section — created by import_landing_pages.
   djangocms-video ships no CSS of its own, so the <video> keeps its intrinsic
   size: it overflows any container narrower than the video and then sits flush
   left instead of centered. Match the variant slider's width and rhythm. */
.landing-details .djangocms-video-plugin video {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    margin: 40px auto;
    border-radius: 8px;
    background-color: #000000;
}

/* Variant slider in details section — created by import_landing_pages */
.landing-details .carousel {
    max-width: 720px;
    margin: 40px auto 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 20px 60px;
}

.landing-details .carousel-item img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: contain;
}

.landing-details .carousel-caption {
    position: static;
    padding: 15px 40px 0;
    color: #333333;
}

.landing-details .carousel-caption p {
    margin: 0;
}

.landing-details .carousel-control-prev-icon,
.landing-details .carousel-control-next-icon {
    filter: invert(1) grayscale(100%);
}

.landing-details .carousel-indicators [data-bs-target] {
    background-color: #003a62;
}

/* Variant grid in details section — markup structured by import_landing_pages */
.landing-details .gallery-grid {
    margin-top: 40px;
}

.details-cta {
    text-align: center;
    margin: 40px 0 0;
}

.details-cta a {
    display: inline-block;
    background-color: #e74c3c;
    color: #ffffff;
    padding: 14px 30px;
    margin: 0 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.details-cta a:hover {
    background-color: #c0392b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Carousel for Gallery (Bootstrap Carousel integration) */
.landing-gallery .carousel {
    max-width: 800px;
    margin: 0 auto;
}

.landing-gallery .carousel-item img {
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
}

.landing-gallery .carousel-control-prev,
.landing-gallery .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: #003a62;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.landing-gallery .carousel-control-prev {
    left: -60px;
}

.landing-gallery .carousel-control-next {
    right: -60px;
}

.landing-gallery .carousel-indicators {
    bottom: -50px;
}

.landing-gallery .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
}

.landing-gallery .carousel-indicators button.active {
    background-color: #003a62;
}

/* Thumbnail Navigation for Carousel */
.carousel-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.carousel-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-thumbnail:hover,
.carousel-thumbnail.active {
    border-color: #016cb8;
    box-shadow: 0 2px 8px rgba(1, 108, 184, 0.3);
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

/* ==========================================================================
   Product Details Section
   ========================================================================== */

/* Specification Table */
.spec-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
}

.spec-table th,
.spec-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.spec-table th {
    background-color: #003a62;
    color: #ffffff;
    font-weight: 600;
    width: 40%;
}

.spec-table td {
    background-color: #ffffff;
}

.spec-table tr:hover td {
    background-color: #f0f7fc;
}

/* Detail Cards */
.detail-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.detail-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #003a62;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #016cb8;
}

.detail-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-card ul li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.detail-card ul li:last-child {
    border-bottom: none;
}

.detail-card ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* ==========================================================================
   Request Form Section
   ========================================================================== */

.landing-form {
    color: #ffffff;
    padding: 80px 0;
}

.landing-form h2 {
    color: #ffffff;
}

.landing-form h2::after {
    background-color: #e74c3c;
}

/* Headings inside the white form card stay in CI blue */
.landing-form .form-wrapper h2 {
    color: #003a62;
}

.landing-form .form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    color: #333;
}

/* Form Styling */
.landing-form .form-label {
    font-weight: 600;
    color: #003a62;
    margin-bottom: 8px;
}

.landing-form .form-control,
.landing-form .form-select {
    padding: 12px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.landing-form .form-control:focus,
.landing-form .form-select:focus {
    border-color: #016cb8;
    box-shadow: 0 0 0 3px rgba(1, 108, 184, 0.15);
}

.landing-form .btn-submit {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.landing-form .btn-submit:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Form Group Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Additional Section (optional content)
   ========================================================================== */

.landing-additional:empty {
    display: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .landing-header .container {
        flex-direction: column;
        text-align: center;
    }

    .landing-header .landing-nav {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .hero-banner-content {
        padding: 40px 30px;
        max-width: 100%;
    }

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

    .hero-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-media img {
        max-width: 320px;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-gallery .carousel-control-prev {
        left: 10px;
    }

    .landing-gallery .carousel-control-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        min-height: 400px;
    }

    .hero-banner {
        min-height: 400px;
    }

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

    .hero-banner-content p {
        font-size: 1rem;
    }

    .landing-section {
        padding: 40px 0;
    }

    .landing-section h2 {
        font-size: 1.75rem;
    }

    .landing-form .form-wrapper {
        padding: 30px 20px;
    }

    .spec-table th,
    .spec-table td {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .carousel-thumbnail {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .landing-header .btn-cta {
        padding: 10px 20px;
        font-size: 12px;
    }

    .landing-header .btn-home {
        padding: 8px 15px;
        font-size: 12px;
    }

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

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utility Classes for Landing Pages
   ========================================================================== */

/* Text Colors */
.text-gewa-blue {
    color: #003a62;
}

.text-gewa-light-blue {
    color: #016cb8;
}

.text-gewa-red {
    color: #e74c3c;
}

/* Background Colors */
.bg-gewa-blue {
    background-color: #003a62;
}

.bg-gewa-light-blue {
    background-color: #016cb8;
}

.bg-gewa-red {
    background-color: #e74c3c;
}

/* Spacing */
.section-spacing {
    padding: 80px 0;
}

.section-spacing-sm {
    padding: 40px 0;
}

/* Decorative Elements */
.underline-accent {
    position: relative;
    display: inline-block;
}

.underline-accent::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e74c3c;
}

/* Icon Box */
.icon-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
}

.icon-box-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: #016cb8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
}

.icon-box-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #003a62;
    margin-bottom: 8px;
}

.icon-box-content p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #003a62 0%, #016cb8 100%);
    color: #ffffff;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
}

.cta-banner h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-banner p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.cta-banner .btn {
    background-color: #e74c3c;
    border-color: #e74c3c;
    padding: 15px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-banner .btn:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}
