/* Load custom fonts */
@font-face {
    font-family: 'Anton';
    src: url('fonts/Anton-Regular.woff2') format('woff2'),
         url('fonts/Anton-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham-Black';
    src: url('fonts/Gotham-Black.woff2') format('woff2'),
         url('fonts/Gotham-Black.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'JUSTSans-SmBd';
    src: url('fonts/JUSTSans-SmBd.woff2') format('woff2'),
         url('fonts/JUSTSans-SmBd.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'JUSTSans-Rg';
    src: url('fonts/JUSTSans-Rg.woff2') format('woff2'),
         url('fonts/JUSTSans-Rg.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}




/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    -moz-hyphens: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JUSTSans-Rg', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header improvements */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 1.5em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2em;
    margin-top: 4em;
}

header .logo img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1em;
}

/* Play button styling */
button#playAudio {
    background-color: white;
    color: #2c3e50;
    border: none;
    padding: 0.8em 2em;
    margin: 0.5em;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

button#playAudio:hover {
    background-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5em 1em;
    margin: 0.5em;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
}

button:hover {
    background-color: #2c3e50;
}

/* Add this style for the first content box header */
.first-content-header {
    font-family: 'Gotham-Black', sans-serif; /* Apply Gotham-Black font */
}


/* Header Image Styling - optimized for transparent PNG with overlay text */
.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 2em;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    padding: 3em 0;
    position: relative;
    min-height: 500px;
}

.header-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.7;
}

.header-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="30" cy="30" r="2"/><circle cx="10" cy="10" r="1"/><circle cx="50" cy="10" r="1"/><circle cx="10" cy="50" r="1"/><circle cx="50" cy="50" r="1"/></g></svg>');
    opacity: 0.5;
}

.header-image img {
    width: auto;
    height: auto;
    max-width: 85%;
    max-height: 450px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.header-image:hover img {
    transform: scale(1.02);
}

/* Overlay text positioning */
.overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2em;
}

.main-title {
    font-family: 'Gotham-Black', sans-serif;
    font-size: 2.8em;
    font-weight: 900;
    color: white;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    text-align: center;
    margin: 0;
    margin-top: 1em;
    max-width: 90%;
    word-wrap: break-word;
    hyphens: none;
    overflow-wrap: break-word;
}

.subtitle {
    font-family: 'JUSTSans-SmBd', sans-serif;
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin: 0;
    margin-bottom: 2em;
    padding: 0.8em 1.5em;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(5px);
    max-width: 90%;
    word-wrap: break-word;
    hyphens: none;
    overflow-wrap: break-word;
}

/* Content Boxes Styling */
.content-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    padding: 0;
    margin: 1.5em 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image at top of each box - cinematic fit with perfect centering */
.content-boxes .content-box .content-image {
    width: 100% !important;
    min-height: 300px !important;
    height: auto !important;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
    max-width: none !important;
    flex: none !important;
    border-radius: 12px 12px 0 0;
}

.content-boxes .content-box .content-image img {
    width: 100% !important;
    height: auto !important;
    min-height: 300px !important;
    max-height: 400px !important;
    object-fit: contain !important;
    object-position: center center !important;
    transition: transform 0.3s ease;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    border-radius: 0 !important;
}

.content-boxes .content-box:hover .content-image img {
    transform: scale(1.05);
}

/* Content text styling */
.content-box .content-text {
    padding: 2em;
}


.first-box {
    font-family: 'Gotham-Black', sans-serif; /* Apply Gotham-Black font to the first box */
}

.whatsapp-container {
    display: flex;
    align-items: center; /* Vertically centers the items */
}

.whatsapp-container .icon {
    width: 32px; /* Smaller size */
    height: 32px; /* Smaller size */
    vertical-align: middle; /* Ensure vertical alignment */
    margin-right: 0.1em; /* Space between the icon and text */
}



.content-text {
	flex: 1;
	font-size: 1.1em;
}

.content-text h2 {
	font-size: 2.5em;
	margin-bottom: 0.5em;
	word-wrap: break-word;
    hyphens: none;
}

.content-text p {
	font-size: 1.1em;
	word-wrap: break-word;
    hyphens: none;
}



/* Content boxes container improvements */
.content-boxes {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2em auto;
    max-width: 900px;
    padding: 0 2em;
}

/* Style for headers like "If you are arrested or taken into police custody:" */
.content-box p:first-child {
    font-family: 'JUSTSans-SmBd', sans-serif; /* Apply JUSTSans-SmBd font */
    font-weight: 600;
}

/* Style for remaining text */
.content-box p:not(:first-child) {
    font-family: 'JUSTSans-Rg', sans-serif; /* Apply JUSTSans-Rg font */
}

/* Contact information box special styling */
.content-box.content-pair {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 3em;
    padding: 2em;
}

.content-box.content-pair .content-text h3 {
    color: white;
}

.content-box.content-pair .content-text h3:after {
    background-color: white;
}

.content-box.content-pair .content-text p {
    color: white;
}

.content-box.content-pair a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.content-box.content-pair a:hover {
    color: #fff;
    text-decoration: underline;
}

.content-pair {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	background: white;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	margin: 1em 0;
	width: 100%;
	padding: 1.5em;
	gap: 2em;
}

/* Legacy content-image styles for backward compatibility - lower specificity */
.content-image {
	flex: 0 0 auto;
	max-width: 200px;
}

.content-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.content-text h3 {
	font-family: 'JUSTSans-SmBd', sans-serif;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 0.8em;
	font-size: 1.5em;
	position: relative;
	padding-bottom: 0.5em;
	word-wrap: break-word;
    hyphens: none;
}

.content-text h3:after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 50px;
	background-color: #d4af37;
}

.content-text p {
	font-family: 'JUSTSans-Rg', sans-serif;
	color: #555;
	line-height: 1.8;
	margin-bottom: 0.8em;
	font-size: 1.1em;
	word-wrap: break-word;
    hyphens: none;
}

/* Checkbox items styling */
.content-text p:contains("☑") {
	padding-left: 1.5em;
	position: relative;
	margin-bottom: 0.5em;
	color: #2c3e50;
	font-weight: 500;
}

/* Picture-in-Picture Styles */
.pip-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 168px;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    background-color: white;
}

.pip-container video {
    width: 100%;
    height: 100%;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 1001;
}

.pip-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 20%; /* Slightly rounded edges */
    overflow: hidden; /* Ensures that edges are cleanly rounded */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Drop shadow for a subtle 3D effect */
}




/* Intro text removed - now using overlay text */

/* Enhanced accessibility features */
.content-box:focus-within {
    outline: 3px solid #d4af37;
    outline-offset: 3px;
}

/* Skip to content link for keyboard navigation */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2c3e50;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* Accessibility improvements for overlay text */
.main-title, .subtitle {
    /* Ensure high contrast ratios */
    text-shadow: 
        2px 2px 0px #000000,
        -1px -1px 0px #000000,
        1px -1px 0px #000000,
        -1px 1px 0px #000000,
        1px 1px 0px #000000,
        0 0 10px rgba(0, 0, 0, 0.8);
}

/* Focus states for better keyboard navigation */
.overlay-text:focus-within .main-title,
.overlay-text:focus-within .subtitle {
    outline: 3px solid #d4af37;
    outline-offset: 3px;
}

/* Improve contrast for better readability */
.content-text p {
    font-size: 1.1em;
    color: #333;
}

/* Better focus states */
button:focus, 
a:focus {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
}

/* Ensure non-box images have proper aspect ratio */
.content-image:not(.content-boxes .content-box .content-image) {
    aspect-ratio: 16/9;
}

/* Add motion preference support for animations */
@media (prefers-reduced-motion: reduce) {
    .content-box {
        animation: none;
    }
    
    .header-image:hover img {
        transform: none;
    }
    
    .content-box:hover {
        transform: none;
    }
    
    * {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .main-title, .subtitle {
        text-shadow: 
            2px 2px 0px #000000,
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000;
    }
    
    .content-box {
        border: 2px solid #000;
    }
}

/* Add animation for content boxes on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-box:nth-child(1) { animation-delay: 0.1s; }
.content-box:nth-child(2) { animation-delay: 0.2s; }
.content-box:nth-child(3) { animation-delay: 0.3s; }
.content-box:nth-child(4) { animation-delay: 0.4s; }
.content-box:nth-child(5) { animation-delay: 0.5s; }
.content-box:nth-child(6) { animation-delay: 0.6s; }

/* Responsive improvements */
@media (max-width: 768px) {
    .content-boxes {
        padding: 0 1em;
    }
    
    .content-boxes .content-box .content-image {
        min-height: 250px !important;
    }
    
    .content-boxes .content-box .content-image img {
        min-height: 250px !important;
        max-height: 350px !important;
        object-position: center center !important;
    }
    
    .content-box .content-text {
        padding: 1.5em;
    }
    
    .header-image {
        min-height: 400px;
        padding: 2em 0;
    }
    
    .main-title {
        font-size: 2.2em;
    }
    
    .subtitle {
        font-size: 1.2em;
        padding: 0.6em 1.2em;
    }
    
    .overlay-text {
        padding: 1.5em;
    }
    
    .content-pair {
        flex-direction: column;
        gap: 1.5em;
    }
    
    .content-image:not(.content-boxes .content-box .content-image) {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .content-boxes {
        padding: 0 1em;
    }
    
    .content-boxes .content-box .content-image {
        min-height: 200px !important;
    }
    
    .content-boxes .content-box .content-image img {
        min-height: 200px !important;
        max-height: 300px !important;
        object-position: center center !important;
    }
    
    .content-box .content-text {
        padding: 1em;
    }
    
    .content-text h3 {
        font-size: 1.1em;
        line-height: 1.3;
    }
    
    .content-text p {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .header-image {
        min-height: 350px;
        padding: 1.5em 0;
    }
    
    .main-title {
        font-size: 1.6em;
        margin-top: 0.5em;
        line-height: 1.2;
        padding: 0 0.5em;
    }
    
    .subtitle {
        font-size: 0.9em;
        padding: 0.4em 0.8em;
        margin-bottom: 1.5em;
        line-height: 1.4;
    }
    
    .overlay-text {
        padding: 0.8em;
    }
    
    .content-pair {
        flex-direction: column;
        gap: 1em;
        padding: 1em;
    }
    
    .content-image:not(.content-boxes .content-box .content-image) {
        max-width: 150px;
        order: -1;
    }
}

/* iPhone specific optimizations - very small screens */
@media (max-width: 390px) {
    body {
        font-size: 14px;
    }
    
    .content-boxes {
        padding: 0 0.8em;
    }
    
    .content-box .content-text {
        padding: 0.8em;
    }
    
    .content-text h3 {
        font-size: 1em;
        line-height: 1.3;
        margin-bottom: 0.6em;
    }
    
    .content-text p {
        font-size: 0.85em;
        line-height: 1.5;
        margin-bottom: 0.6em;
    }
    
    .main-title {
        font-size: 1.4em;
        line-height: 1.1;
        padding: 0 0.8em;
        word-wrap: break-word;
        hyphens: none;
    }
    
    .subtitle {
        font-size: 0.8em;
        padding: 0.3em 0.6em;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .overlay-text {
        padding: 0.6em;
    }
    
    header {
        padding: 1em;
    }
    
    header .logo img {
        max-width: 95%;
    }
    
    button#playAudio {
        font-size: 0.9em;
        padding: 0.6em 1.5em;
    }
}

/* Extra small iPhone screens (iPhone SE, etc.) */
@media (max-width: 320px) {
    .content-boxes {
        padding: 0 0.5em;
    }
    
    .content-box .content-text {
        padding: 0.6em;
    }
    
    .content-text h3 {
        font-size: 0.95em;
        line-height: 1.2;
    }
    
    .content-text p {
        font-size: 0.8em;
        line-height: 1.4;
    }
    
    .main-title {
        font-size: 1.2em;
        line-height: 1.1;
        padding: 0 0.5em;
        text-align: center;
        word-break: break-word;
    }
    
    .subtitle {
        font-size: 0.75em;
        padding: 0.3em 0.5em;
        line-height: 1.2;
        text-align: center;
    }
    
    .overlay-text {
        padding: 0.5em;
    }
    
    header {
        padding: 0.8em;
    }
    
    button#playAudio {
        font-size: 0.8em;
        padding: 0.5em 1.2em;
    }
}

/* Sample Will Link Styling */
.sample-will-box {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    text-align: center;
    margin-top: 2em;
}

.sample-will-box .content-text h3 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 1em;
}

.sample-will-box .content-text h3:after {
    background-color: white;
}

.sample-will-box .content-text p {
    color: white;
    font-size: 1.2em;
    margin-bottom: 1.5em;
}

.sample-will-link {
    display: inline-block;
    background: white;
    color: #8b4513;
    text-decoration: none;
    padding: 1em 2.5em;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
}

.sample-will-link:hover {
    background: #d4af37;
    color: #5d4e37;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: white;
}

.sample-will-link:focus {
    outline: 3px solid #d4af37;
    outline-offset: 3px;
    background: #f5f5dc;
    color: #5d4e37;
}

.sample-will-link:active {
    transform: translateY(-1px);
}

/* Responsive adjustments for sample will link */
@media (max-width: 768px) {
    .sample-will-link {
        padding: 0.8em 2em;
        font-size: 1em;
    }
    
    .sample-will-box .content-text h3 {
        font-size: 1.5em;
    }
    
    .sample-will-box .content-text p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .sample-will-link {
        padding: 0.7em 1.5em;
        font-size: 0.9em;
        display: block;
        margin: 0 auto;
        text-align: center;
    }
    
    .sample-will-box .content-text h3 {
        font-size: 1.3em;
    }
    
    .sample-will-box .content-text p {
        font-size: 1em;
    }
}

/* Add print styles */
@media print {
    .pip-container,
    .pip-icon,
    button#playAudio {
        display: none !important;
    }
    
    .content-box {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .sample-will-link {
        color: #8b4513 !important;
        text-decoration: underline;
    }
    
    .sample-will-link:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
