/* --- StatWise Calculator Stylesheet --- */

/* SEO: Use CSS Variables for easy theme management and smaller file size */
:root {
    --primary-color: #3498db;
    --dark-text: #333;
    --light-text: #f8f9fa;
    --background-color: #ffffff;
    --section-background: #f8f9fa;
    --border-color: #dee2e6;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* SEO: Global reset and base styles for performance */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--background-color);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Footer --- */
.header, .footer {
    padding: 20px 0;
    background-color: var(--section-background);
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo img {
    height: 40px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.footer p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* --- Main Sections --- */
main section {
    padding: 60px 0;
    text-align: center;
}

main section:nth-child(odd) {
    background-color: var(--section-background);
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* --- Call-to-Action Button --- */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* --- Features Section --- */
.features .container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-card {
    background: var(--background-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-card .icon {
    font-size: 2rem;
    margin-right: 10px;
}

/* --- FAQ Section --- */
.faq-section {
    text-align: left;
}

details {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
}

summary {
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
}

details[open] summary {
    margin-bottom: 10px;
}

/* SEO: Mobile-First Responsive Design */
@media (min-width: 768px) {
    .features .container {
        flex-direction: row;
    }
    .feature-card {
        flex: 1;
    }
}

/* --- Style for the new feature card links --- */
.feature-link {
    text-decoration: none; /* Removes the underline */
    color: inherit;       /* Makes the text color the same as its parent */
}

/* --- Video Demo Section Styles --- */
.video-section {
    padding: 60px 20px;
    text-align: center;
    background-color: #f8f9fa; /* A very light grey to separate it from other sections */
}

.video-section h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.video-section .video-subtitle {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* This makes the YouTube embed responsive */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Styles for Click-to-Play Functionality --- */
.video-wrapper {
    position: relative; /* This is the new container for the play button */
    cursor: pointer;
    max-width: 800px; /* Controls the max size of the video */
    margin: 0 auto;
}

/* The play button itself */
.video-play-button {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

/* The triangle inside the play button */
.video-play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%; /* Slightly off-center for visual balance */
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 15px 0 15px 26px; /* Creates a triangle shape */
    border-color: transparent transparent transparent #333;
}

/* A nice hover effect */
.video-wrapper:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 255, 255, 1);
}

/* When the video is playing, this class will be added by JavaScript to hide the button */
.video-wrapper.playing .video-play-button {
    opacity: 0;
    visibility: hidden;
}

