/**
 * ACSSW Components
 * Reusable UI components used across ALL layouts
 * Buttons, Cards, Forms, Badges, Icons, Modals, etc.
 */

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.5;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-coral);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 113, 125, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 113, 125, 0.4);
}

.btn-secondary {
    background: var(--gradient-green);
    color: white;
    box-shadow: 0 4px 15px rgba(175, 210, 117, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(175, 210, 117, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--coral);
    border: 2px solid var(--coral);
}

.btn-outline:hover {
    background: var(--coral);
    color: white;
}

.btn-outline-green {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--green);
}

.btn-outline-green:hover {
    background: var(--green);
    color: white;
}

.btn-large {
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 700;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   CARDS
   ======================================== */

/* Base Card */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Service Card */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-coral);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
}

.service-icon svg {
    width: 56px;
    height: 56px;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--coral);
}

.service-card p {
    color: var(--brown);
    line-height: 1.8;
    margin-bottom: 0;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-coral);
}

.profile-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 4px solid var(--coral);
    flex-shrink: 0;
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    background: var(--gradient-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.profile-info {
    flex: 1;
}

.profile-name {
    color: var(--brown);
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: var(--font-display);
}

.profile-title {
    color: var(--coral);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-credentials {
    color: var(--gray-blue);
    font-size: 15px;
}

.profile-bio {
    color: var(--brown);
    font-size: 16px;
    line-height: 1.8;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-content {
    padding: 24px;
}

.event-date {
    display: inline-block;
    background: var(--gradient-coral);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.event-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--brown);
}

.event-card p {
    color: var(--brown);
    margin-bottom: 16px;
}

/* Resource Card */
.resource-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--coral);
}

.resource-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.resource-icon {
    font-size: 40px;
    margin-bottom: 16px;
    color: var(--coral);
}

.resource-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--brown);
}

.resource-card p {
    color: var(--brown);
    margin-bottom: 16px;
    font-size: 15px;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--gray-blue);
}

.article-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--brown);
}

.article-excerpt {
    color: var(--brown);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.badge-coral {
    background: var(--light-coral);
    color: var(--coral);
}

.badge-green {
    background: var(--light-green);
    color: var(--green);
}

.badge-blue {
    background: rgba(194, 202, 208, 0.2);
    color: var(--gray-blue);
}

.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ========================================
   FORMS
   ======================================== */

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

.form-label {
    display: block;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 8px;
    font-size: 15px;
}

.form-label.required::after {
    content: '*';
    color: var(--coral);
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 18px 18px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--brown);
    transition: all 0.3s ease;
    background: white;
    line-height: 1.4;
    min-height: 52px;
    box-sizing: border-box;
}

/* Ensure ALL inputs get proper styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
    padding: 18px 18px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--brown);
    line-height: 1.4;
    min-height: 52px;
    box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: #888888;
    font-size: 15px;
    line-height: 1.4;
}

/* Additional styling for contact forms */
.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 18px 18px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 52px;
    box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #888888;
    font-size: 15px;
    line-height: 1.4;
}

.contact-form .form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 8px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(231, 113, 125, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-checkbox,
.form-radio {
    margin-right: 8px;
}

.form-help {
    font-size: 14px;
    color: var(--gray-blue);
    margin-top: 6px;
}

.form-error {
    font-size: 14px;
    color: var(--coral);
    margin-top: 6px;
}

.form-input.error {
    border-color: var(--coral);
}

/* ========================================
   ICONS
   ======================================== */

.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.icon-large {
    width: 48px;
    height: 48px;
}

.icon-small {
    width: 16px;
    height: 16px;
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: var(--gray-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    line-height: 1;
}

.modal-close:hover {
    color: var(--coral);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 28px;
    color: var(--coral);
    margin-bottom: 8px;
}

.modal-body {
    color: var(--brown);
    line-height: 1.8;
}

/* ========================================
   ACCORDIONS
   ======================================== */

.accordion-item {
    border: 1px solid rgba(194, 202, 208, 0.3);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-header {
    padding: 20px 24px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: var(--light-coral);
}

.accordion-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--brown);
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--coral);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding: 0 24px 20px 24px;
    color: var(--brown);
    line-height: 1.8;
}

/* ========================================
   TABS
   ======================================== */

.tabs {
    border-bottom: 2px solid var(--gray-blue);
    margin-bottom: 30px;
}

.tab-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--brown);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: width 0.3s ease;
}

.tab-button:hover,
.tab-button.active {
    color: var(--coral);
}

.tab-button.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* ========================================
   ALERTS
   ======================================== */

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: var(--light-green);
    color: var(--green);
    border-left: 4px solid var(--green);
}

.alert-info {
    background: rgba(194, 202, 208, 0.2);
    color: var(--gray-blue);
    border-left: 4px solid var(--gray-blue);
}

.alert-warning {
    background: var(--light-coral);
    color: var(--coral);
    border-left: 4px solid var(--coral);
}

/* ========================================
   PROGRESS INDICATORS
   ======================================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(194, 202, 208, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-coral);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(231, 113, 125, 0.2);
    border-top-color: var(--coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar,
    .profile-avatar-placeholder {
        margin: 0 auto 20px;
    }
    
    .tab-list {
        flex-wrap: wrap;
    }
}
