.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0 15px; /* Added padding for mobile */
}

.modal-content {
    background-color: #fff;
    margin: 10% auto; /* Changed from 5% to better center vertically */
    padding: 20px; /* Reduced padding for mobile */
    border-radius: 10px;
    width: 100%; /* Full width on mobile */
    max-width: 500px; /* Maintain max width */
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1050px) {
    .modal-content {
        top: 7%;
    }
}

@media (max-width: 1020px) {
    .modal-content {
        top: 10%;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .modal-content {
        margin: 0 auto; /* Remove top margin on very small screens */
        margin-top: 50px; /* Add specific top margin for better positioning */
        padding: 15px; /* Even smaller padding */
        width: 90%; /* Slightly less than full width */
        top: 10%;
    }
    
    .modal-title {
        font-size: 24px; /* Smaller title on mobile */
        margin-bottom: 15px;
    }
    
    .modal-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px; /* Reduced spacing */
    }
    
    .form-input {
        padding: 10px; /* Smaller padding */
    }
    
    .submit-btn {
        padding: 12px; /* Smaller padding */
        font-size: 16px; /* Smaller font */
    }
}

/* Adjust positioning */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* Form adjustments */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    font-size: 16px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #D92126;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
}

.submit-btn:hover {
    background-color: #B91C1C;
}

/* Seiko Case Study Styles */
.title-heading {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 50px;
}

.title-highlight {
    font-size: 1.25rem;
    padding-top: 15px;
    padding-bottom: 20px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .title-highlight {
        text-align: justify;
        font-size: .875rem;
    }
}

.title-sneak {
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 600;
}

@media (max-width: 480px) {
    .title-sneak {
        font-size: 1.4rem;
    }
}

.case-study-hero {
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
    box-shadow: none;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    border: none;
    /* border-radius: 8px; */
    overflow: hidden;
    height: auto;
}

@media (min-width: 768px) {
    .case-study-hero {
        flex-direction: row;
        height: 30rem; /* Fixed height only on desktop */
        /* height: auto; */
        max-height: 30rem;
    }
}
@media (max-width: 480px) {
    .case-study-hero {
        height: auto;
        max-height: 45rem;
    }
}

.hero-image-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 250px;
}

@media (min-width: 768px) {
    .hero-image-container {
        width: 50%;
        min-height: 400px;
    }
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain; /* Changed from cover to contain */
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 16px;
}

.hero-overlay-text {
    font-size: 18px;
    line-height: 1.5;
}

.hero-overlay-highlight {
    color: #FCD34D;
    font-weight: bold;
}

.hero-content {
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px; /* Ensure minimum height for content */
}

@media (min-width: 768px) {
    .hero-content {
        width: 50%;
        padding-right: 20%;
    }
}

@media (max-width: 1797px) and (max-height: 790px) {
    .hero-content {
        padding-right: 24px;
    }
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.4rem;
    }
}

.hero-description {
    color: #4B5563;
    margin-bottom: 24px;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .hero-description {
        font-size: 1rem;
    }
}

.lookDetail {
    margin-top: auto; /* Push the button to the bottom */
    margin-bottom: 15px;
    display: block; /* Ensure it's always visible */
}

/* Updated Sneak Peek Section Styles */
.sneak-peek-section {
    margin-bottom: 60px;
}

.sneak-peek-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #1F2937;
    margin-bottom: 40px;
}

.sneak-peek-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sneak-peek-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .sneak-peek-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sneak-peek-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sneak-peek-card {
    border: none;
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: none;
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    background-color: #D92126;
    color: white;
    padding: 12px 16px;
    font-weight: bold;
}

.card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.download-btn-container {
    position: absolute;
    bottom: 0.30rem;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 15px;
}

.download-btn {
    display: inline-block;
    background-color: #D92126;
    color: white;
    font-weight: bold;
    padding: 8px 24px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}

.download-btn:hover {
    background-color: #B91C1C;
    color: white;
    text-decoration: none;
}

/* Make pagination consistent */
.sneak-peek-section nav {
    display: flex;
    justify-content: center;
}

/* Ensure pagination has the same styles across sections */
.sneak-peek-section .pagination,
.articles .pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.sneak-peek-section .page-item,
.articles .page-item {
    margin: 0 2px;
}

.sneak-peek-section .page-link,
.articles .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    color: #4B5563;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sneak-peek-section .page-link:hover,
.articles .page-link:hover {
    background-color: #F3F4F6;
}

.sneak-peek-section .page-item.active .page-link,
.articles .page-item.active .page-link {
    background-color: #D92126;
    color: white;
    border-color: #D92126;
}

.sneak-peek-section .page-item.disabled .page-link,
.articles .page-item.disabled .page-link {
    color: #9CA3AF;
    cursor: not-allowed;
}

.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 32px;
}