/* Import the Work Sans font and add Poppins */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for Colors */
:root {
  --black: #121212;
  --near-black: #181818;
  --lime: #C2E812;
  --lime-muted: rgba(194, 232, 18, 0.8);
  --purple: #8500FF;
  --gray: #e9e9e9;
  --white: #FFFFFF;
  --light-gray: #F2F4F3;
  --dark-gray: #1E1E1E;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-subtle: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Work Sans', sans-serif;
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.2px;
  padding-top: 90px; /* Added padding to account for fixed header */
}

.container {
  max-width: 1140px; /* Slightly adjusted width */
  margin: 0 auto;
  padding: 0 20px; /* Adjusted padding */
}

main {
    padding: 60px 0; /* Standard padding for main content area */
}

section {
  padding: 80px 0; /* Slightly reduced section padding */
  position: relative;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Work Sans', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: -1.2px;
}

h1 {
  font-size: 2.8rem; /* Slightly smaller h1 */
  line-height: 1.1;
}

h2 {
  font-size: 2rem; /* Slightly smaller h2 */
  position: relative;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--gray);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: var(--lime);
  transition: var(--transition);
}

a:hover {
  color: var(--lime-muted);
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1.5rem;
  padding-left: 20px;
}

ul li, ol li {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 2px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--lime);
    color: var(--black);
}

.btn-primary:hover {
    background-color: var(--lime-muted);
    color: var(--black);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--lime);
    border: 1px solid var(--lime);
}

.btn-secondary:hover {
    background-color: var(--lime);
    color: var(--black);
    transform: translateY(-2px);
}

/* Aggiunta classe btn-lime per garantire il colore lime anche su mobile */
.btn-lime {
    background-color: var(--lime) !important;
    color: var(--black) !important;
    border: 1px solid var(--lime) !important;
}

.btn-lime:hover {
    background-color: var(--lime-muted) !important;
    color: var(--black) !important;
    transform: translateY(-2px);
}

/* Forms (Basic Styling) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--white);
    background-color: var(--near-black);
    background-clip: padding-box;
    border: 1px solid var(--dark-gray);
    border-radius: 2px;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-control:focus {
    color: var(--white);
    background-color: var(--dark-gray);
    border-color: var(--lime);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(194, 232, 18, 0.25);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Header Styling (Common for both headers) */
.header {
  padding: 20px 0;
  background-color: var(--black);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-subtle);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1140px; /* Match container width */
  margin: 0 auto;
  padding: 0 20px; /* Match container padding */
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 35px; /* Slightly smaller logo */
  width: auto;
}

.nav {
  display: flex;
  gap: 35px; /* Adjusted gap */
  align-items: center;
}

.nav-link {
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0; /* Added padding for larger click area */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px; /* Slightly thicker underline */
  background-color: var(--lime);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active { /* Style for active link */
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Specific Header Button */
.header .btn-register { /* Using .btn styles */
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* Dashboard Header Specifics (Example) */
.header-dashboard .nav-link {
    /* Potential different styling for dashboard nav */
}

/* Footer Styling */
footer {
    background-color: var(--near-black);
    padding: 80px 0 40px;
    text-align: center;
    border-top: 1px solid var(--dark-gray);
    margin-top: 100px;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    height: 45px;
    margin-bottom: 30px;
}

.footer-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--white);
}

.social-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    color: var(--gray);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: var(--dark-gray);
    transition: var(--transition);
}

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


/* Store Links Styles */
.store-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.store-link {
    display: inline-block;
    transition: var(--transition);
}

.store-link:hover {
    transform: translateY(-3px);
}

.store-icon {
    height: 50px;
    width: auto;
    display: block;
    opacity: 0.8;
    transition: var(--transition);
}

.store-icon:hover {
    opacity: 1;
}


.copyright {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Added divider style from landing.css */
.footer-divider {
  height: 1px;
  width: 60px;
  background-color: var(--dark-gray);
  margin: 30px auto;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-lime {
    color: var(--lime);
}

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
/* Add more margin/padding utilities as needed */

/* Blog Page Specific Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Responsive grid */
    gap: 30px;
    margin-top: 40px;
}

.blog-post {
    background-color: var(--near-black);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dark-gray);
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(194, 232, 18, 0.3); /* Subtle lime border on hover */
}

.blog-post-image {
    width: 100%;
    height: 200px; /* Fixed height for images */
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container */
    transition: transform 0.5s ease;
}

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

.blog-post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-title {
    font-size: 1.3rem; /* Slightly smaller title */
    margin-bottom: 10px;
    line-height: 1.4;
    text-transform: none; /* Override default uppercase */
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.blog-post-title a {
    color: var(--white);
    text-decoration: none;
}

.blog-post-title a:hover {
    color: var(--lime);
}

.blog-post-meta {
    margin-bottom: 15px;
    color: var(--gray);
    font-size: 0.85rem; /* Smaller meta text */
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.blog-post-meta span {
    display: inline-flex;
    align-items: center;
}

/* Icons color set inline for now, consider CSS vars or specific classes */

.blog-post-meta a {
    color: var(--gray);
    text-decoration: none;
}

.blog-post-meta a:hover {
    color: var(--lime);
    text-decoration: underline;
}

.blog-post-excerpt {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1; /* Pushes the link to the bottom */
}

.blog-post-link {
    display: inline-block;
    color: var(--lime);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto; /* Pushes the link to the bottom */
    transition: color 0.3s;
}

.blog-post-link:hover {
    color: var(--lime-muted);
}

/* Blog Single Post Styles */
.blog-single-post {
    /* Add styles for single post page container if needed */
}

.blog-single-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--dark-gray);
    padding-bottom: 30px;
}

.blog-single-title {
    font-size: 2.5rem; /* Larger title for single post */
    margin-bottom: 15px;
    line-height: 1.2;
    text-transform: none;
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.blog-single-meta {
     margin-bottom: 20px;
     color: var(--gray);
     font-size: 0.9rem;
     display: flex;
     flex-wrap: wrap;
     gap: 20px;
}

.blog-single-meta span {
    display: inline-flex;
    align-items: center;
}

.blog-single-featured-image {
    width: 100%;
    max-height: 450px; /* Limit image height */
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 4px;
}

.blog-single-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-single-content {
    color: var(--gray);
    line-height: 1.8;
    font-size: 1.05rem; /* Slightly larger body text */
}

.blog-single-content p {
    margin-bottom: 1.5rem;
}

.blog-single-content h2,
.blog-single-content h3,
.blog-single-content h4,
.blog-single-content h5,
.blog-single-content h6 {
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: none;
}

.blog-single-content h2 { font-size: 1.8rem; }
.blog-single-content h3 { font-size: 1.5rem; }
.blog-single-content h4 { font-size: 1.3rem; }

.blog-single-content ul,
.blog-single-content ol {
    margin-bottom: 1.5rem;
    padding-left: 30px; /* More indentation */
}

.blog-single-content li {
    margin-bottom: 0.6rem;
}

.blog-single-content a {
    color: var(--lime);
    text-decoration: underline;
}

.blog-single-content a:hover {
    color: var(--lime-muted);
}

.blog-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.blog-single-content blockquote {
    border-left: 3px solid var(--lime);
    padding-left: 20px;
    margin: 2rem 0;
    font-style: italic;
    color: var(--light-gray);
    background-color: rgba(194, 232, 18, 0.05);
    padding: 15px 20px;
    border-radius: 4px;
}

.blog-single-content blockquote p {
    margin-bottom: 0;
}

.blog-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--dark-gray);
}

.back-to-blog-link {
    display: inline-flex;
    align-items: center;
    color: var(--lime);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.back-to-blog-link:hover {
    color: var(--lime-muted);
}

.back-to-blog-link i {
    margin-right: 8px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    body {
        padding-top: 80px; /* Adjust for potentially smaller header */
    }
    .container {
        padding: 0 15px;
    }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    .header {
        padding: 15px 0;
    }
    .nav {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    main {
        padding: 40px 0;
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }

    /* Basic Mobile Menu Toggle Placeholder */
    .nav {
        display: none; /* Hide desktop nav */
        /* Add styles for mobile menu display later */
    }
    .mobile-menu-toggle {
        display: block; /* Show hamburger icon */
        /* Add styles for hamburger */
    }

    .header-container {
        padding: 0 15px; /* Match container padding */
    }

    .footer-container {
        /* Adjust padding if needed, or remove */
        /* padding: 0 15px; */
    }

    /* Add styles for footer links on smaller screens from landing.css */
    .footer-links {
        gap: 20px; /* Smaller gap */
        flex-direction: column; /* Stack links */
    }

    .footer-link {
        margin: 0 10px;
        display: block;
        margin-bottom: 10px;
    }
    .social-link {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
        padding-top: 70px;
    }
    h1 { font-size: 2rem; letter-spacing: -1.0px; }
    h2 { font-size: 1.5rem; letter-spacing: -1.0px; }
    p { font-size: 0.95rem; }
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    /* Assicuriamo che btn-lime mantenga il colore lime anche su mobile */
    .btn-lime {
        background-color: var(--lime) !important;
        color: var(--black) !important;
        border: 1px solid var(--lime) !important;
    }
    .form-control {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    .copyright {
        font-size: 0.75rem;
    }
}

/* Password Input with Toggle */
.password-input-container {
    position: relative;
}

.password-input-container .form-control {
    padding-right: 45px; /* Add padding to prevent text overlap */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--gray); /* Or var(--lime) depending on desired look */
    font-size: 1rem;
    z-index: 2; /* Ensure it's above the input */
}

.password-toggle:hover {
    color: var(--lime); /* Highlight on hover */
}

.password-toggle i {
    vertical-align: middle; /* Align icon nicely */
}

/* Exercise Link specific style for Plan pages */
.fitness-plan-content .exercise-link,
.fitness-plan-content a[href*="exercise_detail.php"], /* Catch others */
.fitness-plan-content a[href*="process_exercise_data.php"]
{
    color: var(--lime) !important; /* Main accent */
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 2px 5px !important;
    border: 1px solid var(--lime) !important;
    border-radius: 4px !important;
    background-color: rgba(194, 232, 18, 0.1) !important; /* Light lime bg */
    display: inline-block !important;
    margin: 0 2px !important;
    transition: var(--transition);
}

.fitness-plan-content .exercise-link:hover,
.fitness-plan-content a[href*="exercise_detail.php"]:hover,
.fitness-plan-content a[href*="process_exercise_data.php"]:hover {
    color: var(--black) !important;
    background-color: var(--lime) !important;
    box-shadow: 0 0 5px rgba(194, 232, 18, 0.5) !important;
    text-decoration: none !important;
}
