/* ========================================
   MODERN SUBSCRIBE SECTION STYLES
   Trading Platform Design - Newsletter Subscription
   ======================================== */

/* Section Container */
.modern-subscribe-section {
    position: relative;
    padding: 100px 0;
    background: #112025;
    overflow: hidden;
}

/* Animated Background Pattern */
.subscribe-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.25;
    pointer-events: none;
}

.pattern-waves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    animation: wavesFloat 15s ease-in-out infinite;
}

@keyframes wavesFloat {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(5deg); opacity: 0.5; }
}

.pattern-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle, rgba(59, 130, 246, 0.4) 1px, transparent 1px),
        radial-gradient(circle, rgba(16, 185, 129, 0.3) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 25px 25px;
    animation: particlesMove 20s linear infinite;
}

@keyframes particlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Gradient Orbs */
.gradient-orb.orb-subscribe-1 {
    position: absolute;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(130px);
    top: -20%;
    left: -15%;
    animation: floatSubscribeOrb1 16s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb.orb-subscribe-2 {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(130px);
    bottom: -20%;
    right: -15%;
    animation: floatSubscribeOrb2 18s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatSubscribeOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(70px, -50px) scale(1.2); }
    66% { transform: translate(-60px, 60px) scale(0.85); }
}

@keyframes floatSubscribeOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -70px) scale(1.15); }
}

/* Subscribe Container */
.subscribe-container {
    position: relative;
    z-index: 2;
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

.floating-shape.shape-1 {
    top: 10%;
    left: 5%;
    width: 40px;
    height: 40px;
    animation: floatShape1 8s ease-in-out infinite;
}

.floating-shape.shape-2 {
    bottom: 15%;
    right: 8%;
    width: 35px;
    height: 35px;
    animation: floatShape2 10s ease-in-out infinite;
}

.floating-shape.shape-3 {
    top: 50%;
    right: 15%;
    width: 45px;
    height: 45px;
    color: #3b82f6;
    animation: floatShape3 12s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -30px) rotate(180deg); }
}

@keyframes floatShape2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-25px, -20px) rotate(-180deg); }
}

@keyframes floatShape3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(15px, 25px) rotate(360deg) scale(1.2); }
}

.floating-shape img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

/* ===================================
   SUBSCRIBE VISUAL SIDE
   =================================== */

.subscribe-visual {
    position: relative;
    z-index: 2;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* Stat Card */
.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Stat Icon */
.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

/* Stat Info */
.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Subscribe Image Wrapper */
.subscribe-image-wrapper {
    position: relative;
    margin-bottom: 32px;
}

/* Image Decorations */
.image-decoration {
    position: absolute;
    border-radius: 24px;
    opacity: 0.5;
    z-index: 0;
}

.image-decoration.dec-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), transparent);
    top: -25px;
    right: -25px;
    animation: floatDec1 9s ease-in-out infinite;
}

.image-decoration.dec-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(225deg, rgba(16, 185, 129, 0.25), transparent);
    bottom: -20px;
    left: -20px;
    animation: floatDec2 11s ease-in-out infinite;
}

@keyframes floatDec1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -15px) rotate(10deg); }
}

@keyframes floatDec2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, -10px) rotate(-8deg); }
}

/* Subscribe Image */
.subscribe-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease;
    z-index: 1;
}

.subscribe-image:hover {
    transform: scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.subscribe-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.subscribe-image:hover img {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%,
        transparent 50%,
        rgba(16, 185, 129, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.subscribe-image:hover .image-overlay {
    opacity: 1;
}

/* Benefits List */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(17, 32, 37, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(17, 32, 37, 0.7);
    transform: translateX(8px);
}

.benefit-item svg {
    width: 20px;
    height: 20px;
    color: #10b981;
    flex-shrink: 0;
}

.benefit-item span {
    font-size: 15px;
    color: #cbd5e1;
    font-weight: 500;
}

/* ===================================
   SUBSCRIBE FORM SIDE
   =================================== */

.subscribe-content {
    position: relative;
    z-index: 2;
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge svg {
    width: 18px;
    height: 18px;
}

/* Subscribe Title */
.subscribe-title {
    font-size: 48px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subscribe Description */
.subscribe-description {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Modern Subscribe Form */
.modern-subscribe-form {
    margin-bottom: 32px;
}

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

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Input Icon */
.input-icon {
    position: absolute;
    left: 20px;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

/* Subscribe Input */
.subscribe-input {
    width: 100%;
    padding: 18px 55px;
    background: rgba(17, 32, 37, 0.7);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    color: #f8fafc;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.subscribe-input::placeholder {
    color: #64748b;
}

.subscribe-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(17, 32, 37, 0.85);
}

.subscribe-input:focus ~ .input-icon {
    color: #3b82f6;
}

.subscribe-input.valid {
    border-color: #10b981;
}

.subscribe-input.invalid {
    border-color: #ef4444;
}

/* Input Valid Icon */
.input-valid {
    position: absolute;
    right: 20px;
    color: #10b981;
    z-index: 2;
}

.input-valid svg {
    width: 20px;
    height: 20px;
}

/* Input Error */
.input-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
}

/* Subscribe Button */
.subscribe-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.subscribe-btn:hover::before {
    left: 100%;
}

.subscribe-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.subscribe-btn:active {
    transform: translateY(-1px);
}

.subscribe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.subscribe-btn:hover .btn-icon svg {
    transform: translateX(4px);
}

/* Button Loading State */
.subscribe-btn.loading {
    pointer-events: none;
}

/* Spinner Animation */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Button Success State */
.subscribe-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

.trust-item svg {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .modern-subscribe-section {
        padding: 100px 0;
    }

    .subscribe-title {
        font-size: 42px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
    }
}

@media (max-width: 991px) {
    .modern-subscribe-section {
        padding: 80px 0;
    }

    .subscribe-title {
        font-size: 36px;
    }

    .subscribe-description {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .subscribe-visual {
        margin-bottom: 60px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .modern-subscribe-section {
        padding: 60px 0;
    }

    .subscribe-title {
        font-size: 30px;
    }

    .subscribe-description {
        font-size: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .subscribe-input {
        padding: 16px 50px;
        font-size: 15px;
    }

    .subscribe-btn {
        padding: 16px 28px;
        font-size: 16px;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 12px;
    }

    .gradient-orb {
        display: none;
    }
}

@media (max-width: 575px) {
    .section-badge {
        padding: 8px 20px;
        font-size: 13px;
    }

    .subscribe-title {
        font-size: 26px;
    }

    .benefit-item {
        padding: 10px 14px;
    }

    .benefit-item span {
        font-size: 14px;
    }
}

/* Animation Enhancements */
[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modern-subscribe-section {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0.95) 0%,
            rgba(241, 245, 249, 0.9) 50%,
            rgba(248, 250, 252, 0.95) 100%);
    }

    .stat-card,
    .benefit-item,
    .subscribe-input {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(203, 213, 225, 0.3);
    }

    .subscribe-title {
        background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .stat-value {
        color: #0f172a;
    }

    .stat-label,
    .subscribe-description,
    .benefit-item span {
        color: #475569;
    }

    .subscribe-input {
        color: #0f172a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .benefit-item,
    .subscribe-btn,
    .pattern-waves,
    .pattern-particles,
    .gradient-orb,
    .floating-shape,
    .image-decoration,
    .spinner {
        animation: none;
        transition: none;
    }
}

/* Print Styles */
@media print {
    .modern-subscribe-section {
        background: white;
        padding: 40px 0;
    }

    .gradient-orb,
    .subscribe-bg-pattern,
    .floating-shape,
    .image-decoration,
    .trust-indicators {
        display: none;
    }

    .subscribe-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
