/* style.css – Hochzeits-Webseite */

body {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: #fffaf8;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #dcbcbc;
    color: #fff;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 1px;
}

nav {
    background-color: #f0e6e6;
    display: flex;
    justify-content: center;
    padding: 10px;
}

nav a {
    color: #8c4a4a;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    transition: background 0.3s;
}

nav a:hover {
    background-color: #ffe9e9;
    border-radius: 5px;
}

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #f7dcdc;
    font-size: 0.9em;
    color: #555;
    margin-top: 40px;
    border-top: 1px solid #e5baba;
}

/* Header-Galerie: festes Bild links + Slideshow rechts */
.header-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Linkes festes Bild */
.fixed-image img {
    width: 250px;   /* feste Breite */
    height: 250px;  /* feste Höhe */
    object-fit: cover; /* Bild wird zugeschnitten, bleibt aber gefüllt */
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Slideshow rechts */
.slideshow {
    position: relative;
    width: 400px;   /* maximale Breite */
    height: 250px;  /* feste Höhe */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slideshow img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* schneidet Bilder passend zu */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow img.active {
    opacity: 1;
}

.success-message {
    background-color: #e6ffe6;
    border: 2px solid #66cc66;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    color: #2d662d;
}

.error-message {
    background-color: #ffe6e6;
    border: 2px solid #cc6666;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    color: #662d2d;
}

/* Allgemeiner Bild-Wrapper für Unterseiten */
.page-image {
    text-align: center;
    margin: 25px 0;
}

.page-image img {
    max-width: 90%;      /* Bild passt sich immer dem Textbereich an */
    height: auto;        /* Höhe automatisch proportional */
    border-radius: 12px; /* abgerundete Ecken */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25); /* dezenter Schatten */
    transition: transform 0.3s ease;
}

.page-image img:hover {
    transform: scale(1.02); /* leichtes Vergrößern bei Hover */
}

.page-image-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.page-image-grid img {
    flex: 1 1 calc(33% - 20px); /* drei Bilder nebeneinander */
    max-width: 30%;             /* nicht breiter als 30% */
    height: auto;               /* Höhe automatisch proportional */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Tablet: nur 2 Bilder nebeneinander */
@media (max-width: 900px) {
    .page-image-grid img {
        flex: 1 1 calc(45% - 20px);
        max-width: 45%;
    }
}

/* Handy: ein Bild pro Reihe */
@media (max-width: 600px) {
    .page-image-grid img {
        flex: 1 1 100%;
        max-width: 100%;
    }
}



/* 📱 Handy-Ansicht: Bilder untereinander */
@media (max-width: 768px) {
    .header-gallery {
        flex-direction: column;
    }
    .fixed-image img,
    .slideshow {
        width: 100%;
        max-width: 500px;
        height: 250px;
    }
}
