/* General Styles */
:root {
    --light-background: #fff0e3;
    --dark-background: #fedcc1;
    --text: #34547f;
    --text-highlight: #85aad3;
    --logo-brown: #d17f81;
    --button-green: #6e8879;
}

body {
    font-family: 'Monserrat', sans-serif;
    color: var(--text);
    background-color: var(--light-background);
}

a {
    color: var(--logo-brown);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover, 
a:focus {
    color: var(--logo-brown);
    text-decoration: underline;
}

.bg-light {
    background-color: var(--light-background) !important;
}

.bg-dark {
    background-color: var(--dark-background) !important;
}

/* Navigation */
.navbar-light .navbar-nav .nav-link {
    color: var(--text);
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link.active 
.navbar-brand {
    color: var(--text-highlight);
}

/* Main Content */
h1 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.issue-description {
    line-height: 1.7;
}

/* Cover Carousel */
.cover-carousel {
    position: relative;
    background-color: transparent;
    overflow: visible;
    max-width: 100%;
    max-height: 700px;
    width: auto; /* Auto width based on content */
    margin: 0 auto;
}

/* Carousel Items */
.carousel-inner, .carousel-item {
    height: auto;
    max-height: 700px;
    width: 100%;
}

.carousel-item {
    text-align: center; /* Center the content */
    transition: transform .6s ease-in-out;
    position: relative;
}

/* Image Styling */
.cover-image {
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 5px;
    background-color: #ccc;
    opacity: 0.7;
}

.carousel-indicators button.active {
    background-color: var(--logo-brown);
    opacity: 1;
}

/* Prevent carousel height animation during slide transition */
#coverCarousel .carousel-inner {
    display: block;
    overflow: hidden;
}

#coverCarousel .carousel-item {
    top: 0;
    opacity: 0;
    display: block;
    position: absolute;
    width: 100%;
}

#coverCarousel .carousel-item.active {
    opacity: 1;
    position: relative;
}

/* Create a wrapper for the image to set proper boundaries */
#coverCarousel .carousel-inner::after {
    content: "";
    display: block;
    clear: both;
}

/* Carousel Navigation Controls */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.carousel-control-prev {
    left: -50px; /* Fixed position outside */
}

.carousel-control-next {
    right: -50px; /* Fixed position outside */
}

/* Control Icons */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d17f81'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d17f81'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Price Bubble 
.price-bubble {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #85AAD3;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border: 2px solid white;
}*/

/* Price Image */
.price-image {
    position: absolute;
    max-width: 70px;
    top: 0;           /* Position at the top of the image */
    right: 0;         /* Position at the right of the image */
    transform: translate(30%, -30%);  /* Move it to partially overlap corner */
    z-index: 10;      /* Ensure it's above the image */

}

.price-image img {
    width: 100%;
    height: auto;
}

/* Fix for price image positioning */
.price-image {
    position: absolute !important; /* Force override any conflicting styles */
    top: 0 !important;
    right: 0 !important;
    width: 70px !important;
    height: auto !important;
    z-index: 1000 !important; /* Very high z-index to force it above everything */
    pointer-events: none; /* So it doesn't interfere with clicks */
}

.price-image img {
    width: 100% !important;
    height: auto !important;
    transform: translate(10px, -10px) !important;
    display: block !important;
}

/* Reset any potential conflicts with carousel positioning */
#coverCarousel .carousel-item {
    overflow: visible !important;
}

/* Make absolutely sure the carousel does not hide overflow */
.carousel-inner, 
.carousel, 
.cover-carousel,
.col-md-6.position-relative {
    overflow: visible !important;
}

/* Responsive adjustments for price image */
@media (max-width: 991.98px) {
    .price-image {
        max-width: 65px;
    }
}

@media (max-width: 767.98px) {
    .price-image {
        max-width: 60px;
    }
}

@media (max-width: 575.98px) {
    .price-image {
        max-width: 50px;
    }
}

/* Button Styles */
.btn-primary {
    background-color: var(--button-green);
    border-color: var(--button-green);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--logo-brown); 
    border-color: var(--logo-brown);
}

/* Newsletter Section */
.newsletter-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 30px;
}

/* Footer */
footer {
    background-color: var(--light-background);
    color: var(--logo-brown);
}

footer a {
    color: var(--logo-brown);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: var(--logo-brown);
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--logo-brown);
}

.social-icons a:hover {
    color: var(--logo-brown);
}

/* Container setup */
.col-md-6.position-relative {
    overflow: visible;
}

/* Yarn bullet points - applied to all ULs in the issue description */
.issue-description ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    caret-color: rgb(43, 43, 43); 
    color: rgb(43, 43, 43); 
    font-family: Montserrat, sans-serif; 
    font-size: 16px; 
    font-style: normal; 
    font-variant-caps: normal; 
    letter-spacing: normal; 
    orphans: auto; 
    text-align: left; 
    text-indent: 0px; 
    text-transform: none; 
    white-space: normal; 
    widows: auto; 
    word-spacing: 0px; 
    -webkit-text-stroke-width: 0px; 
    text-decoration: none;
}

.issue-description ul li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.issue-description ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 25px;
    height: 25px;
    background-image: url('../img/yarn-ikona.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.issue-description h2 {
    caret-color: rgb(43, 43, 43); 
    color: rgb(43, 43, 43); 
    font-family: Montserrat, sans-serif; 
    font-size: 20px; 
    font-style: normal; 
    font-variant-caps: normal; 
    letter-spacing: normal; 
    orphans: auto; 
    text-align: left; 
    text-indent: 0px; 
    text-transform: none; 
    white-space: normal; 
    widows: auto; 
    word-spacing: 0px; 
    -webkit-text-stroke-width: 0px; 
    text-decoration: none;
    font-weight: bold;
}


/* Make Mailerlite display newsletter confirmation aligned middle */
.ml-form-successContent h4 {
    text-align: center !important;
}

.ml-form-successContent p {
    text-align: center !important;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .carousel-control-prev {
        left: -45px;
    }
    
    .carousel-control-next {
        right: -45px;
    }
}

@media (max-width: 1200px) {
    .carousel-control-prev {
        left: -40px;
    }
    
    .carousel-control-next {
        right: -40px;
    }
}

@media (max-width: 992px) {
    .carousel-control-prev {
        left: -35px;
    }
    
    .carousel-control-next {
        right: -35px;
    }
    
    .price-bubble {
        width: 55px;
        height: 55px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Adjust price bubble size */
    .price-bubble {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }
    
    /* Create space with a wrapper padding */
    .col-md-6.position-relative {
        padding: 0 40px;
        margin-top: 30px; /* Adds space above the carousel when stacked */
    }
    
    /* Adjust the controls for smaller screens */
    .carousel-control-prev {
        left: 0;
    }
    
    .carousel-control-next {
        right: 0;
    }
}

@media (max-width: 576px) {
    .price-bubble {
        width: 45px;
        height: 45px;
        font-size: 0.85rem;
    }
    
    /* Make icons slightly smaller on mobile */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 18px;
        height: 18px;
    }
}

/* Responsive Logo Swap */
.desktop-logo {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.mobile-logo {
    display: none;
    margin: 0 auto;
    max-width: 80%;
}

@media (max-width: 767.98px) {
    .desktop-logo {
        display: none;
    }
    
    .mobile-logo {
        display: block;
    }
    
    /* Optional: Adjust header padding for the more compact logo */
    header.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Archive Page Specific Styles */
/* Add these styles to the end of your front.css file */

/* Archive Issue Cards */
.archive-issue-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    overflow: hidden;
}

.archive-issue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Image Wrapper */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.archive-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.archive-issue-card:hover .archive-cover-image {
    transform: scale(1.05);
}

/* Archive Price Badge */
.archive-price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--text-highlight);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Card Image Placeholder */
.card-img-placeholder {
    height: 300px;
    background-color: var(--light-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0.6;
}

.card-img-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.card-img-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Card Body */
.archive-issue-card .card-body {
    padding: 1.5rem;
    background-color: white;
}

.archive-issue-card .card-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Issue Excerpt */
.issue-excerpt {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Archive page separator */
.archive-separator {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--text-highlight), transparent);
    opacity: 0.3;
    margin: 3rem 0;
}

/* Archive grid responsive adjustments */
@media (max-width: 991.98px) {
    .card-img-wrapper {
        height: 250px;
    }
}

@media (max-width: 767.98px) {
    .card-img-wrapper {
        height: 200px;
    }
    
    .archive-issue-card .card-body {
        padding: 1.25rem;
    }
    
    .archive-price-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Navigation active state for archive page */
.navbar-nav .nav-link.active {
    color: var(--text-highlight) !important;
    font-weight: 600;
}

/* Archive Preview Section on Main Page */
.archive-preview-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.archive-preview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.archive-preview-image-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.archive-preview-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.archive-preview-placeholder {
    width: 100%;
    max-width: 200px;
    height: 280px;
    background-color: var(--light-background);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0.6;
    margin: 0 auto 1rem;
}

.archive-preview-placeholder i {
    font-size: 2.5rem;
}

.archive-preview-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.btn-outline-primary {
    border-color: var(--button-green);
    color: white;
    background-color: var(--button-green); 
    font-weight: 600; 
}

.btn-outline-primary:hover {
    background-color: var(--logo-brown);
    border-color: var(--logo-brown);
    color: white;
}

/* Archive Page Specific Styles */
/* Add these styles to the end of your front.css file */

/* Archive Issue Cards */
.archive-issue-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    overflow: hidden;
}

.archive-issue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Image Wrapper */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.archive-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.archive-issue-card:hover .archive-cover-image {
    transform: scale(1.05);
}

/* Archive Price Badge */
.archive-price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--text-highlight);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Card Image Placeholder */
.card-img-placeholder {
    height: 300px;
    background-color: var(--light-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0.6;
}

.card-img-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.card-img-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Card Body */
.archive-issue-card .card-body {
    padding: 1.5rem;
    background-color: white;
}

.archive-issue-card .card-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Issue Excerpt */
.issue-excerpt {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Archive page separator */
.archive-separator {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--text-highlight), transparent);
    opacity: 0.3;
    margin: 3rem 0;
}

/* Archive grid responsive adjustments */
@media (max-width: 991.98px) {
    .card-img-wrapper {
        height: 250px;
    }
}

@media (max-width: 767.98px) {
    .card-img-wrapper {
        height: 200px;
    }
    
    .archive-issue-card .card-body {
        padding: 1.25rem;
    }
    
    .archive-price-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Navigation active state for archive page */
.navbar-nav .nav-link.active {
    color: var(--text-highlight) !important;
    font-weight: 600;
}