/**
 * Animated Header Pro - Complete Frontend Styles
 * File: assets/css/frontend.css
 * Version: 2.0.2 - FIXED
 */

/* ========================================
   CRITICAL OVERLAY FIXES
   ======================================== */

/* Force overlay to display */
.ahp-overlay,
.ahp-overlay-bd {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 3 !important;
    pointer-events: none !important;
    display: block !important;
    visibility: visible !important;
}

/* ========================================
   Base Header Styles
   ======================================== */
.ahp-hero-header,
.ahp-hero-header-bd {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    isolation: isolate;
}

/* ========================================
   Z-INDEX STACKING
   ======================================== */

.ahp-background-container,
.ahp-background-container-bd {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1 !important;
}

.ahp-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ahp-waves-container,
.ahp-blobs-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2 !important;
}

.ahp-particles,
.ahp-particles-bd {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 4 !important;
}

.ahp-geometric-shapes,
.ahp-geometric-shapes-bd {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 5 !important;
}

.ahp-header-content,
.ahp-header-content-bd {
    position: relative;
    z-index: 10 !important;
    text-align: center;
    color: white;
    padding: 0 20px;
    max-width: 1200px;
    width: 100%;
}

.ahp-scroll-indicator,
.ahp-scroll-indicator-bd {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11 !important;
}

/* ========================================
   Background Animations
   ======================================== */

.ahp-background-container {
    background-size: 400% 400%;
    animation: ahpGradientShift 15s ease infinite;
}

@keyframes ahpGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Aurora Effect */
.ahp-aurora-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: linear-gradient(
        60deg,
        rgba(76, 200, 200, 0.3) 0%,
        rgba(32, 32, 51, 0) 40%,
        rgba(32, 32, 51, 0) 60%,
        rgba(140, 90, 220, 0.3) 100%
    );
    animation: ahpAurora 15s ease-in-out infinite;
    filter: blur(60px);
}

@keyframes ahpAurora {
    0%, 100% { transform: translate(0%, 0%) rotate(0deg); }
    33% { transform: translate(-10%, -10%) rotate(120deg); }
    66% { transform: translate(10%, -5%) rotate(240deg); }
}

/* ========================================
   Overlay Patterns
   ======================================== */

.ahp-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ahp-pattern-dots {
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

.ahp-pattern-grid {
    background-image: 
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
}

.ahp-pattern-diagonal {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0.05) 20px
    );
}

.ahp-pattern-hexagon {
    background-image: 
        radial-gradient(circle at 0% 50%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 60%),
        radial-gradient(circle at 50% 100%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 60%),
        radial-gradient(circle at 100% 50%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 60%);
    background-size: 80px 140px;
}

.ahp-pattern-triangle {
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.05) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
}

.ahp-pattern-circuit {
    background-image: 
        linear-gradient(90deg, transparent 98%, rgba(255,255,255,0.12) 98%),
        linear-gradient(0deg, transparent 98%, rgba(255,255,255,0.12) 98%),
        linear-gradient(45deg, transparent 74%, rgba(255,255,255,0.08) 75%, rgba(255,255,255,0.08) 76%, transparent 77%);
    background-size: 25px 25px, 25px 25px, 25px 25px;
}

.ahp-pattern-noise {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.1"/></svg>');
    background-repeat: repeat;
}

/* ========================================
   Title Animations
   ======================================== */

.ahp-title-gradient {
    background: linear-gradient(45deg, #fff, #00d4ff, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ahpTitleGradient 3s ease infinite;
}

@keyframes ahpTitleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ahp-title-neon {
    color: #fff;
    text-shadow:
        0 0 10px #00d4ff,
        0 0 20px #00d4ff,
        0 0 30px #00d4ff,
        0 0 40px #00d4ff;
    animation: ahpNeonFlicker 1.5s infinite alternate;
}

@keyframes ahpNeonFlicker {
    0%, 100% {
        text-shadow:
            0 0 10px #00d4ff,
            0 0 20px #00d4ff,
            0 0 30px #00d4ff;
    }
    50% {
        text-shadow:
            0 0 20px #00d4ff,
            0 0 30px #00d4ff,
            0 0 40px #00d4ff,
            0 0 50px #00d4ff;
    }
}

.ahp-title-holographic {
    background: linear-gradient(
        45deg,
        #ff0080,
        #ff8c00,
        #ffd700,
        #00ff00,
        #00ffff,
        #ff00ff,
        #ff0080
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ahpHolographic 3s ease infinite;
}

@keyframes ahpHolographic {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   Particles
   ======================================== */

.ahp-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    animation: ahpFloat 20s infinite linear;
}

@keyframes ahpFloat {
    from {
        transform: translateY(100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    to {
        transform: translateY(-100vh);
        opacity: 0;
    }
}

/* ========================================
   Geometric Shapes
   ======================================== */

.ahp-shape {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: ahpRotate 20s infinite linear;
}

.ahp-shape1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -150px;
    animation-duration: 25s;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.ahp-shape2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: -100px;
    animation-duration: 20s;
    animation-direction: reverse;
    border-radius: 50%;
}

.ahp-shape3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
}

@keyframes ahpRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Content Styles
   ======================================== */

.ahp-main-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.1;
    opacity: 0;
    animation: ahpFadeInUp 1s ease-out forwards;
    color: #ffffff;
}

.ahp-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);
    opacity: 0;
    animation: ahpFadeInUp 1s ease-out 0.3s forwards;
    line-height: 1.5;
}

@keyframes ahpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ahp-cta-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: ahpFadeInUp 1s ease-out 0.6s forwards;
}

.ahp-cta-button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ahp-primary-btn {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 47, 247, 0.3);
}

.ahp-primary-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.ahp-secondary-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.ahp-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* ========================================
   Scroll Indicator
   ======================================== */

.ahp-scroll-indicator {
    cursor: pointer;
    animation: ahpBounce 2s infinite;
}

@keyframes ahpBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .ahp-main-title {
        font-size: clamp(2.5rem, 7vw, 5rem);
    }
    
    .ahp-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
    }
}

@media (max-width: 768px) {
    .ahp-cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .ahp-cta-button {
        width: 100%;
        max-width: 280px;
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .ahp-shape1 {
        width: 200px;
        height: 200px;
    }
    
    .ahp-shape2 {
        width: 150px;
        height: 150px;
    }
    
    .ahp-shape3 {
        width: 100px;
        height: 100px;
    }
    
    /* Increase overlay opacity for better readability on mobile */
    .ahp-overlay {
        opacity: 0.6 !important;
    }
}

@media (max-width: 480px) {
    .ahp-main-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        letter-spacing: 1px;
    }
    
    .ahp-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        letter-spacing: 1px;
        margin-bottom: 30px;
    }
    
    .ahp-header-content {
        padding: 0 15px;
    }
    
    .ahp-overlay {
        opacity: 0.7 !important;
    }
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .ahp-particles,
    .ahp-geometric-shapes,
    .ahp-scroll-indicator,
    .ahp-aurora-bg {
        display: none !important;
    }
    
    .ahp-background-container {
        animation: none !important;
        background: #f0f0f0 !important;
    }
    
    .ahp-main-title,
    .ahp-subtitle {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        animation: none !important;
        opacity: 1 !important;
    }
    
    .ahp-overlay {
        display: none !important;
    }
}

/* ========================================
   Elementor Editor Styles
   ======================================== */

.elementor-editor-active .ahp-overlay {
    outline: 2px dashed rgba(255, 255, 255, 0.3);
    outline-offset: -2px;
}

.elementor-editor-active .ahp-overlay:hover {
    outline-color: rgba(255, 255, 255, 0.6);
}

/**
 * Enhanced Button Hover Animations
 * ADD THIS to the bottom of your frontend.css file
 */

/* ========================================
   Button Hover Animation Classes
   ======================================== */

/* Lift Animation */
.ahp-hover-lift:hover {
    transform: translateY(-5px);
}

/* Scale Animation */
.ahp-hover-scale:hover {
    transform: scale(1.05);
}

/* Both Lift + Scale */
.ahp-hover-both:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Smooth transition for all button hover effects */
.ahp-cta-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Elementor Editor Preview Fixes
   ======================================== */

/* Ensure content is visible in editor */
.elementor-editor-active .ahp-hero-header {
    min-height: 600px;
}

/* Make overlay visible in editor */
.elementor-editor-active .ahp-overlay {
    display: block !important;
    visibility: visible !important;
}

/* Show particle preview in editor */
.elementor-editor-active .ahp-particle {
    opacity: 0.8;
    animation: ahpFloat 10s infinite linear;
}

/* Editor helper outline */
.elementor-editor-active .ahp-header-content {
    outline: 1px dashed rgba(255, 255, 255, 0.2);
    outline-offset: 10px;
}

/* Highlight active areas in editor */
.elementor-editor-active .ahp-main-title:hover,
.elementor-editor-active .ahp-subtitle:hover,
.elementor-editor-active .ahp-cta-button:hover {
    outline: 2px dashed rgba(0, 212, 255, 0.6);
    outline-offset: 5px;
}

/* ========================================
   Content Width Responsiveness
   ======================================== */

/* Ensure content width is respected on all devices */
.ahp-header-content {
    width: 100%;
    margin: 0 auto;
}

/* Mobile content width adjustments */
@media (max-width: 768px) {
    .ahp-header-content {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ========================================
   Button Size Customization Support
   ======================================== */

/* Support for custom button font sizes */
.ahp-primary-btn,
.ahp-secondary-btn {
    font-size: inherit;
    line-height: 1.4;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    text-decoration: none;
}

/* Ensure button text doesn't wrap unless needed */
.ahp-cta-button {
    flex-shrink: 0;
}

/* ========================================
   Typography Inheritance
   ======================================== */

/* Ensure typography settings are properly inherited */
.ahp-main-title,
.ahp-subtitle,
.ahp-primary-btn,
.ahp-secondary-btn {
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-transform: inherit;
    text-decoration: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    line-height: inherit;
}

/* ========================================
   Elementor Global Colors Support
   ======================================== */

/* Support for Elementor global colors */
.ahp-hero-header [class*="elementor-"] {
    color: inherit;
}

/* ========================================
   Live Preview Enhancements
   ======================================== */

/* Smooth transitions for live editing */
.elementor-editor-active .ahp-hero-header * {
    transition: all 0.2s ease;
}

/* Prevent layout shifts during editing */
.elementor-editor-active .ahp-hero-header {
    min-height: 500px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ========================================
   Border Radius Support
   ======================================== */

/* Ensure border radius works properly */
.ahp-primary-btn,
.ahp-secondary-btn {
    overflow: hidden;
    position: relative;
}

/* ========================================
   Box Shadow Support
   ======================================== */

/* Enhance box shadow rendering */
.ahp-primary-btn,
.ahp-secondary-btn {
    transform-origin: center;
    will-change: transform, box-shadow;
}

/* ========================================
   Text Shadow Support
   ======================================== */

/* Ensure text shadows render properly */
.ahp-main-title,
.ahp-subtitle {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Button Gap Customization
   ======================================== */

/* Flexible button container */
.ahp-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Maintain gap on wrap */
@media (max-width: 480px) {
    .ahp-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ahp-cta-button {
        width: 100%;
        max-width: 300px;
    }
}

/* ========================================
   Hover State Optimization
   ======================================== */

/* Optimize hover performance */
.ahp-cta-button:hover {
    will-change: transform;
}

/* Prevent hover on touch devices */
@media (hover: none) {
    .ahp-cta-button:hover {
        transform: none;
    }
}

/* ========================================
   Focus States for Accessibility
   ======================================== */

.ahp-cta-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

.ahp-cta-button:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Print Optimization
   ======================================== */

@media print {
    .ahp-cta-button {
        border: 2px solid #000 !important;
        color: #000 !important;
        background: #fff !important;
    }
}

/* ========================================
   RTL Support
   ======================================== */

.rtl .ahp-cta-buttons {
    flex-direction: row-reverse;
}

/* ========================================
   High Contrast Mode
   ======================================== */

@media (prefers-contrast: high) {
    .ahp-overlay {
        opacity: 0.8 !important;
    }
    
    .ahp-main-title,
    .ahp-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .ahp-cta-button {
        border: 3px solid !important;
    }
}

/**
 * Enhanced Button Hover Animations
 * ADD THIS to the bottom of your frontend.css file
 */

/* ========================================
   Button Hover Animation Classes
   ======================================== */

/* Lift Animation */
.ahp-hover-lift:hover {
    transform: translateY(-5px);
}

/* Scale Animation */
.ahp-hover-scale:hover {
    transform: scale(1.05);
}

/* Both Lift + Scale */
.ahp-hover-both:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Smooth transition for all button hover effects */
.ahp-cta-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Elementor Editor Preview Fixes
   ======================================== */

/* Ensure content is visible in editor */
.elementor-editor-active .ahp-hero-header {
    min-height: 600px;
}

/* Make overlay visible in editor */
.elementor-editor-active .ahp-overlay {
    display: block !important;
    visibility: visible !important;
}

/* Show particle preview in editor */
.elementor-editor-active .ahp-particle {
    opacity: 0.8;
    animation: ahpFloat 10s infinite linear;
}

/* Editor helper outline */
.elementor-editor-active .ahp-header-content {
    outline: 1px dashed rgba(255, 255, 255, 0.2);
    outline-offset: 10px;
}

/* Highlight active areas in editor */
.elementor-editor-active .ahp-main-title:hover,
.elementor-editor-active .ahp-subtitle:hover,
.elementor-editor-active .ahp-cta-button:hover {
    outline: 2px dashed rgba(0, 212, 255, 0.6);
    outline-offset: 5px;
}

/* ========================================
   Content Width Responsiveness
   ======================================== */

/* Ensure content width is respected on all devices */
.ahp-header-content {
    width: 100%;
    margin: 0 auto;
}

/* Mobile content width adjustments */
@media (max-width: 768px) {
    .ahp-header-content {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ========================================
   Button Size Customization Support
   ======================================== */

/* Support for custom button font sizes */
.ahp-primary-btn,
.ahp-secondary-btn {
    font-size: inherit;
    line-height: 1.4;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    text-decoration: none;
}

/* Ensure button text doesn't wrap unless needed */
.ahp-cta-button {
    flex-shrink: 0;
}

/* ========================================
   Typography Inheritance
   ======================================== */

/* Ensure typography settings are properly inherited */
.ahp-main-title,
.ahp-subtitle,
.ahp-primary-btn,
.ahp-secondary-btn {
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-transform: inherit;
    text-decoration: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    line-height: inherit;
}

/* ========================================
   Elementor Global Colors Support
   ======================================== */

/* Support for Elementor global colors */
.ahp-hero-header [class*="elementor-"] {
    color: inherit;
}

/* ========================================
   Live Preview Enhancements
   ======================================== */

/* Smooth transitions for live editing */
.elementor-editor-active .ahp-hero-header * {
    transition: all 0.2s ease;
}

/* Prevent layout shifts during editing */
.elementor-editor-active .ahp-hero-header {
    min-height: 500px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ========================================
   Border Radius Support
   ======================================== */

/* Ensure border radius works properly */
.ahp-primary-btn,
.ahp-secondary-btn {
    overflow: hidden;
    position: relative;
}

/* ========================================
   Box Shadow Support
   ======================================== */

/* Enhance box shadow rendering */
.ahp-primary-btn,
.ahp-secondary-btn {
    transform-origin: center;
    will-change: transform, box-shadow;
}

/* ========================================
   Text Shadow Support
   ======================================== */

/* Ensure text shadows render properly */
.ahp-main-title,
.ahp-subtitle {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Button Gap Customization
   ======================================== */

/* Flexible button container */
.ahp-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; /* Default center alignment */
}

/* Maintain gap on wrap */
@media (max-width: 480px) {
    .ahp-cta-buttons {
        flex-direction: column;
        align-items: stretch;
        justify-content: center !important; /* Force center on mobile for better UX */
    }
    
    .ahp-cta-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto; /* Center buttons on mobile */
    }
}

/* ========================================
   Hover State Optimization
   ======================================== */

/* Optimize hover performance */
.ahp-cta-button:hover {
    will-change: transform;
}

/* Prevent hover on touch devices */
@media (hover: none) {
    .ahp-cta-button:hover {
        transform: none;
    }
}

/* ========================================
   Focus States for Accessibility
   ======================================== */

.ahp-cta-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

.ahp-cta-button:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Print Optimization
   ======================================== */

@media print {
    .ahp-cta-button {
        border: 2px solid #000 !important;
        color: #000 !important;
        background: #fff !important;
    }
}

/* ========================================
   RTL Support
   ======================================== */

.rtl .ahp-cta-buttons {
    flex-direction: row-reverse;
}

/* ========================================
   High Contrast Mode
   ======================================== */

@media (prefers-contrast: high) {
    .ahp-overlay {
        opacity: 0.8 !important;
    }
    
    .ahp-main-title,
    .ahp-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .ahp-cta-button {
        border: 3px solid !important;
    }
}