/* Custom Fonts */
@font-face {
    font-family: 'Britaniya';
    /* Use ONLY this single font file */
    src: url("/Fonts/britania-vintage-Font/Britaniya%20Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Backward-compatible alias (maps to same single file) */
@font-face {
    font-family: 'Britania Vintage';
    src: url("/Fonts/britania-vintage-Font/Britaniya%20Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Reveal on scroll – smooth timing and easing */
.wm-reveal {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition:
        opacity 850ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 850ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.wm-reveal.wm-reveal--left {
    transform: translate3d(-28px, 0, 0);
}

.wm-reveal.wm-reveal--right {
    transform: translate3d(28px, 0, 0);
}

.wm-reveal.wm-reveal--scale {
    transform: translate3d(0, 18px, 0) scale(0.98);
}

.wm-reveal.is-visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* Homepage section description (under section title) */
.wedding-mele-section-description {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #2F4F75;
    line-height: 1.6;
    max-width: 95%;
    margin: 16px auto 0;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .wm-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Section skeleton while content/images load */
.wm-section-loading {
    position: relative;
    min-height: 120px;
}

.wm-section-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        #f1f3f5 0%,
        #f1f3f5 40%,
        #e9ecef 50%,
        #f1f3f5 60%,
        #f1f3f5 100%
    );
    background-size: 200% 100%;
    animation: wm-skeleton-shimmer 1.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.wm-section-loading > * {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.wm-section-loaded > * {
    opacity: 1;
}

@keyframes wm-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

body {
    font-family: 'Jost', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles – sticky/fixed, hide on scroll down, show on scroll up */
.wedding-header {
    width: 100%;
    font-family: 'Volkhov', serif;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    transition: transform 0.3s ease;
}
.wedding-header.header-hidden {
    transform: translateY(-100%);
}

/* Top Header - Dark Blue */
.top-header {
    background-color: #2F4F75;
    color: #ffffff;
    padding: 6px 0;
    position: relative;
    z-index: 10002;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.top-header-spacer,
.top-header-left {
    flex: 1;
    min-width: 0;
}

.top-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
}

.top-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.save-date-text {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    font-family: 'Volkhov', serif;
}

.date-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.wedding-date {
    font-size: 16px;
    font-weight: 400;
    font-family: 'Volkhov', serif;
}

/* Top header left – "Countdown to Wedding" + days (one row) */
.top-header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.top-header-countdown-title {
    font-family: 'Volkhov', serif;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.top-header-countdown-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.top-header-countdown-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    background-color: #ffffff;
    border-radius: 5px;
    padding: 4px 10px;
    min-width: 44px;
    border: 1px solid rgba(47, 79, 117, 0.2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.top-header-countdown-number {
    display: inline;
    font-family: 'Volkhov', serif;
    font-size: 14px;
    font-weight: 700;
    color: #2F4F75;
    line-height: 1.2;
}

.top-header-countdown-label {
    display: inline;
    font-size: 14px;
    font-weight: 500;
    color: #2F4F75;
    text-transform: capitalize;
}

/* Login Button – default white, hover transparent */
.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid #ffffff;
    color: #2F4F75;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Volkhov', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.login-btn:hover {
    background-color: transparent;
    color: #ffffff;
}

.login-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

/* User Welcome Section */
.user-welcome-section {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    z-index: 10001;
}

.welcome-text {
    font-size: 15px;
    font-weight: 400;
    font-family: 'Volkhov', serif;
    color: #ffffff;
    white-space: nowrap;
}

.top-header .welcome-text {
    font-size: 12px;
}

.header-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    display: block;
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-header .header-profile-img,
.top-header .header-profile-initials {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.header-profile-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #2F4F75;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Volkhov', serif;
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-profile-img:hover,
.header-profile-initials:hover {
    border-color: #ffd205;
    transform: scale(1.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000 !important;
    padding: 8px 0;
}

.user-welcome-section:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #2F4F75;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Volkhov', serif;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #E6F3FF;
    color: #0055A5;
}

.dropdown-form {
    margin: 0;
    padding: 0;
}

.logout-btn {
    color: #dc3545 !important;
}

.logout-btn:hover {
    background-color: #fff5f5 !important;
    color: #c82333 !important;
}

/* Main Header - Light Blue/White */
.main-header {
    background: linear-gradient(135deg, #E6F3FF 0%, #F0F8FF 100%);
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.main-header .navbar {
    padding: 0;
    justify-content: space-between;
}

.main-header .navbar-brand {
    padding: 0;
    margin-right: 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.main-header .navbar-brand:hover {
    opacity: 0.8;
}

.main-header .navbar-collapse {
    flex-grow: 0;
}

/* Ensure book appointment button is always clickable */
.header-right .book-appointment-btn,
.navbar-collapse .book-appointment-btn,
#navbarNav .book-appointment-btn {
    z-index: 10000 !important;
    pointer-events: auto !important;
    position: relative !important;
}

.wedding-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* Right Side - Navigation */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    justify-content: flex-end;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    color: #0055A5;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Volkhov', serif;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background-color: #0055A5;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.nav-link:hover {
    color: #003d7a;
    text-decoration: none;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    font-weight: 700;
    color: #003d7a;
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.book-appointment-btn,
a.book-appointment-btn,
a.book-appointment-btn:link,
a.book-appointment-btn:visited,
a.book-appointment-btn:hover,
a.book-appointment-btn:active,
a.book-appointment-btn:focus {
    background-color: #A3A5C7 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 5px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Volkhov', serif;
    box-shadow: 0 2px 8px rgba(163, 165, 199, 0.3);
    text-decoration: none !important;
    display: inline-block !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 9999 !important;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Button Animation Code - Commented Out
.book-appointment-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.book-appointment-btn > * {
    position: relative;
    z-index: 2;
}
*/

/* Button Animation - Commented Out
.book-appointment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.book-appointment-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #B8D3D1;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
    animation: wedding-button-border-draw 1.2s ease-out forwards;
    animation-play-state: paused;
}
*/

.book-appointment-btn:hover,
.book-appointment-btn:focus,
.book-appointment-btn:active,
.book-appointment-btn:visited {
    background-color: #8B8DB0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 165, 199, 0.4);
    text-decoration: none !important;
    color: #ffffff;
}

/* Button Animation Hover - Commented Out
.book-appointment-btn:hover::before {
    left: 100%;
}

.book-appointment-btn:hover::after {
    opacity: 1;
    animation-play-state: running;
    box-shadow: 0 0 15px rgba(184, 211, 209, 0.5);
}
*/

/* Button Border Animation - Commented Out
@keyframes wedding-button-border-draw {
    0% {
        clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
    }
    25% {
        clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 100%);
    }
    50% {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    75% {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    100% {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
}
*/

/* Main Content - top spacing matches fixed header height (set by header.js, fallback 120px) */
main {
    min-height: calc(100vh - 200px);
    padding-top: var(--header-height, 120px);
}

.wedding-mele-welcome-content {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F0F8FF 0%, #E6F3FF 100%);
    padding: 60px 20px;
}

.wedding-mele-welcome-section {
    text-align: center;
    color: #0055A5;
}

.wedding-mele-welcome-title {
    font-family: 'Jost', sans-serif;
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 20px;
}

.wedding-mele-welcome-text {
    font-family: 'Jost', sans-serif;
    font-size: 20px;
    font-weight: 400;
}

/* Bootstrap Navbar Toggler Customization */
.navbar-toggler {
    border: 2px solid #0055A5;
    padding: 8px 12px;
    border-radius: 5px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 85, 165, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 85, 165, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Design */

/* Desktop - Keep as is (lg and above) */
@media (min-width: 992px) {
    .main-header {
        padding: 10px 0;
    }

    .wedding-logo {
        width: 110px;
        height: 110px;
    }

    .main-nav {
        gap: 25px;
    }
    
    .header-right {
        gap: 20px;
        margin-left: auto;
        justify-content: flex-end;
    }

    .navbar-collapse {
        flex-grow: 0;
    }

    .nav-link {
        font-size: 15px;
    }

    .book-appointment-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Desktop menu from 1025px (Bootstrap xl is 1200px; we want expand at 1025px) */
@media (min-width: 1025px) {
    .main-header .navbar-expand-xl .navbar-toggler {
        display: none !important;
    }

    .main-header .navbar-expand-xl .navbar-collapse {
        display: flex !important;
    }
}

/* Tablet (768px - 1024px): collapsed by default; when opened, show dropdown like mobile */
@media (min-width: 768px) and (max-width: 1024px) {
    .main-header .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(0, 85, 165, 0.1);
    }

    .main-header .navbar-collapse.show .header-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 15px;
    }

    .main-header .navbar-collapse.show .main-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 12px;
    }

    .main-header .navbar-collapse.show .nav-link {
        padding: 8px 0;
        width: 100%;
    }

    .main-header .navbar-collapse.show .book-appointment-btn {
        width: 100%;
    }
}

/* iPad Pro and Large Tablets (768px - 991px) */
@media (max-width: 991.98px) {
    .wedding-logo {
        width: 100px;
        height: 100px;
    }

    .main-header {
        padding: 15px 0;
    }

    .navbar-collapse {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 85, 165, 0.1);
    }

    .header-right {
        gap: 15px;
    }

    .main-nav {
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-link {
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 85, 165, 0.1);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .book-appointment-btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* iPad and Small Tablets (576px - 767px) */
@media (max-width: 767.98px) {
    .top-header-content {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }

    .top-header-left {
        justify-content: flex-start;
    }

    .top-header-right {
        margin-left: auto;
    }

    .login-btn {
        padding: 8px 14px;
        font-size: 15px;
    }

    .welcome-text {
        font-size: 13px;
    }

    .header-profile-img,
    .header-profile-initials {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .login-icon {
        width: 18px;
        height: 18px;
    }

    .wedding-logo {
        width: 90px;
        height: 90px;
    }

    .main-header {
        padding: 12px 0;
    }

    .navbar-collapse {
        margin-top: 15px;
        padding-top: 15px;
    }

    .main-nav {
        gap: 15px;
    }

    .nav-link {
        font-size: 14px;
        padding: 8px 0;
    }

    .book-appointment-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .wedding-mele-welcome-content {
        padding: 40px 20px;
    }

    .wedding-mele-welcome-title {
        font-size: 32px;
    }

    .wedding-mele-welcome-text {
        font-size: 16px;
    }
}

/* Mobile Devices (max-width: 575px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }

    .top-header {
        padding: 10px 0;
    }

    .top-header-content {
        gap: 8px;
        flex-wrap: wrap;
    }

    .top-header-spacer {
        display: none;
    }

    .top-header-left {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .top-header-countdown-title {
        font-size: 11px;
        text-align: center;
    }

    .top-header-countdown-wrapper {
        gap: 5px;
        justify-content: center;
    }

    .top-header-countdown-box {
        padding: 3px 8px;
        min-width: 38px;
    }

    .top-header-countdown-number {
        font-size: 12px;
    }

    .top-header-countdown-label {
        font-size: 12px;
    }

    .top-header-center {
        flex: 1 1 100%;
        justify-content: center;
    }

    .top-header-right {
        justify-content: center;
        width: 100%;
        margin-top: 8px;
    }

    .welcome-text {
        font-size: 12px;
    }

    .header-profile-img,
    .header-profile-initials {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .user-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        z-index: 10000 !important;
    }

    .user-welcome-section:hover .user-dropdown {
        transform: translateX(-50%) translateY(0);
    }

    .top-header-right {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .welcome-text {
        font-size: 12px;
    }

    .header-profile-img,
    .header-profile-initials {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .user-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        z-index: 10000 !important;
    }

    .user-welcome-section:hover .user-dropdown {
        transform: translateX(-50%) translateY(0);
    }

    .login-btn {
        padding: 8px 14px;
        font-size: 15px;
    }

    .login-icon {
        width: 18px;
        height: 18px;
    }

    .save-date-text {
        font-size: 16px;
    }

    .wedding-date {
        font-size: 16px;
    }

    .calendar-icon {
        width: 24px;
        height: 24px;
    }

    .wedding-logo {
        width: 80px;
        height: 80px;
    }

    .main-header {
        padding: 10px 0;
    }

    .navbar-toggler {
        padding: 6px 10px;
        font-size: 14px;
    }

    .navbar-collapse {
        margin-top: 12px;
        padding-top: 12px;
    }

    .main-nav {
        gap: 12px;
    }

    .nav-link {
        font-size: 13px;
        padding: 8px 0;
    }

    .book-appointment-btn {
        padding: 10px 18px;
        font-size: 13px;
        width: 100%;
    }

    .wedding-mele-welcome-content {
        padding: 30px 15px;
    }

    .wedding-mele-welcome-title {
        font-size: 28px;
    }

    .wedding-mele-welcome-text {
        font-size: 14px;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .wedding-logo {
        width: 70px;
        height: 70px;
    }

    .save-date-text,
    .wedding-date {
        font-size: 15px;
    }

    .calendar-icon {
        width: 22px;
        height: 22px;
    }

    .login-btn {
        padding: 7px 12px;
        font-size: 14px;
    }

    .login-icon {
        width: 16px;
        height: 16px;
    }

    .nav-link {
        font-size: 12px;
    }

    .book-appointment-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}
