* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #F8FAFC;
    --primary: #4361EE;
    --secondary: #3A0CA3;
    --accent: #4CC9F0;
    --text-main: #2D3748;
    --text-muted: #718096;
    --card-bg: #FFFFFF;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --light-accent: #7209B7;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/*---------------------------------------------------------------------------------------------------*/

/* Enhanced Tracks Page Specific Styles */
.tracks-header {
    padding: 0 0 0 0;  /*padding: 10rem 0 4rem; */
    text-align: center;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.tracks-header::before {
    content: '';
    position: relative;/*absolute*/
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.tracks-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.tracks-header p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.tracks-filter {
  padding: 2rem 0;
  background: var(--bg-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  top: 80px;
  z-index: 100; /* make sure it's above other elements */
  backdrop-filter: blur(10px);
}

.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 1rem;
  position: relative;
  z-index: 200;
}

.filter-tab {
  background: white;
  color: var(--text-muted);
  border: 1px solid #e2e8f0;
  padding: 0.8rem 1.8rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  position: relative;
  z-index: 300;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.25);
}


/* Tracks Grid Section */
.tracks-grid-section {
    padding: 5rem 0;                                                            /*4rem 0 */
    background: var(--bg-main);
    min-height: 100vh;
}

.tracks-container {
    padding:0 0 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

.track-category {
    padding:0 0 0 0;
    margin-bottom: 5rem; /*5rem */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.track-category.hidden {
    padding:0 0 0 0;
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.category-title {
    padding:0 0 0 0;
    font-size: 2.5rem;
    padding:0 0 0 0; /*  padding:1rem 0 0 0; */
    margin-bottom: 3rem;
    color: var(--text-main);
    font-weight: 800;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.category-title::after {
    padding:0 0 0 0;
    content: '';
    position: relative; /*absolute*/
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Tracks Grid */
.tracks-grid {
    padding:0 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

/* Track Card Detailed */
.track-card.detailed {
    padding:0 0 0 0;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.track-card.detailed::before {
    padding:0 0 0 0;
    content: '';
    position:relative;  /*absolute */
    top: 0;
    left: 0;
    right: 0; 
    height: 4px;
    /*
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;           that is importan borfer top shadow
    */
}

.track-card.detailed:hover::before {
    padding:0 0 0 0;
    transform: scaleX(1);
}

.track-card.detailed:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(67, 97, 238, 0.15);
    border-color: rgba(67, 97, 238, 0.2);
}

/* Card Header with Icon */
.card-header {
    padding:0 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-header h3 {
    padding:0 0 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.card-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-left: 1rem;
    transition: transform 0.3s ease;
}

.track-card.detailed:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Track Meta */
.track-meta {
    padding:0 0 0 0;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.duration, .level {
    padding: 0 0 0 0;   /*0.5rem 1rem */
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duration {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border: 1px solid rgba(67, 97, 238, 0.2);
}

.level.beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.level.intermediate {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.level.advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.track-card.detailed p {
    padding:0 0 0 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Track Outcomes */
.track-outcomes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin:1.5rem 0;  /* 1.5rem 0 */
    padding:1rem 0;  /*  1rem 0; */
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.outcome-tag {
    background: rgba(67, 97, 238, 0.08);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.track-card.detailed:hover .outcome-tag {
    background: rgba(67, 97, 238, 0.15);
    transform: translateY(-2px);
}

/* Track Tools */
.track-tools {
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.track-tools strong {
    color: var(--text-main);
    margin-right: 0.5rem;
}

.track-tools span {
    color: var(--text-muted);
}
/*-----------------------------------------------------------------------------------------------*/
/* Track Actions */
.track-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0 0 0 0  /*margin-top: 2rem;*/
}


.track-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    background-color: #007bff;
    color: white;
}

.track-actions .btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/*__________________________________________*/

.btn-primary {
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-primary::after {
    content: '';
    position: relative; /* absolute */
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}
/
.apply-btn i {
    transition: transform 0.3s ease;
}

.apply-btn:hover i {
    transform: translateX(5px);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Empty State */
.no-tracks-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-tracks-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Animation for category transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-category {
    animation: fadeInUp 0.6s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tracks-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
    
    .track-card.detailed {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .tracks-header {
        padding: 8rem 0 3rem;
    }
    
    .tracks-header h1 {
        font-size: 2.5rem;
    }
    
    .tracks-header p {
        font-size: 1.1rem;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-tab {
        padding: 0.6rem 1.4rem;
        font-size: 0.9rem;
    }
    
    .tracks-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .track-card.detailed {
        padding: 1.5rem;
    }
    
    .category-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .track-actions {
        flex-direction: column;
    }
    
    .track-outcomes {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .card-header {
        flex-direction: column;
    }
    
    .card-icon {
        margin-left: 0;
        margin-top: 1rem;
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .tracks-header h1 {
        font-size: 2rem;
    }
    
    .tracks-header p {
        font-size: 1rem;
    }
    
    .track-card.detailed h3 {
        font-size: 1.3rem;
    }
    
    .track-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .duration, .level {
        align-self: flex-start;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.tracks-loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.tracks-loading.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Enhanced Filter Animation */
.filter-tab {
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: relative; /*absolute */
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.filter-tab:hover::before {
    left: 100%;
}

/* Card Hover Effects Enhancement */
.track-card.detailed {
    position: relative;
}

.track-card.detailed::after {
    content: '';
    position: relative; /*absolute important no change aply button*/ 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    /*
    background: var(--gradient);  */
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.4s ease;
   
}

.track-card.detailed:hover::after {
    opacity: 1;
}

/* Touch device optimizations */
@media (hover: none) {
    .track-card.detailed:hover {
        transform: none;
    }
    
    .filter-tab:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Focus styles for accessibility */
.filter-tab:focus,
.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .track-card.detailed,
    .filter-tab,
    .btn {
        transition: none;
    }
    
    .track-card.detailed:hover {
        transform: none;
    }
}

/* Enhanced Footer Styles 
.footer {
    background: var(--text-main);
    padding: 4rem 0 0;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Left-Right Layout 
.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}  */

/* Newsletter Section */
.newsletter-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.newsletter-section h3 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.newsletter-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.newsletter-form {
    max-width: 500px;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-subscribe {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

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

.form-message {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    min-height: 1.5rem;
}

.form-message.success {
    color: #4ade80;
}

.form-message.error {
    color: #f87171;
}

/* Brand Section 
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
}

.footer-logo img {
    height: 30px;
}

.brand-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Footer Links Grid 
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-column h4 {
    color: white;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-column a:hover {
    color: white;
    padding-left: 8px;
}

.footer-column a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-column a:hover::before {
    width: 5px;
}

/* Footer Bottom 
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-extra {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-extra span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.scroll-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-top:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-right {
        justify-content: flex-start;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 0;
    }
    
    .newsletter-section {
        padding: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-subscribe {
        justify-content: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-extra {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .newsletter-section {
        padding: 1.5rem;
    }
    
    .newsletter-section h3 {
        font-size: 1.25rem;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .brand-description {
        max-width: 100%;
    }
}   