/* ========================================
   EAFE Icon Box Widget - Base Styles
   ======================================== */

.eafe-icon-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.eafe-icon-box * {
    box-sizing: border-box;
}

.eafe-icon-box-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eafe-icon-box-text-content {
    flex: 1;
    width: 100%;
}

.eafe-icon-box-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.eafe-icon-box-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

/* Image icon styling */
.eafe-icon-box-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.eafe-icon-box-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.eafe-icon-box-description {
    margin: 0;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.eafe-icon-box-button {
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    line-height: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.eafe-icon-box-button:hover {
    text-decoration: none;
}

.eafe-icon-box-link {
    text-decoration: none;
    color: inherit;
}

.eafe-icon-box-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Template 1: Outline box with white background
   ======================================== */

.eafe-icon-box.template-1 {
    background-color: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.eafe-icon-box.template-1:hover {
    border-color: #007cba;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
    transform: translateY(-5px);
}

.eafe-icon-box.template-1 .eafe-icon-box-icon {
    color: #007cba;
    margin-bottom: 25px;
    font-size: 48px;
}

.eafe-icon-box.template-1:hover .eafe-icon-box-icon {
    transform: scale(1.1);
    color: #005a87;
}

.eafe-icon-box.template-1 .eafe-icon-box-title {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
}

.eafe-icon-box.template-1 .eafe-icon-box-description {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
}

.eafe-icon-box.template-1 .eafe-icon-box-button {
    background-color: #007cba;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eafe-icon-box.template-1 .eafe-icon-box-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* ========================================
   Icon Position Styles
   ======================================== */

/* Top Position (Default) */
.eafe-icon-box.icon-position-top .eafe-icon-box-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.eafe-icon-box.icon-position-top .eafe-icon-box-icon {
    margin-bottom: 20px;
}

/* Left Position */
.eafe-icon-box.icon-position-left .eafe-icon-box-content {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
}

.eafe-icon-box.icon-position-left .eafe-icon-box-icon {
    margin-right: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.eafe-icon-box.icon-position-left .eafe-icon-box-text-content {
    flex: 1;
}

/* Right Position */
.eafe-icon-box.icon-position-right .eafe-icon-box-content {
    flex-direction: row-reverse;
    align-items: flex-start;
    text-align: right;
}

.eafe-icon-box.icon-position-right .eafe-icon-box-icon {
    margin-left: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.eafe-icon-box.icon-position-right .eafe-icon-box-text-content {
    flex: 1;
}

/* Bottom Position */
.eafe-icon-box.icon-position-bottom .eafe-icon-box-content {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
}

.eafe-icon-box.icon-position-bottom .eafe-icon-box-icon {
    margin-top: 20px;
    margin-bottom: 0;
}

/* ========================================
   Template 2: Borderless background with different content color
   ======================================== */

.eafe-icon-box.template-2 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 16px;
    padding: 45px 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.eafe-icon-box.template-2:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

.eafe-icon-box.template-2 .eafe-icon-box-icon {
    color: #e74c3c;
    margin-bottom: 30px;
    font-size: 52px;
    filter: drop-shadow(0 4px 8px rgba(231, 76, 60, 0.2));
}

.eafe-icon-box.template-2:hover .eafe-icon-box-icon {
    color: #c0392b;
    transform: rotate(5deg) scale(1.05);
}

.eafe-icon-box.template-2 .eafe-icon-box-title {
    color: #2c3e50;
    font-size: 26px;
    margin-bottom: 18px;
    font-weight: 700;
}

.eafe-icon-box.template-2 .eafe-icon-box-description {
    color: #34495e;
    font-size: 17px;
    margin-bottom: 28px;
    opacity: 0.9;
}

.eafe-icon-box.template-2 .eafe-icon-box-button {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.eafe-icon-box.template-2 .eafe-icon-box-button:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* ========================================
   Template 3: Multicolor badge with high-level customization
   ======================================== */

.eafe-icon-box.template-3 {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 50px 40px;
    position: relative;
    overflow: visible;
}

.eafe-icon-box.template-3::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3);
    border-radius: 23px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.eafe-icon-box.template-3:hover::before {
    opacity: 1;
}

.eafe-icon-box.template-3:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.eafe-icon-box.template-3 .eafe-icon-box-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 30px;
    font-size: 36px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.eafe-icon-box.template-3:hover .eafe-icon-box-icon {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.eafe-icon-box.template-3 .eafe-icon-box-title {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eafe-icon-box.template-3 .eafe-icon-box-description {
    color: #5a6c7d;
    font-size: 16px;
    margin-bottom: 30px;
}

.eafe-icon-box.template-3 .eafe-icon-box-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.eafe-icon-box.template-3 .eafe-icon-box-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Template 4: Multi-color badge with offset customization
   ======================================== */

.eafe-icon-box.template-4 {
    background: #ffffff;
    border-radius: 24px;
    padding: 60px 45px 45px;
    position: relative;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.eafe-icon-box.template-4:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.eafe-icon-box.template-4 .eafe-icon-box-icon {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    color: #ffffff;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 36px;
    box-shadow: 0 10px 30px rgba(255, 154, 158, 0.4);
    border: 4px solid #ffffff;
}

.eafe-icon-box.template-4:hover .eafe-icon-box-icon {
    background: linear-gradient(45deg, #fecfef 0%, #ff9a9e 50%, #ff9a9e 100%);
    transform: translateX(-50%) rotate(15deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 154, 158, 0.5);
}

.eafe-icon-box.template-4 .eafe-icon-box-title {
    color: #2c3e50;
    font-size: 26px;
    margin-bottom: 18px;
    margin-top: 20px;
    font-weight: 700;
}

.eafe-icon-box.template-4 .eafe-icon-box-description {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
}

.eafe-icon-box.template-4 .eafe-icon-box-button {
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.3);
}

.eafe-icon-box.template-4 .eafe-icon-box-button:hover {
    background: linear-gradient(45deg, #fecfef 0%, #ff9a9e 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
}

/* ========================================
   Template 5: Gradient background color
   ======================================== */

.eafe-icon-box.template-5 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    padding: 50px 40px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.eafe-icon-box.template-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.eafe-icon-box.template-5:hover::before {
    opacity: 1;
}

.eafe-icon-box.template-5:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}

.eafe-icon-box.template-5 .eafe-icon-box-icon {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 56px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 2;
}

.eafe-icon-box.template-5:hover .eafe-icon-box-icon {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

.eafe-icon-box.template-5 .eafe-icon-box-title {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.eafe-icon-box.template-5 .eafe-icon-box-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    margin-bottom: 30px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.eafe-icon-box.template-5 .eafe-icon-box-button {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.eafe-icon-box.template-5 .eafe-icon-box-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Template 6: Circular background and badge
   ======================================== */

.eafe-icon-box.template-6 {
    background: #ffffff;
    border: 2px solid #f1f3f4;
    border-radius: 50%;
    width: 280px;
    height: 280px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    position: relative;
}

.eafe-icon-box.template-6:hover {
    border-color: #28a745;
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.2);
}

.eafe-icon-box.template-6 .eafe-icon-box-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 20px;
    font-size: 32px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.eafe-icon-box.template-6:hover .eafe-icon-box-icon {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: scale(1.15) rotate(-10deg);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

.eafe-icon-box.template-6 .eafe-icon-box-title {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    text-align: center;
}

.eafe-icon-box.template-6 .eafe-icon-box-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
}

.eafe-icon-box.template-6 .eafe-icon-box-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.eafe-icon-box.template-6 .eafe-icon-box-button:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* ========================================
   Template 7: Use of image as background
   ======================================== */

.eafe-icon-box.template-7 {
    background: #2c3e50;
    border: none;
    border-radius: 16px;
    padding: 60px 40px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eafe-icon-box.template-7 .eafe-icon-box-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.eafe-icon-box.template-7::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background 0.3s ease;
}

.eafe-icon-box.template-7:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.eafe-icon-box.template-7:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.eafe-icon-box.template-7 .eafe-icon-box-content {
    position: relative;
    z-index: 2;
}

.eafe-icon-box.template-7 .eafe-icon-box-icon {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 60px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.eafe-icon-box.template-7:hover .eafe-icon-box-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.eafe-icon-box.template-7 .eafe-icon-box-title {
    color: #ffffff;
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.eafe-icon-box.template-7 .eafe-icon-box-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.eafe-icon-box.template-7 .eafe-icon-box-button {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.eafe-icon-box.template-7 .eafe-icon-box-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .eafe-icon-box {
        padding: 30px 20px;
    }

    .eafe-icon-box.template-1,
    .eafe-icon-box.template-2,
    .eafe-icon-box.template-3,
    .eafe-icon-box.template-4,
    .eafe-icon-box.template-5,
    .eafe-icon-box.template-7 {
        padding: 35px 25px;
    }

    .eafe-icon-box.template-6 {
        width: 250px;
        height: 250px;
        padding: 30px 20px;
    }

    .eafe-icon-box-icon {
        font-size: 40px !important;
    }

    .eafe-icon-box.template-3 .eafe-icon-box-icon,
    .eafe-icon-box.template-4 .eafe-icon-box-icon {
        width: 70px;
        height: 70px;
        font-size: 30px !important;
    }

    .eafe-icon-box.template-6 .eafe-icon-box-icon {
        width: 60px;
        height: 60px;
        font-size: 28px !important;
    }

    .eafe-icon-box-title {
        font-size: 22px !important;
    }

    .eafe-icon-box.template-6 .eafe-icon-box-title {
        font-size: 18px !important;
    }

    .eafe-icon-box.template-7 .eafe-icon-box-title {
        font-size: 26px !important;
    }

    .eafe-icon-box-description {
        font-size: 15px !important;
    }

    .eafe-icon-box.template-6 .eafe-icon-box-description {
        font-size: 13px !important;
    }

    /* Mobile icon positioning adjustments */
    .eafe-icon-box.icon-position-left .eafe-icon-box-content,
    .eafe-icon-box.icon-position-right .eafe-icon-box-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .eafe-icon-box.icon-position-left .eafe-icon-box-icon,
    .eafe-icon-box.icon-position-right .eafe-icon-box-icon {
        margin: 0 0 20px 0;
    }

    .eafe-icon-box.icon-position-left .eafe-icon-box-text-content,
    .eafe-icon-box.icon-position-right .eafe-icon-box-text-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .eafe-icon-box.template-6 {
        width: 220px;
        height: 220px;
        padding: 25px 15px;
    }

    .eafe-icon-box.template-7 {
        min-height: 300px;
        padding: 40px 25px;
    }
}

/* ========================================
   Animation Keyframes
   ======================================== */

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Add subtle animations on load */
.eafe-icon-box {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
.eafe-icon-box:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.eafe-icon-box-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .eafe-icon-box {
        break-inside: avoid;
        box-shadow: none !important;
        transform: none !important;
    }

    .eafe-icon-box::before {
        display: none;
    }
}

