/*
Theme Name: Endlich Italienisch
Theme URI: https://endlich-italienisch.de
Author: Andreas / SEOFX
Description: Custom WordPress Theme für den Blog "Endlich Italienisch" von Julia & Mirco.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: endlich-italienisch
*/

/* ========== Fonts ========== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/caveat-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/caveat-700.ttf') format('truetype');
}

/* ========== CSS Variables ========== */
:root {
  --warm-50: #fdf8f0;
  --warm-100: #f5e6d3;
  --warm-200: #e8d0b3;
  --warm-600: #5a9abf;
  --warm-700: #3d7fa8;
  --warm-800: #2a6a8f;
  --warm-900: #1a4a6a;
  --italia-green: #008C45;
  --italia-red: #CD212A;
  --accent: #89CFF0;
  --tape: rgba(255, 255, 220, 0.6);
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--warm-50);
  color: var(--warm-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== Utilities ========== */
.font-handwriting {
  font-family: 'Caveat', cursive;
}

.max-w-5xl {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-3xl {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ========== Navigation ========== */
.site-nav {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .site-title {
  display: flex;
  align-items: center;
}

.site-nav .site-title .site-logo {
  height: 170px;
  width: 170px;
  object-fit: contain;
  display: block;
}

.site-nav .nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--warm-700);
}

.site-nav .nav-links a {
  transition: color 0.2s;
}

.site-nav .nav-links a:hover {
  color: var(--warm-800);
}

/* ========== Header / Hero ========== */
.site-header {
  background-color: var(--warm-200);
  border-bottom: 1px solid rgba(90, 154, 191, 0.2);
}

.hero-content {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.hero-text {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-text h1 {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  color: var(--warm-800);
  margin-bottom: 0.75rem;
}

.hero-text p {
  color: var(--warm-600);
  font-size: 1.125rem;
  max-width: 36rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .hero-text h1 {
    font-size: 3.75rem;
  }
}

/* ========== Polaroids ========== */
.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 48rem;
  margin: 0 auto;
  justify-items: center;
}

@media (min-width: 640px) {
  .polaroid-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.polaroid {
  position: relative;
  background: white;
  padding: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 9rem;
  flex-shrink: 0;
}

.polaroid:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.polaroid img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
}

@media (min-width: 640px) {
  .polaroid {
    width: 11rem;
  }
  .polaroid img {
    height: 12rem;
  }
}

.polaroid .tape {
  position: absolute;
  width: 2.5rem;
  height: 1.25rem;
  background: var(--tape);
  border-radius: 0.125rem;
  opacity: 0.8;
}

.tape-left {
  top: -0.75rem;
  left: 0.5rem;
  transform: rotate(-12deg);
}

.tape-right {
  top: -0.75rem;
  right: 0.5rem;
  transform: rotate(12deg);
}

.tape-center {
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
}

.rotate-n3 { transform: rotate(-3deg); }
.rotate-2 { transform: rotate(2deg); }
.rotate-n1 { transform: rotate(-1deg); }
.rotate-3 { transform: rotate(3deg); }

.rotate-n3:hover, .rotate-2:hover, .rotate-n1:hover, .rotate-3:hover {
  transform: scale(1.05);
}

/* Polaroid small (for subpages) */
.polaroid-small {
  position: relative;
  background: white;
  padding: 0.375rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 7rem;
  flex-shrink: 0;
}

.polaroid-small:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.polaroid-small img {
  width: 100%;
  height: 5rem;
  object-fit: cover;
}

@media (min-width: 640px) {
  .polaroid-small {
    width: 9rem;
  }
  .polaroid-small img {
    height: 6rem;
  }
}

.polaroid-small .tape {
  position: absolute;
  width: 1.75rem;
  height: 0.875rem;
  background: var(--tape);
  border-radius: 0.125rem;
  opacity: 0.8;
}

.polaroid-small .tape-left {
  top: -0.5rem;
  left: 0.25rem;
  transform: rotate(-12deg);
}

.polaroid-small .tape-right {
  top: -0.5rem;
  right: 0.25rem;
  transform: rotate(12deg);
}

.polaroid-small .tape-center {
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
}

.polaroid-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .polaroid-row {
    gap: 1rem;
  }
}

/* ========== Subpage Header ========== */
.subpage-header {
  background-color: var(--warm-200);
  border-bottom: 1px solid rgba(90, 154, 191, 0.2);
}

.subpage-header .header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.5rem 1rem 1.5rem;
}

.subpage-header .header-title {
  text-align: center;
  margin-bottom: 1rem;
}

.subpage-header .header-title h1 {
  font-family: 'Caveat', cursive;
  font-size: 1.875rem;
  color: var(--warm-800);
}

@media (min-width: 640px) {
  .subpage-header .header-title h1 {
    font-size: 2.25rem;
  }
}

/* ========== Ciao Box (Homepage) ========== */
.ciao-box {
  background-color: var(--warm-100);
  border-radius: 0.5rem;
  border: 1px solid var(--warm-200);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .ciao-box {
    padding: 2rem;
  }
}

.ciao-box h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.875rem;
  color: var(--warm-800);
  margin-bottom: 0.75rem;
}

.ciao-box p {
  color: var(--warm-600);
  line-height: 1.7;
}

/* ========== Blog Cards ========== */
.blog-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--warm-200);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.blog-card .meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--warm-600);
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--warm-800);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.blog-card h2 a {
  transition: color 0.2s;
}

.blog-card h2 a:hover {
  color: var(--warm-900);
}

.blog-card .excerpt {
  color: var(--warm-600);
  line-height: 1.7;
}

.blog-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--warm-700);
  transition: color 0.2s;
}

.blog-card .read-more:hover {
  color: var(--warm-900);
  text-decoration: underline;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ========== Single Post ========== */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.25rem;
  color: var(--warm-800);
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .post-header h1 {
    font-size: 3rem;
  }
}

.post-header .meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--warm-600);
}

/* ========== Article Prose ========== */
.entry-content {
  color: var(--warm-700);
  max-width: none;
}

.entry-content p {
  margin-bottom: 1.25em;
  line-height: 1.8;
}

.entry-content h2 {
  color: var(--warm-800);
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.entry-content h3 {
  color: var(--warm-800);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.entry-content ul,
.entry-content ol {
  margin-top: 0.75em;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.entry-content blockquote {
  border-left: 3px solid var(--warm-200);
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}

.entry-content th {
  background-color: var(--warm-200);
  color: var(--warm-800);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--warm-200);
}

.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--warm-200);
  vertical-align: top;
}

.entry-content tr:nth-child(even) {
  background-color: rgba(245, 230, 211, 0.5);
}

.entry-content em {
  font-style: italic;
}

.entry-content strong {
  color: var(--warm-800);
}

.entry-content a {
  color: var(--accent);
}

.entry-content a:hover {
  text-decoration: underline;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--warm-200);
  margin: 2em 0;
}

/* ========== Comments ========== */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--warm-200);
}

.comments-section h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--warm-800);
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.comment-list .comment {
  border: 1px solid var(--warm-200);
  border-radius: 0.5rem;
  padding: 1rem;
  background: white;
  margin-bottom: 1rem;
}

.comment .comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.comment .comment-author {
  font-weight: 600;
  color: var(--warm-800);
}

.comment .comment-date {
  font-size: 0.75rem;
  color: var(--warm-600);
}

.comment .comment-content p {
  color: var(--warm-900);
  white-space: pre-wrap;
  margin: 0;
}

/* Replies */
.comment .children {
  list-style: none;
  margin-top: 0.75rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--warm-200);
}

.comment .children .comment {
  background: var(--warm-50);
  border: none;
  padding: 0.75rem;
}

.comment .children .comment-author {
  font-size: 0.875rem;
}

.comment .children .comment-content p {
  font-size: 0.875rem;
}

/* Comment Form */
.comment-respond {
  margin-top: 1.5rem;
}

.comment-respond .comment-reply-title {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--warm-800);
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--warm-800);
  margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--warm-200);
  border-radius: 0.5rem;
  background: white;
  color: var(--warm-900);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
  border-color: transparent;
}

.comment-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.comment-form .form-submit input[type="submit"] {
  padding: 0.5rem 1.5rem;
  background: var(--warm-800);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comment-form .form-submit input[type="submit"]:hover {
  background: var(--warm-900);
}

/* Hide URL and email fields */
.comment-form-url,
.comment-form-email {
  display: none;
}

/* ========== Post Navigation ========== */
.post-nav {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--warm-200);
}

.post-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--warm-700);
  transition: color 0.2s;
}

.post-nav a:hover {
  color: var(--warm-900);
  text-decoration: underline;
}

/* ========== Section Titles ========== */
.section-title {
  font-family: 'Caveat', cursive;
  font-size: 1.875rem;
  color: var(--warm-800);
  margin-bottom: 1.5rem;
}

/* ========== Footer ========== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--warm-200);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--warm-600);
}

.site-footer .footer-links {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.site-footer a {
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--warm-800);
}

/* ========== Main Content Area ========== */
.site-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

/* ========== Legal Pages ========== */
.legal-page h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.25rem;
  color: var(--warm-800);
  margin-bottom: 2rem;
}

.legal-page .legal-nav {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
}

.legal-page .legal-nav a {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--warm-800);
  transition: color 0.2s;
}

.legal-page .legal-nav a:hover {
  color: var(--warm-900);
}

/* ========== No Comments Message ========== */
.no-comments {
  color: var(--warm-600);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* ========== Moderation Notice ========== */
.comment-awaiting-moderation {
  font-size: 0.75rem;
  color: var(--warm-600);
  font-style: italic;
}

/* ========== WP Core Overrides ========== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Remove WordPress admin bar gap */
html {
  margin-top: 0 !important;
}
