/* Front Page Styles */

/* Hero Section Styles */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-start) 0%, var(--brand-end) 100%);
    overflow: hidden;
    margin-top: -1px; /* Eliminate any gap between header and hero */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--brand-start) 0%, var(--brand-end) 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

/* Decorative hero elements */
.hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.blob {
    position: absolute;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--brand-start), var(--brand-end));
    filter: blur(80px);
    opacity: 0.6;
    mix-blend-mode: normal;
    animation: blobDrift 12s ease-in-out infinite;
}

.blob.b1 { top: 10%; left: -6%; }
.blob.b2 { bottom: 5%; right: -4%; animation-duration: 16s; }
.blob.b3 { top: 30%; left: 65%; width: 20rem; height: 20rem; animation-duration: 14s; }

@keyframes blobDrift {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-20px) scale(1.05) rotate(8deg); }
    100% { transform: translateY(0) scale(1) rotate(0deg); }
}

.floating-icon {
    position: absolute;
    font-size: 2.75rem;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.28;
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    animation: floatIcon 8s ease-in-out infinite;
}

.fi1 { top: 16%; left: 6%; }
.fi2 { top: 34%; right: 8%; animation-duration: 10s; }
.fi3 { bottom: 18%; left: 18%; animation-duration: 12s; }

@keyframes floatIcon {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 1.5rem;
    color: #fbbf24;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Hero-specific button styles: restore yellow primary */
.hero-section .btn-primary {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.25);
}

.hero-section .btn-primary:hover {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.35);
}

.hero-section .btn-primary:active {
    filter: brightness(0.95);
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.3);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Calculator Card Styles */
.hero-calculator {
    position: relative;
}

.calculator-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 160px;
    height: 160px;
    border-radius: 32px;
    background: radial-gradient(circle at 40% 40%, var(--brand-start), var(--brand-end));
    filter: blur(24px);
    opacity: 0.18;
    z-index: 0;
    transition: transform 0.5s ease;
}

.calculator-card:hover::before {
    transform: translate(8px, -8px) scale(1.05);
}

.calculator-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.calculator-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.result-content {
    text-align: center;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.result-category {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-description {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Modern result with status icon (parallels BMI calculator page) */
.modern-result {
    transition: opacity 0.25s ease;
}

.modern-result .result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.result-status-icon i { line-height: 1; }

.status-success { background: linear-gradient(135deg, #10b981, #34d399); }
.status-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.status-danger  { background: linear-gradient(135deg, #ef4444, #f87171); }
.status-info    { background: linear-gradient(135deg, #3b82f6, #60a5fa); }

.modern-result .result-main-content { text-align: left; }

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-icon { animation: popIn 280ms ease; }

/* Other Sections */
.calculators-section,
.why-track-section,
.blog-section,
.newsletter-section {
    padding: 5rem 0;
}

.calculators-section {
    background: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.calculator-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 50%;
    transform: translate(50%, -50%);
    transition: all 0.4s ease;
}

.calculator-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

.calculator-card:hover::before {
    transform: translate(30%, -30%) scale(1.5);
}

.calculator-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.modern-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: white;
    transition: all 0.4s ease;
}

.calculator-card:hover .modern-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.modern-icon svg {
    width: 100%;
    height: 100%;
}

.ideal-weight-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.bmr-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; }
.bodyfat-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important; }
.whr-icon { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important; }
.calorie-icon { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important; }
.protein-icon { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%) !important; }

.calculator-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.calculator-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.calculator-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    color: #3b82f6;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.calculator-card:hover .calculator-arrow {
    transform: translateX(4px);
}

/* Why Track Section */
.why-track-section {
    background: white;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-icon {
    font-size: 1.5rem;
    color: #10b981;
    margin-top: 0.25rem;
}

.benefit-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.benefit-content p {
    color: #6b7280;
    line-height: 1.6;
}

.content-visual {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0f2fe;
}

.interactive-chart-wrapper {
    width: 100%;
}

.health-metrics-chart {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.metric-bar {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

.metric-bar:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.metric-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.metric-value {
    font-weight: 700;
    color: #3b82f6;
    font-size: 1.1rem;
}

.metric-progress {
    background: #e5e7eb;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.metric-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.metric-tooltip {
    position: absolute;
    top: 50%;
    right: -320px;
    transform: translateY(-50%);
    background: white;
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    border: 2px solid #3b82f6;
}

.metric-bar:hover .metric-tooltip {
    opacity: 1;
    visibility: visible;
    right: -300px;
}

.metric-tooltip strong {
    display: block;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.metric-tooltip p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.metric-tooltip .status {
    color: #10b981;
    font-weight: 600;
    margin-top: 0.75rem;
}

.chart-legend {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0.75rem;
}

.legend-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.legend-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Blog Section */
.blog-section {
    background: #f8fafc;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-thumbnail {
    height: 200px;
    overflow: hidden;
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.blog-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #3b82f6;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .calculators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-bar:hover .metric-tooltip {
        right: auto;
        left: 50%;
        top: 110%;
        transform: translateX(-50%);
    }
    
    .metric-tooltip {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        margin-top: 35px; /* Mobile-only spacing for hero title */
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .modern-icon {
        width: 70px;
        height: 70px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .content-visual {
        padding: 1.5rem;
    }
    
    .metric-bar:hover {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        /* Inherits margin-top from 768px breakpoint; keep mobile spacing */
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .newsletter-text h2 {
        font-size: 2rem;
    }
}

/* Blog Section: Read More button size override */
.blog-section .post-readmore.btn.btn-primary.btn-sm,
.blog-archive .post-readmore.btn.btn-primary.btn-sm,
.posts-grid .post-card .post-readmore.btn.btn-primary.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.5rem;
}