@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat/static/Montserrat-Regular.ttf') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Playwrite';
  src: url('/fonts/Playwrite_DE_SAS/static/PlaywriteDESAS-Regular.ttf') format('woff2');
  font-weight: 400; 
  font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html {
    scroll-behavior: smooth;
}

.recipe-container {
    contain: layout style paint; 
}

.main-content {
    contain: layout style paint;
}

.main-content,
.right-column,
.recipe-info-card {
    will-change: transform;
    transform: translateZ(0);
}

body {
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

main {
    margin: 1.5rem auto;
}

p {
    font-size: 1rem;
    letter-spacing: 0.05rem;
}

.low-opacity {
    opacity: 0.6;
}

.description {
    text-align: center;
}

.list {
    color: #919191;
}

.recipe-container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 1.25rem;
}

.recipe-header {
    background: linear-gradient(90deg, #007A70, #00b3a1, #007A70);
    color: #fff;
    padding: 1.8rem 0;
    margin-top: 2.5rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 1%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

h1 { 
    font-family: "Playwrite"; 
    font-size: 2.5rem; 
    margin-bottom: 0.625rem; 
    color: #00b3a1;
    text-shadow: 0 10px 30px rgb(40, 202, 189); animation: blink 12s infinite; 
    -webkit-animation: blink 12s infinite; 
}

@keyframes blink {
  20%,
  24%,
  55% {
    color: #e0fffb;
    text-shadow: none;
  }

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
  text-shadow: 0 0 5px #31ffea, 0 0 15px #31ffea, 0 0 20px #31ffea, 0 0 40px #31ffea, 0 0 60px #0cb1a3, 0 0 10px #00b3a1, 0 0 98px #007A70;
  }
}

.recipe-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-image {
    width: 30rem;
    height: 20rem;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-content {
    display: grid;
    grid-template-columns: 3fr 5fr 1fr;
    gap: 1rem;
}

.recipe-info-card {
    background: #fff;
    border-radius: 32px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.title {
    font-size: 1.5rem;
    color: #007A70;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 3px solid #00b3a1;
    text-align: center;
}

.subtitle {
    font-size: 1.2rem;
    color: #333;
    margin-block: 1.25rem;
    font-weight: 700;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid #808080;
    text-align: center;
}

.border-bottom:hover:after {
    width: 100%;
}

.ingredient-item {
    padding: 0.625rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px dashed #e1e1e1;
    list-style-type: none;
}

.ingredient-item i {
    filter: brightness(0) saturate(100%) invert(49%) sepia(90%) saturate(430%) hue-rotate(130deg) brightness(94%) contrast(101%);
}

.ingredient-item:last-child {
    border-bottom: none;
}

.instructions-list {
    list-style-type: none;
    counter-reset: instruction-counter;
}

.instructions-item {
    counter-increment: instruction-counter;
    padding: 1.25rem 1rem 1.25rem 3.75rem;
    border-bottom: 1px solid #eee;
    position: relative;
}

.instructions-item:last-child {
    border-bottom: none;
}

.instructions-item::before {
    content: counter(instruction-counter);
    position: absolute;
    left: 0;
    top: 1.1rem;
    width: 2rem;
    height: 2rem;
    background: #00b3a1;
    color: #fff;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.left-column,
.middle-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin-top: 0.9rem;
}

.nutrition-item {
    text-align: center;
    padding: 0.9rem;
    background: #74fff1;
    border-radius: 5%;
}

.nutrition-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #027b6f;
}

.nutrition-label {
    font-size: 1rem;
    color: #007A70;
}

.info-box {
    background: #fff;
    border-radius: 32px;
    padding: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-title {
    font-size: 1.2rem;
    color: #00b3a1;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.tag {
    background: #b1fff7;
    padding: 0.3rem 0.9rem;
    border-radius: 32px;
    font-size: 0.9rem;
    color: #001f1c;
    cursor: pointer;
}

.youtube-video-container {
    position: relative;
    width: 95%;
    padding-bottom: 56.25%;
    height: 0;
    margin: 1.25rem auto;
    overflow: hidden;
    border-radius: 32px;
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #007A70;
    color: #fff;
    border: none;
    border-radius: 48px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: #31ffea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid #007A70;
    color: #007A70;
}

.btn-outline:hover {
    background: #007A70;
    color: #fff;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-direction: column;
}

.rating {
    color: #FFC107;
    margin: 0.625rem 0;
}

@media (max-width: 1130px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 960px) {

    section {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
        border-bottom: 2px solid #e0e0e0;
    }

    section:last-child {
        border-bottom: none;
    }

    .recipe-container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .recipe-image {
        width: 100%;
        max-width: 300px;
        height: 200px;
        margin: 0 auto;
    }
    
    .recipe-meta {
        justify-content: center;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .left-column { order: 1; }
    .middle-column { order: 2; }
    .right-column { order: 3; }
    
    .nutrition-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 820px) and (min-width: 768px) {
    .recipe-header {
        margin-top: 1rem;
        border-radius: 0;
        padding: 1rem 0;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 540px) {

    .recipe-container {
        padding: 0.5rem;
    }
    
    .recipe-header {
        padding: 1rem 0;
        border-radius: 0;
        margin-bottom: 1rem;
        margin-top: 0.8rem;
    }

    :is(.celestial-logo a, .celestial-logo a:visited) {
        margin-right: 2rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .recipe-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .recipe-info-card {
        padding: 1rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .instructions-item {
        padding: 1rem 0 1rem 2.5rem;
    }
    
    .instructions-item::before {
        width: 1rem;
        height: 1rem;
        top: 1.3rem;
        font-size: 0.8rem;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .nutrition-item {
        padding: 0.4rem;
    }
    
    .nutrition-value {
        font-size: 1rem;
    }
    
    .nutrition-label {
        font-size: 0.75rem;
    }
    
    .tags {
        gap: 0.4rem;
    }
    
    .tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {

    .recipe-header {
        margin-top: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }
    
    .recipe-meta {
        font-size: 0.9rem;
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr;
    }

    .instructions-list {
        list-style-position: inside;
    }
    
    .instructions-item {
        padding: 0.8rem 0 0.8rem 2rem;
    }
    
    .instructions-item::before {
        width: 1rem;
        height: 1rem;
        top: 1rem;
        font-size: 0.8rem;
    }
}