/**
 * NACHEL Affiliates - Region Details Styling
 * Version 1.0.11
 */

/* Base Container Styles */
#namap .namap-region-details {
    max-width: 100%; /* Use full container width on page */
    margin: 20px auto;
    padding: 20px;
}

/* Modal constrains width more */
.namap-modal .namap-region-details {
    max-width: 800px;
}

/* Dynamic width based on organization count for PAGE display */
#namap .namap-region-details.namap-org-count-2 {
    max-width: 100%;
}

#namap .namap-region-details.namap-org-count-3 {
    max-width: 100%;
}

/* Modal keeps constrained width for multiple orgs */
.namap-modal .namap-region-details.namap-org-count-2 {
    max-width: 1200px;
}

.namap-modal .namap-region-details.namap-org-count-3 {
    max-width: 1400px;
}

/* Region Header */
#namap .namap-region-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

#namap .namap-region-header h2 {
    margin: 0 0 15px 0;
    font-size: 2.2em;
    color: #2c3e50;
}

#namap .namap-org-count-notice {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 10px 0 0 0;
}

/* Organizations Grid - Base (for details page) */
#namap .namap-organizations-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column - stack vertically on page */
    gap: 30px;
    margin-top: 20px;
}

/* Modal organizations display side-by-side */
.namap-modal .namap-organizations-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Multi-column in modal */
}

/* Organization Cards */
#namap .namap-org-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    min-width: 300px;
}

/* Modal-specific card styling - tighter spacing */
.namap-modal .namap-org-card {
    padding: 25px;
}

#namap .namap-org-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Logo */
#namap .namap-logo,
.namap-modal .namap-logo {
    text-align: center;
    margin-bottom: 20px;
}

#namap .namap-logo img,
.namap-modal .namap-logo img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: 0 auto; /* Ensure centering */
}

/* Modal-specific logo sizing - slightly smaller for popup */
.namap-modal .namap-logo img {
    max-height: 130px;
}

/* Organization Header */
#namap .namap-org-details h3 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
    color: #2c3e50;
    text-align: center;
    line-height: 1.3;
}

/* Modal-specific organization header - slightly smaller */
.namap-modal .namap-org-details h3 {
    font-size: 1.5em;
}

/* Modal organization details wrapper */
.namap-modal .namap-org-details {
    border-bottom: 2px solid #e8f4f8;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#namap .namap-acronym {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: normal;
}

/* Badges */
#namap .namap-badge,
.namap-modal .namap-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13.6px;  /* Fixed size instead of 0.85em */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px auto;
    text-align: center;
}

/* Ensure badge sizing in multi-org cards */
#namap .namap-org-card .namap-badge,
.namap-modal .namap-org-card .namap-badge {
    font-size: 13.6px;  /* Same fixed size */
}

/* Badge color - ONLY for badge elements, not containers */
#namap .namap-badge.namap-affiliated,
.namap-modal .namap-badge.namap-affiliated {
    background: #4CAF50;
    color: white;
}

#namap .namap-badge.namap-unaffiliated {
    background: #999999;
    color: white;
}

/* Tagline */
#namap .namap-tagline {
    text-align: center;
    font-size: 1.05em;
    color: #555;
    margin: 15px 0 25px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #42a5cc;
    border-radius: 4px;
}

/* Sections */
#namap .namap-section,
.namap-modal .namap-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Modal-specific section styling - enhanced visual separation */
.namap-modal .namap-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin: 20px 0;
    padding: 15px;
}

.namap-modal .namap-section:first-of-type {
    margin-top: 0;
}

.namap-modal .namap-section h4 {
    color: #2c3e50;
    border-bottom: 2px solid #e8f4f8;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#namap .namap-section h4,
.namap-modal .namap-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Override for modal-specific h4 size */
.namap-modal .namap-section h4 {
    font-size: 1.2em;
}

#namap .namap-section h4 i,
.namap-modal .namap-section h4 i {
    color: #42a5cc;
}

#namap .namap-section p,
.namap-modal .namap-section p {
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
}

/* Mission Section */
#namap .namap-mission {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f8 100%);
    border-left: 4px solid #42a5cc;
}

/* Modal mission section - more prominent */
.namap-modal .namap-mission {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4ebf7 100%);
    border-left: 4px solid #42a5cc;
    border: 1px solid #c2e0f0;
}

/* Contact Section */
#namap .namap-contact-row {
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

#namap .namap-contact-row:last-child {
    border-bottom: none;
}

#namap .namap-contact-row strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 80px;
}

#namap .namap-contact-row a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.2s;
}

#namap .namap-contact-row a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Website Button */
#namap .namap-website,
.namap-modal .namap-website {
    text-align: center;
    background: #fff;
}

#namap .namap-website-link,
.namap-modal .namap-website-link {
    display: inline-block;
    padding: 12px 30px;
    background: #3498db;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;  /* Explicit size */
    transition: background 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ensure website link sizing in multi-org cards */
#namap .namap-org-card .namap-website-link,
.namap-modal .namap-org-card .namap-website-link {
    font-size: 16px;  /* Same fixed size */
}

#namap .namap-website-link:hover,
.namap-modal .namap-website-link:hover {
    background: #2980b9;
    text-decoration: none !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#namap .namap-website-link i,
.namap-modal .namap-website-link i {
    margin-right: 8px;
    font-size: 14px;  /* Explicit icon size */
}

/* Resource Links */
#namap .namap-links,
.namap-modal .namap-links {
    background: #fff9e6;
}

#namap .namap-links-container,
.namap-modal .namap-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

#namap .namap-link-item,
.namap-modal .namap-link-item {
    margin: 0;
}

#namap .namap-link-item a,
.namap-modal .namap-link-item a {
    display: inline-block;
    color: #2c3e50;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    border: 1px solid #c2e0f0;
    transition: all 0.2s;
    font-size: 0.9em;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#namap .namap-link-item a:hover,
.namap-modal .namap-link-item a:hover {
    background: linear-gradient(135deg, #d4e8ff 0%, #b8dcff 100%);
    border-color: #42a5cc;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

#namap .namap-link-item a::before,
.namap-modal .namap-link-item a::before {
    content: "→ ";
    margin-right: 5px;
    color: #42a5cc;
    font-weight: bold;
}

/* Stack vertically in narrow displays and modal */
@media (max-width: 600px) {
    #namap .namap-links-container {
        flex-direction: column;
    }
    
    #namap .namap-link-item {
        width: 100%;
    }
    
    #namap .namap-link-item a {
        display: block;
        text-align: center;
    }
}

/* Modal - stack vertically when cards are side-by-side */
.namap-modal-content .namap-links-container {
    flex-direction: column;
}

.namap-modal-content .namap-link-item {
    width: 100%;
}

.namap-modal-content .namap-link-item a {
    display: block;
    text-align: center;
}

/* Videos Section */
#namap .namap-videos {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f8 100%);
}

#namap .namap-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

#namap .namap-video-item {
    cursor: pointer;
}

/* Video Thumbnail Card */
#namap .namap-video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

#namap .namap-video-item:hover .namap-video-thumbnail {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Thumbnail Inner Content */
#namap .namap-video-thumbnail-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

#namap .namap-video-thumbnail-inner i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.9);
}

/* YouTube/Vimeo thumbnails will have background-image set via JS */
#namap .namap-video-thumbnail-inner.has-thumbnail {
    background-color: #000;
}

#namap .namap-video-thumbnail-inner.has-thumbnail i {
    display: none;
}

/* Play Button Overlay */
#namap .namap-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, color 0.2s;
    pointer-events: none;
}

#namap .namap-video-item:hover .namap-video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    color: #ff4444;
}

/* Video Description */
#namap .namap-video-description {
    margin: 10px 0 0 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

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

#namap-video-lightbox.active {
    display: flex;
}

#namap-video-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
}

#namap-video-lightbox-inner {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

#namap-video-lightbox-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#namap-video-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

#namap-video-lightbox-close:hover {
    color: #ff4444;
}

/* Responsive Videos */
@media (max-width: 768px) {
    #namap .namap-videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    #namap-video-lightbox-content {
        width: 95%;
    }
    
    #namap-video-lightbox-close {
        top: -35px;
        font-size: 28px;
    }
}

/* Social Media Links */
#namap .namap-social,
.namap-modal .namap-social {
    background: linear-gradient(135deg, #f8f9fa 0%, #fef5e7 100%);
}

#namap .namap-social-links,
.namap-modal .namap-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

#namap .namap-social-links a,
.namap-modal .namap-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    color: #555;  /* Default gray for unmatched platforms */
    font-size: 1rem;  /* Reset to base size */
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Multi-org card social icons - same sizing */
#namap .namap-org-card .namap-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

#namap .namap-social-links a:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#namap .namap-social-links a i,
#namap .namap-org-card .namap-social-links a i {
    font-size: 28px;  /* Fixed size - larger icons in 50px circle */
    line-height: 1;
}

/* Platform-specific colors - Always visible */
/* Note: These match on the title attribute (platform name) */

#namap .namap-social-links a[title*="Facebook"],
#namap .namap-social-links a[title*="facebook"] {
    color: #3b5998;
}

#namap .namap-social-links a[title*="Twitter"],
#namap .namap-social-links a[title*="twitter"] {
    color: #1da1f2;
}

#namap .namap-social-links a[title*="Instagram"],
#namap .namap-social-links a[title*="instagram"] {
    color: #e4405f;
}

#namap .namap-social-links a[title*="YouTube"],
#namap .namap-social-links a[title*="youtube"] {
    color: #ff0000;
}

#namap .namap-social-links a[title*="LinkedIn"],
#namap .namap-social-links a[title*="linkedin"] {
    color: #0077b5;
}

#namap .namap-social-links a[title*="Pinterest"],
#namap .namap-social-links a[title*="pinterest"] {
    color: #e60023;
}

#namap .namap-social-links a[title*="TikTok"],
#namap .namap-social-links a[title*="tiktok"] {
    color: #000000;
}

#namap .namap-social-links a[title*="WhatsApp"],
#namap .namap-social-links a[title*="whatsapp"] {
    color: #25d366;
}

#namap .namap-social-links a[title*="Snapchat"],
#namap .namap-social-links a[title*="snapchat"] {
    color: #fffc00;
    text-shadow: 0 0 1px rgba(0,0,0,0.3); /* Make yellow visible on white */
}

#namap .namap-social-links a[title*="Reddit"],
#namap .namap-social-links a[title*="reddit"] {
    color: #ff4500;
}

#namap .namap-social-links a[title*="Telegram"],
#namap .namap-social-links a[title*="telegram"] {
    color: #0088cc;
}

#namap .namap-social-links a[title*="Discord"],
#namap .namap-social-links a[title*="discord"] {
    color: #5865f2;
}

#namap .namap-social-links a[title*="Vimeo"],
#namap .namap-social-links a[title*="vimeo"] {
    color: #1ab7ea;
}

/* Fallback platforms (using generic icons) */
/* More flexible matching for MeWe */
#namap .namap-social-links a[title*="MeWe"],
#namap .namap-social-links a[title*="mewe"],
#namap .namap-social-links a[title*="MEWE"],
#namap .namap-social-links a[title="MeWe"] {
    color: #007DA1 !important;
}

#namap .namap-social-links a[title*="Parler"],
#namap .namap-social-links a[title*="parler"] {
    color: #892434;
}

#namap .namap-social-links a[title*="Gab"],
#namap .namap-social-links a[title*="gab"] {
    color: #21cf7b;
}

#namap .namap-social-links a[title*="Truth Social"],
#namap .namap-social-links a[title*="truth-social"],
#namap .namap-social-links a[title*="truthsocial"] {
    color: #e31c3d;
}

#namap .namap-social-links a[title*="GETTR"],
#namap .namap-social-links a[title*="gettr"] {
    color: #fc223b;
}

#namap .namap-social-links a[title*="Minds"],
#namap .namap-social-links a[title*="minds"] {
    color: #ffc800;
    text-shadow: 0 0 1px rgba(0,0,0,0.3);
}

#namap .namap-social-links a[title*="Rumble"],
#namap .namap-social-links a[title*="rumble"] {
    color: #85c742;
}

/* Modal-specific social media adjustments */
.namap-modal .namap-social-links {
    flex-wrap: wrap;
    gap: 12px;
}

.namap-modal .namap-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;  /* Reset to base size */
}

/* Ensure icons are always visible in modal */
.namap-modal .namap-social-links a i {
    display: inline-block !important;
    font-size: 24px;  /* Fixed size - larger icons in same circle */
    line-height: 1;
}
}

/* Media Contact */
#namap .namap-media-contact {
    background: #e8f5e9;
    text-align: center;
}

#namap .namap-media-contact a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
}

#namap .namap-media-contact a:hover {
    text-decoration: underline;
}

/* Error States */
#namap .namap-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    font-size: 1.1em;
}

/* Responsive Design */

/* Tablet and smaller */
@media (max-width: 1200px) {
    #namap .namap-region-details.namap-org-count-2,
    #namap .namap-region-details.namap-org-count-3 {
        max-width: 900px;
    }
    
    /* Page stays single column */
    #namap .namap-organizations-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modal goes to 2 columns on tablet */
    .namap-modal .namap-organizations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile landscape and smaller */
@media (max-width: 768px) {
    #namap .namap-region-details,
    #namap .namap-region-details.namap-org-count-2,
    #namap .namap-region-details.namap-org-count-3 {
        max-width: 100%;
        padding: 15px;
    }
    
    /* Both page and modal stack on mobile */
    #namap .namap-organizations-grid,
    .namap-modal .namap-organizations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #namap .namap-org-card {
        padding: 20px;
    }
    
    #namap .namap-region-header h2 {
        font-size: 1.8em;
    }
    
    #namap .namap-org-details h3 {
        font-size: 1.5em;
    }
    
    #namap .namap-logo img {
        max-height: 150px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    #namap .namap-region-header h2 {
        font-size: 1.5em;
    }
    
    #namap .namap-org-details h3 {
        font-size: 1.3em;
    }
    
    #namap .namap-logo img {
        max-height: 100px;
    }
    
    #namap .namap-org-card {
        padding: 15px;
    }
    
    #namap .namap-section {
        padding: 15px;
    }
    
    #namap .namap-social-links a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ================================
   TEMPLATE STYLE VARIATIONS
   ================================ */

/* COMPACT TEMPLATE - Streamlined single-column layout */
#namap .namap-template-compact .namap-org-card {
    padding: 20px;
}

#namap .namap-template-compact .namap-logo img {
    max-height: 120px;
}

#namap .namap-template-compact .namap-org-details h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

#namap .namap-template-compact .namap-badge {
    padding: 4px 12px;
    font-size: 0.75em;
}

#namap .namap-template-compact .namap-tagline {
    font-size: 0.95em;
    margin: 10px 0 15px 0;
    padding: 10px;
}

#namap .namap-template-compact .namap-section {
    padding: 15px;
    margin-bottom: 15px;
}

#namap .namap-template-compact .namap-section h4 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

#namap .namap-template-compact .namap-contact-row,
#namap .namap-template-compact .namap-description {
    font-size: 0.9em;
}

#namap .namap-template-compact .namap-social-links a {
    width: 35px;
    height: 35px;
    font-size: 16px;
}

/* DETAILED TEMPLATE - Two-column layout with emphasis */
#namap .namap-template-detailed .namap-org-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px;
}

#namap .namap-template-detailed .namap-logo {
    grid-column: 1;
    grid-row: 1 / span 2;
    text-align: center;
    margin: 0;
}

#namap .namap-template-detailed .namap-logo img {
    max-height: 250px;
    width: 100%;
    object-fit: contain;
}

#namap .namap-template-detailed .namap-org-details {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
}

#namap .namap-template-detailed .namap-org-details h3 {
    text-align: left;
    font-size: 2em;
    margin-bottom: 15px;
}

#namap .namap-template-detailed .namap-badge {
    display: inline-block;
    margin: 0;
}

#namap .namap-template-detailed .namap-tagline {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
    margin: 0;
}

#namap .namap-template-detailed .namap-section {
    grid-column: 1 / -1;
    border-left: 4px solid #42a5cc;
    padding-left: 20px;
}

#namap .namap-template-detailed .namap-mission,
#namap .namap-template-detailed .namap-description {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    #namap .namap-template-detailed .namap-org-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #namap .namap-template-detailed .namap-logo {
        grid-column: 1;
        grid-row: 1;
    }
    
    #namap .namap-template-detailed .namap-org-details {
        grid-column: 1;
        grid-row: 2;
    }
    
    #namap .namap-template-detailed .namap-org-details h3 {
        text-align: center;
    }
    
    #namap .namap-template-detailed .namap-tagline {
        grid-column: 1;
        grid-row: 3;
        text-align: center;
    }
    
    #namap .namap-template-detailed .namap-section {
        grid-column: 1;
    }
}

/* CARD TEMPLATE - Modern card-based design */
#namap .namap-template-card .namap-org-card {
    padding: 0;
    overflow: hidden;
}

#namap .namap-template-card .namap-logo {
    margin: 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#namap .namap-template-card .namap-logo img {
    max-height: 180px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#namap .namap-template-card .namap-org-details {
    padding: 25px 30px 15px;
    background: white;
}

#namap .namap-template-card .namap-org-details h3 {
    font-size: 1.9em;
    color: #667eea;
    margin-bottom: 12px;
}

#namap .namap-template-card .namap-badge {
    margin: 5px 0 0 0;
}

#namap .namap-template-card .namap-tagline {
    margin: 0;
    padding: 20px 30px;
    background: #f8f9fa;
    border-left: none;
    border-top: 3px solid #667eea;
}

#namap .namap-template-card .namap-section {
    margin: 0;
    padding: 25px 30px;
    border-radius: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

#namap .namap-template-card .namap-section:hover {
    background: #f8f9fa;
}

#namap .namap-template-card .namap-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#namap .namap-template-card .namap-section h4 i {
    color: #764ba2;
}

#namap .namap-template-card .namap-website-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

#namap .namap-template-card .namap-website-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#namap .namap-template-card .namap-social-links a {
    transition: all 0.3s ease;
}

#namap .namap-template-card .namap-social-links a:hover {
    transform: scale(1.15);
}

/* Card template - video and link items get subtle backgrounds */
#namap .namap-template-card .namap-video-item,
#namap .namap-template-card .namap-link-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

#namap .namap-template-card .namap-video-item:hover,
#namap .namap-template-card .namap-link-item:hover {
    background: #e9ecef;
}

/* Print styles */
@media print {
    #namap .namap-region-details {
        max-width: 100%;
    }
    
    #namap .namap-org-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    #namap .namap-website-link,
    #namap .namap-social-links a {
        color: #000 !important;
        background: none !important;
    }
}