/* ==============================================================
   TOURNAMENT FORMS - PREMIUM SPORTS FEDERATION STYLES
   ============================================================== */

/* --- Typography & Base --- */
:root {
    --tf-primary: #1e3a8a; /* Deep Blue */
    --tf-secondary: #dc2626; /* Federation Red */
    --tf-accent: #0284c7; /* Light Blue */
    --tf-dark: #0f172a; /* Slate 900 */
    --tf-light: #f8fafc; /* Slate 50 */
    --tf-glass-bg: rgba(255, 255, 255, 0.85);
    --tf-glass-border: rgba(255, 255, 255, 0.4);
    --tf-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body {
    background-color: #f1f5f9;
}

/* --- Hero Banner --- */
.tf-hero {
    background-image: linear-gradient(135deg, rgba(15,23,42,0.45) 0%, rgba(30,58,138,0.75) 100%), url('../images/tournament_forms_banner.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.tf-hero::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: #f1f5f9;
    transform: skewY(-2deg);
}

.tf-breadcrumb {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 25px;
    color: white;
    font-size: 0.9rem;
}

.tf-breadcrumb a {
    color: #93c5fd;
    text-decoration: none;
    transition: 0.3s;
}

.tf-breadcrumb a:hover {
    color: white;
}

.tf-breadcrumb span.sep {
    margin: 0 10px;
    color: rgba(255,255,255,0.5);
}

.tf-hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.tf-hero p.subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 600px;
    margin-bottom: 35px;
    line-height: 1.6;
}

.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.tf-btn i {
    margin-right: 8px;
}

.tf-btn-primary {
    background: var(--tf-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.tf-btn-primary:hover {
    background: #b91c1c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.5);
}

.tf-btn-outline {
    background: transparent;
    border: 2px solid var(--tf-secondary);
    color: var(--tf-secondary);
}

.tf-btn-outline:hover {
    background: var(--tf-secondary);
    color: white;
}

/* --- Layout --- */
.tf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.tf-layout {
    display: flex;
    gap: 40px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

/* --- Sticky Sidebar --- */
.tf-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.tf-sidebar-inner {
    position: sticky;
    top: 120px;
    background: var(--tf-glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--tf-glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--tf-shadow);
}

.tf-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tf-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.tf-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tf-nav-list li {
    margin-bottom: 10px;
}

.tf-nav-list a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.3s;
}

.tf-nav-list a i {
    margin-right: 12px;
    color: #94a3b8;
    transition: 0.3s;
}

.tf-nav-list a:hover, .tf-nav-list a.active {
    background: #eff6ff;
    color: var(--tf-primary);
}

.tf-nav-list a:hover i, .tf-nav-list a.active i {
    color: var(--tf-primary);
}

/* --- Main Content --- */
.tf-main {
    flex: 1;
    padding-bottom: 80px;
}

.tf-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--tf-shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.tf-section-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tf-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tf-dark);
    position: relative;
    padding-left: 20px;
}

.tf-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 6px;
    background: var(--tf-secondary);
    border-radius: 10px;
}

/* --- Search & Filter --- */
.tf-controls {
    display: flex;
    gap: 15px;
}

.tf-search {
    position: relative;
}

.tf-search input {
    padding: 12px 20px 12px 45px;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    outline: none;
    font-size: 0.95rem;
    width: 250px;
    transition: 0.3s;
}

.tf-search input:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.tf-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* --- Forms Grid --- */
.tf-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.tf-form-card {
    background: var(--tf-light);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.tf-form-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.tf-form-image {
    width: 100%;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #eff6ff;
    border: 1px solid rgba(0,0,0,0.05);
}

.tf-form-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tf-form-card:hover .tf-form-image img {
    transform: scale(1.05);
}

.tf-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: #fef2f2;
    color: var(--tf-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.tf-form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tf-dark);
    margin-bottom: 10px;
}

.tf-form-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.tf-form-actions {
    display: flex;
    gap: 10px;
}

.tf-form-actions .tf-btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* --- Submission Form --- */
.tf-submission-box {
    background: linear-gradient(to right bottom, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
}

.tf-input-group {
    margin-bottom: 20px;
}

.tf-input-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tf-input, .tf-select, .tf-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    color: #0f172a;
    transition: 0.3s;
    background: white;
}

.tf-input:focus, .tf-select:focus, .tf-textarea:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    outline: none;
}

.tf-file-upload {
    border: 2px dashed #cbd5e1;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: 0.3s;
}

.tf-file-upload:hover {
    border-color: var(--tf-primary);
    background: #eff6ff;
}

.tf-file-upload i {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.tf-file-upload p {
    color: #64748b;
    margin: 0;
}

/* --- Animated Categories --- */
.tf-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.tf-cat-card {
    background: var(--tf-primary);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.4s;
}

.tf-cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    z-index: -1;
    transition: 0.5s;
}

.tf-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.3);
}

.tf-cat-card:hover::before {
    left: 100%;
}

.tf-cat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tf-cat-title {
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- FAQ Accordion --- */
.tf-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.tf-faq-header {
    padding: 20px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--tf-dark);
    transition: 0.3s;
}

.tf-faq-header:hover {
    background: #f8fafc;
}

.tf-faq-header.active {
    color: var(--tf-primary);
    border-bottom: 1px solid #e2e8f0;
}

.tf-faq-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #f8fafc;
    color: #475569;
    line-height: 1.6;
}

.tf-faq-header.active + .tf-faq-content {
    padding: 20px;
    max-height: 500px;
}

/* --- Instructions --- */
.tf-instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tf-inst-card {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.tf-inst-card i {
    color: #ea580c;
    font-size: 1.5rem;
    margin-top: 3px;
}

.tf-inst-card h4 {
    color: #9a3412;
    margin: 0 0 5px 0;
    font-size: 1.05rem;
}

.tf-inst-card p {
    color: #c2410c;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Support Cards --- */
.tf-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tf-support-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
}

.tf-support-card:hover {
    border-color: var(--tf-primary);
}

.tf-sup-icon {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    color: var(--tf-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tf-support-card.whatsapp .tf-sup-icon {
    background: #dcfce7;
    color: #16a34a;
}

.tf-sup-info h4 {
    margin: 0 0 5px 0;
    color: var(--tf-dark);
}

.tf-sup-info p {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

/* --- Modal --- */
.tf-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.tf-modal.active {
    display: flex;
    opacity: 1;
}

.tf-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9);
    transition: 0.3s;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.tf-modal.active .tf-modal-content {
    transform: scale(1);
}

.tf-modal-header {
    padding: 20px 25px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tf-modal-header h3 {
    margin: 0;
    color: var(--tf-dark);
}

.tf-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    transition: 0.3s;
}

.tf-modal-close:hover {
    color: var(--tf-secondary);
}

.tf-modal-body {
    padding: 40px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .tf-layout { flex-direction: column; }
    .tf-sidebar { width: 100%; }
    .tf-sidebar-inner { position: static; display: flex; overflow-x: auto; padding: 15px; }
    .tf-nav-list { display: flex; gap: 15px; margin: 0; }
    .tf-nav-list a { white-space: nowrap; padding: 8px 15px; }
    .tf-hero { padding: 80px 0 60px; }
}

@media (max-width: 768px) {
    .tf-hero h1 { font-size: 2.5rem; }
    .tf-section { padding: 25px; border-radius: 16px; margin-bottom: 25px; }
    .tf-search input { width: 100%; }
    .tf-section-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .tf-controls { width: 100%; }
    .tf-forms-grid { grid-template-columns: 1fr; }
    .tf-support-grid { grid-template-columns: 1fr; }
    .tf-submission-box { padding: 25px 20px; }
}

@media (max-width: 480px) {
    .tf-hero { padding: 60px 0 40px; }
    .tf-hero h1 { font-size: 1.8rem; }
    .tf-hero p.subtitle { font-size: 1rem; }
    .tf-section-title { font-size: 1.5rem; }
    .tf-btn { padding: 10px 20px; font-size: 0.9rem; }
    .tf-cat-grid { grid-template-columns: 1fr; }
    .tf-modal-body { padding: 25px 20px; }
    .tf-form-actions { flex-direction: column; }
}
