/* STYLE.CSS ist für das Design und Layout der Seite. also Komplette visuelle Erscheinungsbild*/

/* Allgemeine Einstellungen. Das sind die globalen Grundeinstellungen */
body {
    background-color: rgb(245, 246, 250); /* heller Hintergrund für die gesamte Seite */
    color: rgb(0, 0, 0);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0px; /* px steht für pixel. für exakte Pixelgenaue Elemente wie z.B. Bilder oder buttons*/
}

/* ÜBERSCHRIFTEN */
h1 {
    color: rgb(0, 0, 0);
    text-align: center;
    margin-top: 20px;
}
/*RESET-BUTTON (browser-unabhängig*/
input[type="submit"],
button[type="submit"] {
    /* Setzt Browser-Standard-Styles zurück, insbesondere in Webkit und Firefox */
    -webkit-appearance: none; /* Wichtig für Safari/Chrome, um Standard-Button-Look zu entfernen */
    -moz-appearance: none;    /* Für Firefox */
    appearance: none;

    /* Übernimmt die Basis-Stile der .btn-Klasse */
    display: inline-block;
    padding: 8px 12px;
    line-height: 1;
    vertical-align: middle;
    text-align: center;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
    color: #000;
    margin-right: 5px;
    cursor: pointer; /* Visuelle Bestätigung, dass es anklickbar ist */
    
    /* Fügt einen Standard-Border hinzu, der oft bei nativen Buttons fehlt oder anders aussieht */
    border: 1px solid #ccc; 
    background-color: #eee; /* Ein Standard-Hintergrund, falls nicht durch eine spezifischere Klasse überschrieben */
}

/* HEADER UND NAVIGATION */
.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px; /*steht für den Abstand von Text und dem Feld vom Button*/
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05); /* leichte Tiefe */
    gap: 20px;
    flex-wrap: nowrap;
}

/* SUCHLEISTE */
.search-container{
    display: flex;
    width: 30%;
    background-color: #f2f2f2;
    padding: 0.4rem;
    border-radius: 10px;
    margin-bottom: 0;
}

.suche-input{
    border: none;
    outline: none;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    background-color: transparent;
    width: 100%;
}


.search-button[type="submit"]  {
    justify-self: flex-end;
    padding: 0.7rem; /* rem steht für Root-em. Für Text, Abstände, Layouts*/
    background-color: #222;
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-button[type="submit"]:hover {
    background-color: #555;
}

/*BUTTON ZUM NEUEN BEITRAG ERSTELLEN*/
.create-button {
    padding: 0.7rem 1.5rem;
    background-color: #222;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.create-button:hover {
    background-color: #555;
}

.neuer-post-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 250px;
}

.submit-button {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: rgb(34, 49, 63);
    color: white;
}
.blog-titel {
    font-family: fantasy;
}
/*STARTSEITEN ÜBERSCHRIFT*/
.seiten-ueberschrift {
    max-width: 800px;
    font-size: 2.5rem;
    margin: auto;
    margin-top: 10px;
    font-weight: bold;
    color: #000;
    text-align: center;
}
/* BLOGBEITRÄGE */
.inhalt {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
    position: relative;
}
/* DATUMSZEILE */
.datum {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: grey;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Container für Buttons innerhalb der Beiträge */
.button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ----------------------------
   Buttons in Blogbeiträgen
---------------------------- */


/* Basis-Button-Stil für alle Buttons */
.btn, .weiterlesen {
    display: inline-block;         /* damit wir padding, margin und width kontrollieren können */
    padding: 8px 12px;             /* Innenabstand: kleiner, kompakt */
    line-height: 1;                 /* verhindert extra vertikalen Abstand */
    vertical-align: middle;         /* verhindert, dass Buttons unten „abstehen“ */
    text-align: center;
    border-radius: 6px;             /* runde Ecken */
    text-decoration: none;          /* keine Unterstreichung */
    font-size: 0.85rem;             /* Textgröße */
    font-weight: bold;
    transition: all 0.2s ease;      /* sanfte Hover-Animation */
    color: #000;                    /* Textfarbe */
    margin-right: 5px;              /* Abstand zwischen Buttons */
}

/* Edit-Button */
.btn.edit {
    background-color: rgb(202, 238, 202); /* helle grüne Farbe */
}

.btn.edit:hover {
    background-color: green;   /* Farbe beim Hover */
    color: white;              /* Textfarbe beim Hover */
}

/* Delete-Button */
.btn.delete {
    background-color: rgb(245, 201, 201); /* helle rote Farbe */
}

.btn.delete:hover {
    background-color: #da190b; /* dunkles Rot beim Hover */
    color: white;
}

.btn.back{
    background-color: #222;   /* dunkelgrau */
    color: white;             /* Textfarbe */
}


.btn.save {
    background-color: rgb(202, 238, 202); /* helle grüne Farbe */
}
.btn.save:hover {
    background-color: green; /* helle grüne Farbe */
}


/* Weiterlesen-Button */
.weiterlesen {
    background-color: #222;   /* dunkelgrau */
    color: white;             /* Textfarbe */
}

.weiterlesen:hover {
    background-color: #444;   /* helleres Grau beim Hover */
}

/* TITELBILD */
.title-image{
    display: flex;
    width: 100%;
    justify-content: center;
    align-content: center;
    border: #000 2px;
    border-radius: 15%;
    aspect-ratio: 16 / 9;
}

.title-image > img {
    object-fit: cover; 
    width: 100%;
    height: 100%;
    border-radius: 15px;
    border:  2px dotted gray;
}
/* FÜR DAS RESPONSIVE DESIGN */
/*TABLET größen*/
@media screen and (max-width: 1029px) {

    .header {
        flex-direction: column;
        align-items: center;
        justify-items: center;
        padding-bottom: 28px;
        gap: 20px;
    }
    .search-container{
        width: 80%;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
    }
    .neuer-post-container{
         display: flex;
         width: 80%;
    }
    .create-button{
        text-align: center;
        width: 100%;
    }
    .blog-titel{
        margin-top: 25px;
        margin-bottom: 0;
        padding: 0;
    }
    .inhalt {
        padding: 2rem;
        font-size: 1rem;
        line-height: 1.5;
    }
   
    .button-row {
        flex-wrap: nowrap;
    }
    .date-span{
        margin-top: 8px;
        font-size: 10px;
    }
}

/*DESKTOP größen*/
@media screen and (min-width: 1030px) {
    body {
        font-size: 18px;
    }
    .inhalt {
        max-width: 900px;
    }
    .seiten-ueberschrift {
        font-size: 3rem;
    }
    .button-row {
        gap: 15px;
    }
}


/* FÜR DAS ERSTELLEN VON BEITRÄGEN */

.content-form{
    display: flex;
    flex-direction: column;
    gap:15px;
}

.styled-input{
    border: 2px solid black;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    border-radius: 10px;
    padding: 10px;    
}

textarea.styled-input{
    resize: vertical;
}


/* BUTTON ZUM BILD HOCHLADEN */
.image-upload::-webkit-file-upload-button {
    /* Reset Button Defaults */
    -webkit-appearance: none; 
    appearance: none;
    
    /* Custom Button Styling */
    background-color: black; /* Blue button */
    color: white; /* White text */
    padding: 6px 12px;
    margin-right: 10px; /* Space between button and file name */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}