/**
 * Advertisement Styles for IndianMarriage.com
 *
 * Comprehensive styles for all ad components:
 * - Ad containers and labels
 * - Banner ads (728x90)
 * - Sidebar ads (300x250)
 * - Native ads (blended with content)
 * - Inline search ads
 * - Interstitial ads
 * - Loading states and placeholders
 * - Responsive designs for mobile/tablet
 */

/* ============================================
   BASE AD CONTAINER STYLES
   ============================================ */

.ad-container {
    position: relative;
    margin: 1.25rem 0;
    overflow: hidden;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.ad-link:hover {
    opacity: 0.9;
}

/* ============================================
   AD LABELS (Sponsored badges)
   ============================================ */

.ad-label {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 0.1875rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.0312rem;
}

.ad-label-corner {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 0.1875rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* ============================================
   BANNER ADS (728x90)
   ============================================ */

.ad-banner-wrapper {
    width: 100%;
    max-width: 45.5rem;
    margin: 1.25rem auto;
    background: #f9f9f9;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.ad-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5.625rem;
    background: #fff;
}

.ad-banner img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ad-banner-text {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ad-banner-text strong {
    font-size: 0.875rem;
    color: #333;
    font-weight: 600;
}

.ad-banner-text span {
    font-size: 0.75rem;
    color: #666;
}

/* ============================================
   SIDEBAR ADS (300x250)
   ============================================ */

.ad-sidebar-wrapper {
    width: 100%;
    max-width: 18.75rem;
    margin: 1.25rem 0;
}

.ad-sidebar {
    position: relative;
    background: #f9f9f9;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-sidebar:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
}

.ad-sidebar-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-sidebar img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 15.625rem;
    object-fit: cover;
}

.ad-sidebar-info {
    padding: 1rem;
    background: #fff;
}

.ad-sidebar-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.ad-sidebar-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   NATIVE ADS (blended with profile cards)
   ============================================ */

.ad-native-card {
    position: relative;
    border: 0.125rem solid #e8e8e8;
}

.ad-native-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 247, 230, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.ad-native-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-native-card .profile-card-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.ad-native-card .profile-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-native-card .profile-card-info {
    padding: 1rem;
}

.ad-native-card .profile-card-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.ad-native-card .profile-card-info p {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.ad-cta {
    display: inline-block;
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.ad-native-card:hover .ad-cta {
    color: #c0392b;
}

/* ============================================
   INLINE SEARCH ADS
   ============================================ */

.search-result-ad {
    margin: 1.25rem 0;
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    border-radius: 0.5rem;
    border: 0.0625rem solid #f0e6d8;
}

.ad-inline-container {
    padding: 1rem;
}

.ad-inline-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.ad-inline-image {
    width: 7.5rem;
    height: 7.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.ad-inline-text {
    flex: 1;
    min-width: 0;
}

.ad-inline-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.ad-inline-text p {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.ad-cta-button {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ad-inline-container:hover .ad-cta-button {
    background: #c0392b;
}

/* ============================================
   INTERSTITIAL ADS
   ============================================ */

.ad-interstitial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ad-interstitial-container {
    position: relative;
    max-width: 37.5rem;
    width: 100%;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(3.125rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ad-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.ad-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ad-interstitial-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 25rem;
    object-fit: cover;
}

.ad-interstitial-info {
    padding: 1.5rem;
    text-align: center;
}

.ad-interstitial-info h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.ad-interstitial-info p {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.ad-cta-large {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ad-cta-large:hover {
    background: #c0392b;
}

.ad-skip-text {
    text-align: center;
    padding: 0.75rem;
    background: #f9f9f9;
    color: #666;
    font-size: 0.8125rem;
    margin: 0;
}

/* ============================================
   AD SLOT (Loading states)
   ============================================ */

.ad-slot {
    position: relative;
    min-height: 6.25rem;
}

.ad-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 6.25rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
}

.ad-loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 0.25rem solid #e0e0e0;
    border-top-color: #e74c3c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ad-content {
    width: 100%;
}

.ad-noscript {
    padding: 1.25rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet (48rem - 63.9375rem) */
@media (max-width: 1023px) {
    .ad-banner-wrapper {
        max-width: 100%;
    }

    .ad-banner {
        min-height: auto;
    }

    .ad-banner img {
        width: 100%;
        height: auto;
    }

    .ad-sidebar-wrapper {
        max-width: 100%;
    }

    .ad-inline-image {
        width: 6.25rem;
        height: 6.25rem;
    }
}

/* Mobile (< 48rem) */
@media (max-width: 767px) {
    .ad-container {
        margin: 1rem 0;
    }

    .ad-banner-wrapper {
        margin: 1rem 0;
    }

    .ad-banner-text {
        position: static;
        background: #fff;
        border-top: 0.0625rem solid #e8e8e8;
    }

    .ad-sidebar-wrapper {
        margin: 1rem 0;
    }

    .ad-sidebar img {
        min-height: 12.5rem;
    }

    .ad-inline-content {
        flex-direction: column;
        text-align: center;
    }

    .ad-inline-image {
        width: 100%;
        max-width: 18.75rem;
        height: auto;
        aspect-ratio: 1;
    }

    .ad-inline-text {
        width: 100%;
    }

    .ad-interstitial-container {
        max-width: 100%;
        margin: 0 0.625rem;
    }

    .ad-interstitial-info {
        padding: 1.25rem 1rem;
    }

    .ad-interstitial-info h3 {
        font-size: 1.25rem;
    }

    .ad-interstitial-info p {
        font-size: 0.875rem;
    }

    /* Hide label text on very small screens */
    .ad-label {
        font-size: 0.625rem;
        padding: 0.1875rem 0.375rem;
    }
}

/* Small mobile (< 30rem) */
@media (max-width: 479px) {
    .ad-native-card .profile-card-info h3 {
        font-size: 1rem;
    }

    .ad-native-card .profile-card-info p {
        font-size: 0.8125rem;
    }

    .ad-inline-text h4 {
        font-size: 1rem;
    }

    .ad-inline-text p {
        font-size: 0.8125rem;
    }

    .ad-sidebar-info h4 {
        font-size: 0.9375rem;
    }

    .ad-sidebar-info p {
        font-size: 0.8125rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.ad-link:focus,
.ad-sidebar-link:focus,
.ad-native-link:focus {
    outline: 0.125rem solid #e74c3c;
    outline-offset: 0.125rem;
}

.ad-close-btn:focus {
    outline: 0.125rem solid #fff;
    outline-offset: 0.125rem;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .ad-container,
    .ad-sidebar,
    .ad-link,
    .ad-cta,
    .ad-cta-button,
    .ad-cta-large,
    .ad-close-btn,
    .ad-interstitial-overlay,
    .ad-interstitial-container {
        animation: none;
        transition: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .ad-container,
    .ad-banner-wrapper,
    .ad-sidebar-wrapper,
    .ad-native-card,
    .search-result-ad,
    .ad-interstitial-overlay,
    .ad-slot {
        display: none !important;
    }
}
