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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    margin: 20px auto;
}

.profile {
    margin-bottom: 35px;
}

.profile-name {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.2;
}

.profile-bio {
    font-size: clamp(14px, 3vw, 18px);
    color: #666;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.link-item {
    display: block;
    padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 30px);
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: clamp(14px, 3.5vw, 17px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #4a5568;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
}

.link-item:active {
    transform: translateY(0);
}

.link-text {
    position: relative;
    z-index: 1;
}

.link-logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
    margin-right: 15px;
    position: relative;
    z-index: 1;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
    flex-shrink: 0;
}

/* Specific logo adjustments for better alignment */
.link-item img[src="commons-nav-logo.png"] {
    object-fit: cover;
    object-position: center;
}

.link-item img[src="trr-nav-logo.png"] {
    object-fit: cover;
    object-position: center;
}

.link-item img[src="venue-nav-logo.webp"] {
    object-fit: contain;
    object-position: center;
    filter: brightness(0) saturate(100%);
}

/* Special Contact Button Styling */
.contact-button-special {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
    color: white !important;
    border: 2px solid #4a5568 !important;
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.3);
    transform: translateY(-2px);
}

.contact-button-special:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    color: white !important;
    border-color: #2d3748 !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(74, 85, 104, 0.4);
}

.link-item:hover .link-logo {
    filter: brightness(1) invert(1);
}

.link-item:hover img[src="venue-nav-logo.webp"] {
    filter: brightness(0) saturate(100%) invert(1) !important;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.footer {
    font-size: 14px;
    color: #888;
    margin-top: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
        align-items: flex-start;
    }
    
    .container {
        padding: 25px 20px;
        margin: 10px auto;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .profile {
        margin-bottom: 25px;
    }
    
    .links {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .link-item {
        border-radius: 12px;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px 15px;
        margin: 5px auto;
        border-radius: 12px;
    }
    
    .profile {
        margin-bottom: 20px;
    }
    
    .links {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .link-item {
        border-radius: 10px;
        min-height: 44px;
    }
}

@media (min-width: 769px) {
    body {
        align-items: center;
    }
    
    .container {
        margin: auto;
    }
    
    .link-item {
        font-size: 16px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .container {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
    
    .profile-name {
        color: #ecf0f1;
    }
    
    .profile-bio {
        color: #bdc3c7;
    }
    
    .link-item {
        background: rgba(52, 73, 94, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }
    
    .link-item:hover {
        background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
        border-color: #3498db;
    }
    
    .footer {
        color: #95a5a6;
    }
}

/* Contact Form Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 10vh auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

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

.close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #333;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.modal-content h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: clamp(20px, 4vw, 24px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

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

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

#contactForm button {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#contactForm button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#contactForm button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 25px 20px;
        width: 95%;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}

@media (prefers-color-scheme: dark) {
    .modal-content {
        background: rgba(44, 62, 80, 0.95);
    }
    
    .modal-content h2 {
        color: #ecf0f1;
    }
    
    .form-group label {
        color: #ecf0f1;
    }
    
    .form-group input,
    .form-group textarea {
        background: rgba(52, 73, 94, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: #3498db;
    }
    
    .close {
        color: #bdc3c7;
    }
    
    .close:hover {
        color: #ecf0f1;
    }
}

/* Card Modal Styles */
.card-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.card-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 5vh auto;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    height: 200px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.card-header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-header-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header-placeholder h3 {
    color: white;
    font-size: 24px;
    margin: 0;
}

.card-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.card-body h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: clamp(20px, 4vw, 24px);
}

.card-body p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
    height: 48px;
    box-sizing: border-box;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-button.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.card-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Bottom Action Bar */
.card-action-bar {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 20px 20px;
    margin-top: auto;
}

.action-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    text-align: center;
}

.action-button:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-button.disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
}

.action-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

.card-button-secondary {
    background: transparent;
    color: #4a5568;
    border: 2px solid #4a5568;
}

.card-button-secondary:hover {
    background: #4a5568;
    color: white;
}

@media (max-width: 768px) {
    .card-content {
        margin: 5vh auto 10vh auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .card-header {
        height: 150px;
    }
    
    .card-body {
        padding: 15px;
        padding-bottom: 25px;
    }
    
    .card-body p {
        margin-bottom: 12px;
        font-size: 15px;
    }
    
    .card-body h2 {
        font-size: 20px;
    }
    
    .card-buttons {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .card-content {
        margin: 5vh auto 15vh auto;
        max-height: 80vh;
    }
}

@media (max-width: 768px) and (max-height: 700px) {
    .card-content {
        margin: 2vh auto 12vh auto;
        max-height: 75vh;
    }
    
    .card-header {
        height: 120px;
    }
    
    .card-body {
        padding: 15px;
        padding-bottom: 25px;
    }
}

@media (prefers-color-scheme: dark) {
    .card-content {
        background: rgba(44, 62, 80, 0.95);
    }
    
    .card-body h2 {
        color: #ecf0f1;
    }
    
    .card-body p {
        color: #bdc3c7;
    }
    
    .link-logo {
        filter: brightness(1) invert(1);
    }
    
    .link-item:hover .link-logo {
        filter: brightness(1) invert(1);
    }
    
    .card-button-secondary {
        background: transparent;
        color: #ecf0f1;
        border: 2px solid #ecf0f1;
    }
    
    .card-button-secondary:hover {
        background: #ecf0f1;
        color: #2d3748;
    }
    
    .card-button:not(.card-button-secondary) {
        background: #3498db;
        color: white;
    }
    
    .card-button:not(.card-button-secondary):hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
    }
    
    .card-action-bar {
        background: rgba(44, 62, 80, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .action-button:not(.disabled) {
        background: #3498db;
        color: white;
    }
    
    .action-button:not(.disabled):hover {
        background: #2980b9;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    .action-button.disabled {
        background: #7f8c8d;
        color: #34495e;
    }
    
    #contactForm button {
        background: #3498db;
    }
    
    #contactForm button:hover {
        background: #2980b9;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    .close {
        background: rgba(44, 62, 80, 0.7);
        color: #bdc3c7;
    }
    
    .close:hover {
        background: rgba(44, 62, 80, 0.9);
        color: #ecf0f1;
        transform: scale(1.05);
    }
    
    /* Dark mode styling for contact button */
    .contact-button-special {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
        color: white !important;
        border: 2px solid #3498db !important;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }

    .contact-button-special:hover {
        background: linear-gradient(135deg, #2980b9 0%, #1f4788 100%) !important;
        color: white !important;
        border-color: #2980b9 !important;
        box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
    }
    
    /* Venue logo in dark mode */
    .link-item img[src="venue-nav-logo.webp"] {
        filter: brightness(0) saturate(100%) invert(1);
    }
}

/* TRR Composite Header */
.trr-composite-header {
    position: relative;
}

.trr-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 40%;
    max-width: 60%;
    object-fit: contain;
    z-index: 10;
}

/* Commons Logo Styling */
.link-item img[src="commons-logo.png"] {
    background: transparent;
    border-radius: 8px;
    padding: 4px;
}

/* Venue Pricing Text Consistency */
#venue-pricing, #wedding-pricing {
    color: #333;
}

#venue-pricing p, #wedding-pricing p,
#venue-pricing li, #wedding-pricing li {
    color: #333;
}

/* Image Cropping Adjustments */
.card-header img[src="commons-card-new.png"] {
    object-position: center top;
}

.card-header img[src="church-card-new.png"] {
    object-position: center 10%;
}

#venue-card .card-header {
    height: 200px;
    overflow: hidden;
}

.card-header img[src="The Commons Venu.png"] {
    object-position: center;
    object-fit: cover;
    width: 100%;
    height: 200px;
}