/* Modern Wedding Website Styles */

:root {
    /* Modern color palette with better contrast and accessibility */
    --primary: #d16b6b;
    /* Deeper rose for better contrast and visibility */
    --primary-dark: #b85555;
    /* Darker shade for hover states with 4.5:1 contrast ratio */
    --secondary: #7a9178;
    /* Richer sage green for better visibility */
    --accent: #5e7a9c;
    /* Complementary blue accent for visual interest */
    --text-dark: #2d2d2d;
    /* Darker text for better readability (7:1 contrast ratio) */
    --text-light: #ffffff;
    --background-light: #f8f5f2;
    /* Warm off-white for better eye comfort */
    --background-card: #ffffff;
    --border-light: #e0e0e0;
    /* Slightly darker for better definition */
    --shadow-soft: rgba(0, 0, 0, 0.05);
    /* Consistent shadow color */
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.12);

    /* Improved font sizes with better scaling for readability */
    --font-size-display: clamp(2.75rem, 7vw, 4.5rem);
    /* Hero title - slightly smaller for better readability */
    --font-size-h1: clamp(2.25rem, 5vw, 3.25rem);
    --font-size-h2: clamp(1.75rem, 4vw, 2.25rem);
    --font-size-h3: clamp(1.35rem, 3vw, 1.75rem);
    --font-size-body: clamp(1rem, 1.5vw, 1.125rem);
    /* Slightly larger body text for better readability */
    --font-size-small: clamp(0.875rem, 1vw, 0.95rem);

    /* Spacing system for consistent layout */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
}

/* Base styles with improved typography and readability */
body {
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    /* Slightly tighter tracking for headings */
    margin-top: 0;
}

p,
li,
a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    /* Increased from 300 for better readability */
    max-width: 70ch;
    /* Optimal line length for readability */
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

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

/* Improved focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Enhanced button styles with better accessibility and modern design */
.btn-primary,
.btn-outline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.85rem 2.25rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    box-shadow: 0 2px 4px var(--shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--shadow-soft);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--primary);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-soft);
    text-decoration: none;
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--shadow-soft);
}

/* Button with icon support */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Enhanced card styles with subtle depth and better transitions */
.card {
    background-color: var(--background-card);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    /* Ensure consistent height in grid layouts */
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-medium);
}

/* Card variations */
.card-flat {
    box-shadow: none;
    border: 1px solid var(--border-light);
}

.card-interactive {
    cursor: pointer;
}

.card-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: var(--space-xl);
}

.card-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border-light);
    background-color: rgba(0, 0, 0, 0.01);
}

/* Enhanced hero section with improved visual hierarchy and background handling */
.hero-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/zareczyny_serce.jpg');
    background-size: cover;
    background-position: center 25%;
    position: relative;
    overflow: hidden;
}

/* Add subtle texture overlay for depth */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDIiPjwvcmVjdD4KPC9zdmc+');
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    padding: 10rem 1rem;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-display);
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-date {
    font-size: var(--font-size-h2);
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-md);
}

.hero-date::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--text-light);
}

/* Enhanced countdown styling with modern design elements */
.countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1.25rem;
    max-width: 650px;
    margin: 0 auto;
}

.countdown-item {
    background-color: var(--background-card);
    padding: 1.75rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 8px 20px var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--shadow-medium);
}

/* Add subtle accent line */
.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary);
    opacity: 0.8;
}

.countdown-number {
    font-size: 3rem;
    font-weight: 500;
    color: var(--primary);
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: var(--font-size-small);
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    opacity: 0.8;
}

/* Enhanced section styling with improved visual hierarchy */
.section-title {
    font-size: var(--font-size-h2);
    color: var(--primary);
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 1.25rem;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

/* Section variations */
.section-light {
    background-color: var(--background-light);
    position: relative;
}

.section-dark {
    background-color: var(--text-dark);
    color: var(--text-light);
}

.section-accent {
    background-color: rgba(209, 107, 107, 0.08);
    /* Light primary color */
    position: relative;
}

/* Add subtle texture to sections */
.section-texture {
    position: relative;
}

.section-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9IjAuMDIiPjwvcmVjdD4KPC9zdmc+');
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.section-content {
    position: relative;
    z-index: 1;
}

/* Enhanced photo gallery with modern masonry-style layout */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
}

/* Modern photo frame styling */
.photo-frame {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px var(--shadow-soft);
    transition: all 0.3s ease;
    background-color: var(--background-card);
    height: 100%;
}

.photo-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-medium);
}

.photo-frame img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: all 0.5s ease;
    display: block;
}

.photo-frame:hover img {
    transform: scale(1.03);
}

/* Caption styling with better readability */
.photo-frame p {
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 400;
    margin: 0;
}

/* Masonry-style layout variations */
.photo-grid-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.photo-grid-masonry .photo-item:nth-child(4n+1) {
    grid-row: span 2;
}

.photo-grid-masonry .photo-item:nth-child(5n+3) {
    grid-column: span 2;
}

/* Lightbox effect for gallery */
.photo-lightbox {
    cursor: pointer;
    position: relative;
}

.photo-lightbox::after {
    content: '+';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-lightbox:hover::after {
    opacity: 1;
}

/* Enhanced contact cards with modern design and better accessibility */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.25rem 1.75rem;
    background-color: var(--background-card);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px var(--shadow-medium);
    transition: all 0.3s ease;
    border: 1px solid rgba(209, 107, 107, 0.1);
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-medium);
    border-color: var(--primary);
}

/* Modern profile image styling */
.contact-image,
.rounded-full {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 20px var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    filter: brightness(1.05);
}

.contact-image:hover,
.rounded-full:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px var(--shadow-strong);
    border-color: var(--accent);
}

.contact-name {
    font-size: var(--font-size-h3);
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-role {
    font-size: var(--font-size-body);
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info {
    font-size: var(--font-size-small);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Enhanced contact links */
.contact-info a {
    position: relative;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
}

.contact-info a:hover {
    background-color: rgba(209, 107, 107, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Enhanced form styling with better accessibility and visual feedback */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: var(--font-size-small);
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: var(--font-size-body);
    transition: all 0.2s ease;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.form-control:hover {
    border-color: #c0c0c0;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(209, 107, 107, 0.15);
    background-color: #ffffff;
}

/* Custom radio and checkbox styling */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.form-check-input {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check-label {
    font-size: var(--font-size-body);
    cursor: pointer;
}

/* Form validation styling */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.form-control.is-invalid~.invalid-feedback {
    display: block;
}

/* Enhanced Q&A section with modern accordion-style design */
.qa-item {
    padding: 2rem;
    border-radius: 0.75rem;
    background-color: var(--background-card);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px var(--shadow-soft);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qa-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--shadow-medium);
}

/* Add subtle accent decoration */
.qa-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(209, 107, 107, 0.08), transparent 70%);
    pointer-events: none;
}

.qa-question {
    font-size: var(--font-size-h3);
    color: var(--primary);
    font-weight: 500;
    position: relative;
    padding-right: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.qa-question:hover {
    color: var(--primary-dark);
}

.qa-question::after {
    content: '+';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    color: var(--primary);
    transition: transform 0.3s ease, color 0.2s ease;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 22px;
}

.qa-item.active {
    background-color: #fff;
    box-shadow: 0 12px 28px var(--shadow-medium);
}

.qa-item.active .qa-question {
    color: var(--primary-dark);
    font-weight: 600;
}

.qa-item.active .qa-question::after {
    transform: translateY(-50%) rotate(45deg);
    color: var(--primary-dark);
}

.qa-answer {
    font-size: var(--font-size-body);
    color: var(--text-dark);
    line-height: 1.7;
    padding-top: 0.5rem;
    transition: all 0.3s ease;
}

/* Enhanced footer with modern design elements */
.footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    border-top: 4px solid var(--primary);
}

/* Add decorative elements */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    /* Removed the top border since we're using border-top on the footer */
    background: linear-gradient(to right, var(--primary), var(--accent), var(--secondary));
}

.footer-title {
    font-size: var(--font-size-h2);
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.footer-text {
    font-size: var(--font-size-body);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    opacity: 0.9;
}

.footer-hashtag {
    font-size: var(--font-size-h3);
    color: var(--primary);
    margin-bottom: 2.5rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 0.75rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(209, 107, 107, 0.3);
}

.footer-hashtag::before,
.footer-hashtag::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.footer-hashtag::before {
    left: -15px;
}

.footer-hashtag::after {
    right: -15px;
}

.footer-copyright {
    font-size: var(--font-size-small);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3rem;
    padding: 0.5rem 1rem;
    display: inline-block;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced animations with smoother transitions */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for multiple items */
.fade-in:nth-child(2) {
    transition-delay: 0.1s;
}

.fade-in:nth-child(3) {
    transition-delay: 0.2s;
}

.fade-in:nth-child(4) {
    transition-delay: 0.3s;
}

/* Slide animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom animation */
.zoom-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Enhanced responsive adjustments */
@media (max-width: 1024px) {
    :root {
        --font-size-display: clamp(2.5rem, 6vw, 4rem);
        --font-size-h1: clamp(2rem, 4.5vw, 3rem);
        --font-size-h2: clamp(1.6rem, 3.5vw, 2rem);
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 7rem 1rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-image,
    .rounded-full {
        width: 110px;
        height: 110px;
    }

    .countdown-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
    }

    .section-title {
        margin-bottom: 2.5rem;
    }

    .photo-frame img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .countdown-item {
        padding: 1.25rem 0.75rem;
    }

    .countdown-number {
        font-size: 2.25rem;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }

    .hero-content {
        padding: 6rem 1rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .qa-item {
        padding: 1.5rem 1.25rem;
    }

    .footer {
        padding: 3.5rem 0 2.5rem;
    }
}