/* ================================= */
/* ALLGEMEIN */
/* ================================= */

/* Header dunkler */
.site-header:after {
  background: rgba(0,0,0,0.25);
}

/* Cover Overlay */
.wp-block-cover__background {
  background-color: rgba(0,0,0, 0.1) !important;
  opacity: 1 !important;
  transition: none !important;
}

/* Checkbox */
input[type="checkbox"] {
  background-color: #FFFFFF;
}

body, p, h1, h2, h3, h4, h5, h6 {
    color: #e5e5e5 !important;
    opacity: 1 !important;
}


/* ==========================================
   1. FÜR BESUCHER (Inhalts-Blöcke dunkel, Schrift hell)
   ========================================== */

/* Setzt die alte Farbe im System global auf das helle Schriftgrau */
:root {
    --wp--preset--color--2-d-5-5-7-a: #e5e5e5 !important;
    --wp--preset--color--2d557a: #e5e5e5 !important;
    --wp--preset--color--custom-2d557a: #e5e5e5 !important;
}

/* Sucht gezielt nach der alten Farbe in den WordPress-Block-Attributen */
[style*="--wp--preset--color--2d557a"], 
[style*="background-color: #2d557a"], 
[style*="background-color:#2d557a"] {
    background-color: #565656 !important;
}

/* Erzwingt die Textfarbe für alle alten Textblöcke */
[class*="has-2d557a-color"],
[style*="color: #2d557a"], 
[style*="color:#2d557a"] {
    color: #e5e5e5 !important;
}

/* KORREKTUR: Färbt Blöcke dunkelgrau, schließt Eingabefelder und Buttons aber explizit aus */
body:not(.wp-admin) .wp-block-group, 
body:not(.wp-admin) .wp-block-columns, 
body:not(.wp-admin) .wp-block-column,
body:not(.wp-admin) .has-background:not(input):not(button):not(.tnp-submit):not(.wp-block-button__link) {
    background-color: #565656 !important;
}

/* Setzt die helle Schriftfarbe für die Besucher-Blöcke */
body:not(.wp-admin) .wp-block-group, 
body:not(.wp-admin) .wp-block-columns, 
body:not(.wp-admin) .wp-block-column {
    color: #e5e5e5 !important;
}


/* ==========================================
   2. DER NEWSLETTER BUTTON (Reine Farbanpassung)
   ========================================== */
input.tnp-submit,
input[type="submit"].tnp-submit,
.tnp-subscription input[type="submit"],
form.tnp-subscription .tnp-submit,
.tnp-submit {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    /* Farbgestaltung */
    background: #eecc66 !important;
    background-color: #eecc66 !important; 
    color: #e5e5e5 !important;
    font-weight: bold !important;
    border: 2px solid #eecc66 !important;
    box-shadow: none !important;
}

/* Verhindert Farbänderungen beim Drüberfahren (Hover) */
input.tnp-submit:hover,
input[type="submit"].tnp-submit:hover,
.tnp-subscription input[type="submit"]:hover,
form.tnp-subscription .tnp-submit:hover,
.tnp-submit:hover {
    background: #eecc66 !important;
    background-color: #eecc66 !important; 
    color: #e5e5e5 !important;
    border: 2px solid #eecc66 !important;
}


/* 
 ==========================================
   3. NUR FÜR DEN EDITOR (Schrift dunkel zum Lesen)
   ========================================== */
.editor-styles-wrapper, 
.editor-styles-wrapper p, 
.editor-styles-wrapper h1, 
.editor-styles-wrapper h2, 
.editor-styles-wrapper h3, 
.editor-styles-wrapper h4,
.editor-styles-wrapper .wp-block-paragraph,
.editor-styles-wrapper [style*="color"] {
    color: #222222 !important;
}


/* ================================= */
/* PORTFOLIO – BILDGRÖSSEN */
/* ================================= */

.project .entry-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project .entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.wp-block-button__link {
    background-color: #eecc66 !important;
    color: #565656 !important; 
    line-height: 30px !important;
}

/* HOVER: Wenn man mit der Maus über den Button fährt */
.wp-block-button__link:hover {
    background-color: #565656 !important; 
    color: #eecc66 !important;                       
    border: 2px solid #eecc66 !important;                        
    box-shadow: none !important;                     
}

/* AKTIVIERT: Wenn der Button angeklickt wird oder den Fokus hat */
.wp-block-button__link:active,
.wp-block-button__link:focus {
    background-color: #565656 !important; 
    color: #eecc66 !important;
    border: 2px solid #eecc66 !important;
    box-shadow: none !important;
}

.entry-content p {
    margin-bottom: 20px !important;
}


/* ================================= */
/* PORTFOLIO – DESKTOP GRID FIX */
/* ================================= */

@media (min-width: 900px) {
  .projects.grid {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .projects.grid .project {
    width: 25% !important;
  }
}

/* Abstand */
.projects.grid .project {
  padding: 4px;
  box-sizing: border-box;
}


/* ================================= */
/* DESKTOP OPTIK */
/* ================================= */

@media (hover: hover) {
  .projects.grid .project {
    background: #f5f6f7;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: relative;
  }

  .projects.grid .project:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  }

  /* Zoom */
  .project .entry-media img {
    transition: transform 0.6s ease;
  }

  .project:hover .entry-media img {
    transform: scale(1.08);
  }

  /* Titel Animation */
  .project .entry-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .project:hover .entry-text {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ================================= */
/* MOBILE / TOUCH */
/* ================================= */

@media (hover: none), (pointer: coarse) {
  /* dunkler Hintergrund zwischen Bildern */
  .projects.grid {
    padding: 4px;
    background: #2f2f2f;
  }

  .projects.grid .project {
    padding: 6px;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }

  /* Overlay immer sichtbar */
  .project .entry-media + .entry-text {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
  }

  /* Verlauf */
  .project .entry-text {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px !important;
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.75) 0%,
      rgba(0,0,0,0.4) 60%,
      rgba(0,0,0,0.0) 100%
    ) !important;
  }

  /* Text sichtbar */
  .project .entry-header,
  .project .entry-title {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* größere Schrift */
  .project .entry-title {
    color: #fff !important;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 500;
  }
}