@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Bebas+Neue&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

:root {
    --parchment: #f4e8d0;
    --parchment-dark: #e8d4a7;
    --leather: #8b4513;
    --leather-dark: #5d2f0b;
    --ink: #2c1810;
    --gold: #d4a574;
    --burgundy: #8b2635;
    --forest-green: #2d5016;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(180deg, #f5f0e6 0%, #e8dcc4 100%);
    color: var(--ink);
    font-size: 22px;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e5e5e5;
}

body.dark-mode .torn-edge {
    background: #3a3a3a;
    color: #e5e5e5;
}

body.dark-mode .paper-texture {
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.05) 2px,
            rgba(255, 255, 255, 0.05) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.05) 2px,
            rgba(255, 255, 255, 0.05) 4px
        );
}

body.dark-mode .radio-dial {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-color: #0f3460;
}

body.dark-mode .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .postal-stamp {
    background: #2a2a2a;
    border-color: #555;
    color: #e5e5e5;
}

body.dark-mode .historical-title {
    color: #d4a574;
}

body.dark-mode h2.historical-title,
body.dark-mode h3.historical-title {
    color: #fbbf24;
}

/* Floating Dark Mode Toggle */
.floating-toggle {
    position: fixed;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    z-index: 9999;
    transition: right 0.3s ease;
}

.floating-toggle:hover {
    right: 10px;
}

.toggle-container {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--leather-dark), var(--leather));
    border-radius: 50% 0 0 50%;
    box-shadow: 
        -5px 0 15px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toggle-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.toggle-icon {
    font-size: 24px;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
    position: relative;
}

.toggle-container:hover {
    transform: scale(1.1);
}

body.dark-mode .toggle-container {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

body.dark-mode .toggle-icon {
    color: #fbbf24;
}

/* Sticky Header with Blur Effect */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(120, 53, 15, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode header.scrolled {
    background: rgba(26, 26, 26, 0.95) !important;
}

/* Active Navigation Link */
nav a.active {
    background: rgba(217, 119, 6, 0.3);
    border-bottom: 2px solid var(--gold);
}

/* Fix scroll offset for sticky header */
section[id] {
    scroll-margin-top: 100px;
}

/* Tooltip styles for floating toggle */
.floating-toggle.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%) translateX(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 14px;
    font-family: 'Crimson Text', serif;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10001;
    margin-right: 8px;
}

.floating-toggle.tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10001;
    margin-right: 2px;
}

.floating-toggle.tooltip:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

.floating-toggle.tooltip:hover::after {
    opacity: 1;
    transform: translateY(-50%);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--burgundy), #a72e3f);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(139, 38, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(139, 38, 53, 0.6);
    background: linear-gradient(135deg, #a72e3f, var(--burgundy));
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

body.dark-mode #back-to-top {
    background: linear-gradient(135deg, var(--gold), var(--leather));
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.4);
}

body.dark-mode #back-to-top:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.6);
}

.historical-title {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
}

.military-stamp {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
}

/* Torn paper effect */
.torn-edge {
    position: relative;
    background: var(--parchment);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.torn-edge::before,
.torn-edge::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: var(--parchment);
}

.torn-edge::before {
    top: -10px;
    mask: url("data:image/svg+xml,%3Csvg width='100' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 Q5,0 10,10 T20,10 T30,10 T40,10 T50,10 T60,10 T70,10 T80,10 T90,10 T100,10' fill='black'/%3E%3C/svg%3E") repeat-x;
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='100' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 Q5,0 10,10 T20,10 T30,10 T40,10 T50,10 T60,10 T70,10 T80,10 T90,10 T100,10' fill='black'/%3E%3C/svg%3E") repeat-x;
}

.torn-edge::after {
    bottom: -10px;
    mask: url("data:image/svg+xml,%3Csvg width='100' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 Q5,20 10,10 T20,10 T30,10 T40,10 T50,10 T60,10 T70,10 T80,10 T90,10 T100,10' fill='black'/%3E%3C/svg%3E") repeat-x;
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='100' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 Q5,20 10,10 T20,10 T30,10 T40,10 T50,10 T60,10 T70,10 T80,10 T90,10 T100,10' fill='black'/%3E%3C/svg%3E") repeat-x;
}

/* Wax seal effect */
.wax-seal {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #d32f2f, #8b0000);
    border-radius: 50%;
    box-shadow: 
        inset 2px 2px 5px rgba(0,0,0,0.3),
        2px 2px 10px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #fff;
    font-size: 24px;
    transform: rotate(-5deg);
}

/* Ink stain effect */
.ink-stain {
    position: absolute;
    width: 120px;
    height: 80px;
    background: radial-gradient(ellipse at center, rgba(44,24,16,0.1) 0%, transparent 70%);
    filter: blur(8px);
    transform: rotate(-15deg);
}

/* Map fold lines */
.map-fold {
    position: relative;
    background: linear-gradient(90deg, 
        transparent 24.5%, 
        rgba(0,0,0,0.05) 25%, 
        rgba(0,0,0,0.05) 25.5%, 
        transparent 26%,
        transparent 49.5%,
        rgba(0,0,0,0.05) 50%,
        rgba(0,0,0,0.05) 50.5%,
        transparent 51%,
        transparent 74.5%,
        rgba(0,0,0,0.05) 75%,
        rgba(0,0,0,0.05) 75.5%,
        transparent 76%
    );
}

/* Vintage button */
.vintage-btn {
    background: linear-gradient(180deg, var(--leather) 0%, var(--leather-dark) 100%);
    border: 2px solid var(--leather-dark);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 4px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.vintage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 6px 12px rgba(0,0,0,0.4);
}

.vintage-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.vintage-btn:hover::before {
    left: 100%;
}

/* Musket cross decoration */
.musket-cross {
    position: relative;
    width: 100px;
    height: 60px;
}

.musket-cross::before,
.musket-cross::after {
    content: '';
    position: absolute;
    background: var(--leather-dark);
    top: 50%;
    left: 50%;
}

.musket-cross::before {
    width: 100px;
    height: 4px;
    transform: translate(-50%, -50%) rotate(25deg);
}

.musket-cross::after {
    width: 100px;
    height: 4px;
    transform: translate(-50%, -50%) rotate(-25deg);
}

/* Parallax hero */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: -15%;
    left: 0;
    right: 0;
    height: 130%;
    background-size: cover;
    background-position: center;
}

/* Old paper texture overlay */
.paper-texture {
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(139, 69, 19, 0.03) 2px,
            rgba(139, 69, 19, 0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 69, 19, 0.03) 2px,
            rgba(139, 69, 19, 0.03) 4px
        );
}

/* Vintage radio dial */
.radio-dial {
    background: linear-gradient(180deg, #3d2f1f 0%, #1a1410 100%);
    border: 4px solid #8b6f47;
    box-shadow: 
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.radio-dial::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a574, transparent);
    opacity: 0.5;
}

/* Stamp effect */
.postal-stamp {
    border: 2px dashed var(--leather);
    background: var(--parchment);
    padding: 8px;
    position: relative;
}

.postal-stamp::before {
    content: 'SPECIAL EVENT';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #d32f2f;
    color: white;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    transform: rotate(12deg);
    font-family: 'Bebas Neue', sans-serif;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure sections are visible by default - prevent white flash */
section {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Only animate when class is added via JavaScript */
section.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 165, 116, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.8), 0 0 30px rgba(212, 165, 116, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.glow-effect {
    animation: glow 3s ease-in-out infinite;
}

.float-effect {
    animation: float 6s ease-in-out infinite;
}

.pulse-effect {
    animation: pulse 2s ease-in-out infinite;
}

/* Hover animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.3);
}

/* Timeline Animations and Styles */
.timeline-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.timeline-item.animate-in {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) .w-full {
    position: relative;
}

.timeline-item:nth-child(odd) .w-full::after {
    content: '';
    position: absolute;
    inset: -8px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), transparent);
    border-radius: 12px;
    z-index: -1;
}

.timeline-item:nth-child(even) .w-full {
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.15);
}

/* CTA Buttons with Secondary Color */
.cta-primary {
    background: linear-gradient(135deg, var(--burgundy), #a72e3f) !important;
    border-color: var(--burgundy) !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-primary:hover::before {
    width: 300px;
    height: 300px;
}

.cta-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 38, 53, 0.4) !important;
}

.cta-secondary {
    background: linear-gradient(135deg, var(--forest-green), #3d6b21) !important;
    border-color: var(--forest-green) !important;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.4) !important;
    background: linear-gradient(135deg, #3d6b21, var(--forest-green)) !important;
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: -50px;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--parchment-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--leather);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--leather-dark);
}

/* Certificate Styles - Landscape QSL Card Format */
.certificate {
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #fefcf7 0%, #fdf6e3 50%, #f9f1e6 100%);
    border: 8px solid var(--leather);
    position: relative;
    width: 100%;
    max-width: 10in;
    height: 7in;
    max-height: 7in;
    margin: 0 auto;
    padding: 0.75in;
    box-shadow:
        0 0 0 2px var(--leather-dark),
        0 20px 60px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.5);
    overflow: hidden;
}

.certificate::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px double var(--leather);
    border-radius: 8px;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a574' fill-opacity='0.05'%3E%3Cpath d='m30 0 30 30-30 30L0 30z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.certificate::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 12px;
    pointer-events: none;
}

.certificate-header {
    text-align: center;
    margin-bottom: 2rem;
}

.certificate-title {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--leather-dark), var(--gold), var(--leather-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 2px;
}

.certificate-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--leather);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.certificate-body {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    font-weight: 400;
}

.recipient-name {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, var(--leather-dark), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    padding: 0.5rem 2rem;
    margin: 1rem 0;
}

.recipient-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.certificate-details {
    margin: 1rem 0;
    font-size: 1rem;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    position: relative;
}

.signature-line {
    width: 180px;
    text-align: center;
    padding-top: 40px;
    position: relative;
}

.certificate-seal {
    position: absolute;
    bottom: 10px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, var(--gold) 0%, var(--leather) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    text-align: center;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow:
        0 0 0 3px var(--leather-dark),
        0 4px 8px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(255,255,255,0.3);
    transform: rotate(-15deg);
    z-index: 10;
}

.decorative-flourish {
    position: absolute;
    width: 150px;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,25 Q75,5 140,25 Q75,45 10,25' stroke='%23d4a574' stroke-width='2' fill='none' opacity='0.6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.flourish-top {
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.flourish-bottom {
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.form-container:hover {
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--leather-dark);
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #d4a574;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--leather);
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.2), 0 0 0 3px rgba(212, 165, 116, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: var(--leather);
}

.btn-primary {
    background: linear-gradient(135deg, var(--leather) 0%, var(--leather-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gold);
    color: var(--ink);
    padding: 0.875rem 1.75rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    box-shadow: 0 3px 10px rgba(212, 165, 116, 0.3);
}

.btn-secondary:hover {
    background: #c4944a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
    border-color: var(--leather);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.no-print {
    /* Used to hide elements when printing */
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: letter landscape;
        margin: 0.25in 0.3in;
    }

    html, body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 11in !important;
        height: 8.5in !important;
        overflow: hidden !important;
    }

    body {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    * {
        box-sizing: border-box !important;
    }

    body > *:not(.container) {
        display: none !important;
    }

    body .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print {
        display: none !important;
    }

    #certificate-section {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .certificate {
        width: 10.3in !important;
        max-width: 10.3in !important;
        height: 7.9in !important;
        max-height: 7.9in !important;
        min-height: 7.9in !important;
        margin: 0 !important;
        padding: 0.5in !important;
        box-shadow: none !important;
        border: 6px solid #8b4513 !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
        overflow: hidden !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .certificate .text-8xl {
        font-size: 4.5rem !important;
        margin: 0.5rem 0 !important;
    }

    .certificate .text-5xl {
        font-size: 2.5rem !important;
    }

    .certificate .text-3xl {
        font-size: 1.6rem !important;
    }

    .certificate .text-2xl {
        font-size: 1.3rem !important;
    }

    .certificate .text-xl {
        font-size: 1.1rem !important;
    }

    .certificate .text-lg {
        font-size: 0.95rem !important;
    }

    .certificate .text-base {
        font-size: 0.85rem !important;
    }

    .certificate .text-sm {
        font-size: 0.75rem !important;
    }

    .certificate .mb-6 {
        margin-bottom: 1rem !important;
    }

    .certificate .mb-5 {
        margin-bottom: 0.8rem !important;
    }

    .certificate .mb-4 {
        margin-bottom: 0.6rem !important;
    }

    .certificate .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .certificate .mb-2 {
        margin-bottom: 0.35rem !important;
    }

    .certificate .my-4 {
        margin-top: 0.6rem !important;
        margin-bottom: 0.6rem !important;
    }

    .certificate .my-3 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .certificate .military-stamp {
        padding: 0.25rem 0.75rem !important;
    }

    .certificate .recipient-name {
        padding: 0.3rem 1.5rem !important;
    }

    .certificate #cert-callsign {
        padding: 0.4rem 1.2rem !important;
    }

    .certificate-seal {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.65rem !important;
        right: 12px !important;
        bottom: 8px !important;
        line-height: 1.1 !important;
        border-width: 2px !important;
    }

    .flourish-top {
        top: 20px !important;
        width: 100px !important;
        height: 30px !important;
        opacity: 0.4 !important;
    }

    .flourish-bottom {
        bottom: 30px !important;
        width: 100px !important;
        height: 30px !important;
        opacity: 0.4 !important;
    }

    .certificate::before,
    .certificate::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .certificate {
        width: 95%;
        height: auto;
        padding: 1.5rem;
        min-height: auto;
    }

    .certificate .grid-cols-12 {
        grid-template-columns: 1fr;
    }

    .certificate .col-span-4,
    .certificate .col-span-8 {
        grid-column: span 12;
    }

    .certificate .border-r-2 {
        border-right: none;
        border-bottom: 2px solid;
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .certificate-title {
        font-size: 1.5rem !important;
    }

    .recipient-name {
        font-size: 1.5rem !important;
    }

    .certificate-seal {
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
        right: 10px;
        bottom: 5px;
    }
}