/*
Theme Name: Hanna och Johan
Description: A custom wedding theme for Hanna and Johan's wedding website
Version: 1.0.0
Author: Custom Development
Text Domain: hannaochjohan
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: #580370;
    text-decoration: none;
}

a:hover {
    color: #580370;
    text-decoration: none;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #000000;
    /* background-color: #fafafa; */
    background-color: #FFFFFF;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: #000;
}

h2 {
    font-size: 2rem;
    color: #000;
}

h3 {
    font-size: 2rem;
    color: #000;
}

p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #000;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 1.8rem;
    color: #000;
    text-decoration: none;
}

/* Navigation Styles */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.main-navigation a:hover {
    color: #000;
}

/* Menu Toggle Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    color: #000;
    position: relative;
    z-index: 1001;
}

.menu-toggle:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* Hamburger Icon */
.menu-toggle::before {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.menu-toggle::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    transition: all 0.3s ease;
}

/* Hamburger Animation - X when active */
.menu-toggle[aria-expanded="true"]::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"]::after {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile and Tablet Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        backdrop-filter: blur(10px);
    }

    .main-navigation ul.active {
        right: 0;
    }

    .main-navigation a {
        font-size: 1.5rem;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .main-navigation a:hover {
        background-color: rgba(231, 76, 60, 0.1);
        color: #000;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        max-width: 400px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-navigation ul.active {
        right: 0;
    }

    .main-navigation a {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .main-navigation a:hover {
        background-color: rgba(231, 76, 60, 0.1);
        color: #000;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 400px;
    /* Use CSS variable for background image set from PHP, fallback to placeholder */
    background-image: var(--hero-bg-url, url('assets/images/hero-placeholder.jpg'));
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #FFFFFF;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: white;
}

.invite-section {
    position: relative;
    min-height: 30vh;
    margin-top: 1rem;
    /* background: linear-gradient(rgba(1, 1, 107, 0.4), rgba(30, 0, 99, 0)), url('assets/images/hero-placeholder.jpg'); */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem 1rem;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: #000;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); */
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 0rem;
    color: #000;
    /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #580370;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #580370;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #580370;
    color: #580370;
}

.btn-secondary:hover {
    background-color: white;
    color: #580370;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Wedding Details Section */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.detail-item {
    text-align: center;
    padding: 2rem;
    background-color: #EEEEF2;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.detail-item h3 {
    color: #580370;
    margin-bottom: 1rem;
}

/* Invite Code Form */
.invite-code-form {
    margin-top: 2rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.invite-code-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.invite-code-form input {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

/* Gallery */
.gallery-preview {
    padding: 4rem 0;
    text-align: center;
    background-color: #FFFFFF !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
}

.gallery-item-content {
    padding: 1rem;
    background-color: white;
}

.gallery-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #000;
}

.gallery-item-description {
    color: #000;
    font-size: 0.9rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Footer */
.site-footer {
    /* background-color: #580370; */
    color: #000;
    font-size: 0.5rem;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
        min-height: 300px;
        background-size: contain;
        background-position: center center;
    }

    .invite-section {
        min-height: auto;
        margin-top: 1rem;
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

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

    .invite-code-form .form-group {
        flex-direction: column;
    }

    .invite-code-form input {
        min-width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-section {
        height: 40vh;
        min-height: 250px;
        background-size: contain;
        background-position: center center;
    }

    .invite-section {
        min-height: auto;
        margin-top: 1rem;
        padding: 1.5rem 1rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        height: 60vh;
        min-height: 350px;
        background-size: contain;
        background-position: center center;
    }

    .invite-section {
        min-height: 25vh;
        margin-top: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.error {
    color: #e74c3c;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    text-align: center;
}

.success {
    color: #0a6530;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    text-align: center;
}