/* styles.css */

/* Basic Reset & Variables - From original inline style */
:root {
    --primary-color: #4CAF50; /* Green */
    --secondary-color: #2196F3; /* Blue */
    --accent-color: #FFC107; /* Amber */
    --background-start: #f0f2f5;
    --background-end: #e0e5ec;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Poppins', sans-serif; /* Keep original font */
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--background-start) 0%, var(--background-end) 100%); /* Original background */
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 20px; /* Add some padding for mobile */
}

/* Header - New styles */
header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

header h1 {
    margin: 0;
    font-size: 1.8em;
}

header h1 a {
    color: #ecf0f1;
    text-decoration: none;
}

/* Navigation - New styles */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3498db;
}

/* Breadcrumbs - New styles */
.breadcrumbs {
    padding: 10px 0;
    font-size: 0.9em;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.breadcrumbs .container {
    padding: 10px 20px;
}

.breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs ul li {
    margin-right: 5px;
    display: flex;
    align-items: center;
}

.breadcrumbs ul li:not(:last-child)::after {
    content: '/';
    margin-left: 5px;
    color: #6c757d;
}

.breadcrumbs ul li a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumbs ul li a:hover {
    text-decoration: underline;
}

.breadcrumbs ul li.active {
    color: #495057;
    font-weight: bold;
}

/* Main Content Area - New, general styles */
main {
    flex: 1;
    padding: 40px 0;
}

main h1, main h2, main h3 {
    color: var(--text-color); /* Use original text color variable */
    margin-bottom: 15px;
}

/* Original main content container - Renamed to .main-container for clarity, but original .container styles apply globally */
.container {
    max-width: 1200px; /* Adjusted from 900px to accommodate new pages better */
    margin: 0 auto;
    padding: 20px;
}

/* Specific styling for the converter area - Original styles */
.main-content-area { /* Added this class to index.html's container to isolate converter styles */
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    padding: 30px;
    margin-top: 0px; /* Adjusted to fit new header */
    width: 100%;
    max-width: 900px; /* Original width for the converter */
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content-area h1 { /* Override main h1 for the converter page */
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 2.2em;
    letter-spacing: 0.5px;
    text-align: center;
}

textarea { /* Original styles */
    width: calc(100% - 40px); /* Adjust for padding */
    min-height: 250px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fcfcfc;
    box-shadow: inset 0 2px 8px var(--shadow-light);
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    margin: 0 auto;
    display: block;
}

textarea:focus { /* Original styles */
    border-color: var(--secondary-color);
    box-shadow: inset 0 2px 8px rgba(33, 150, 243, 0.2), 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

.button-group { /* Original styles */
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    justify-content: center;
    padding: 0 10px;
}

.button-group h2 { /* Original styles */
    grid-column: 1 / -1;
    color: var(--text-color);
    font-size: 1.4em;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

button { /* Original styles */
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px var(--shadow-light);
    white-space: nowrap;
}

/* Conversion Buttons - Original styles */
.conversion-buttons button {
    background-color: var(--primary-color);
    color: white;
}
.conversion-buttons button:hover {
    background-color: #43A047; /* Darker green */
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

/* Transformation Buttons - Original styles */
.transformation-buttons button {
    background-color: var(--secondary-color);
    color: white;
}
.transformation-buttons button:hover {
    background-color: #1976D2; /* Darker blue */
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

.count-display { /* Original styles */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    padding: 0 10px;
}

.count-item { /* Original styles */
    background-color: #f5f5f5;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-light);
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    min-width: 120px;
}

.count-item span { /* Original styles */
    color: var(--primary-color);
    font-weight: 700;
    margin-left: 5px;
}

.action-buttons { /* Original styles */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding: 0 10px;
}

.action-buttons button { /* Original styles */
    flex: 1;
    max-width: 180px;
    font-size: 1.05em;
}

/* Specific Action Button Styles - Original styles */
#copyButton {
    background-color: var(--accent-color);
    color: #333;
}
#copyButton:hover {
    background-color: #FBC02D; /* Darker amber */
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

#downloadButton {
    background-color: #607D8B; /* Blue Grey */
    color: white;
}
#downloadButton:hover {
    background-color: #455A64; /* Darker Blue Grey */
    box-shadow: 0 66px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

#clearButton {
    background-color: #f44336; /* Red */
    color: white;
}
#clearButton:hover {
    background-color: #D32F2F; /* Darker Red */
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

.status-message { /* Original styles */
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: rgba(76, 175, 80, 0.1); /* Light green */
    color: var(--primary-color);
    font-weight: 600;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.status-message.show { /* Original styles */
    display: block;
    opacity: 1;
}
.status-message.error { /* Original styles */
    background-color: rgba(244, 67, 54, 0.1); /* Light red */
    color: #f44336;
}

/* Section Styling - New styles for legal/info pages */
section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Paragraphs, Links, Lists - New, general styles */
p {
    margin-bottom: 1em;
    text-align: left; /* Ensure paragraphs align left in content sections */
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 20px;
    text-align: left; /* Ensure lists align left */
}

ul li, ol li {
    margin-bottom: 0.5em;
}

/* Forms (Contact Page) - New styles */
.contact-form {
    display: grid;
    gap: 20px;
    max-width: 600px;
    margin: 30px auto;
}

.contact-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #2980b9;
}


/* Footer - New styles */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

footer p {
    margin: 0;
    padding-bottom: 10px;
}

footer .footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .footer-links a:hover {
    color: #3498db;
}

.social-links a {
    color: #ecf0f1;
    margin: 0 8px;
    font-size: 1.5em;
    text-decoration: none;
}

/* Accessibility (ARIA) & Semantic HTML helpers */
[aria-current="page"] {
    font-weight: bold;
    color: #3498db;
}

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

.hidden {
    display: none;
}

/* Responsive Design - Merged and adapted */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    main {
        padding: 20px 0;
    }

    main h1 { /* General main h1 adjustment */
        font-size: 2em;
        text-align: center;
    }

    main h2 {
        font-size: 1.6em;
    }

    section {
        padding: 20px;
    }

    .main-content-area { /* Specific to converter */
        margin-top: 0px;
        padding: 20px;
        max-width: 95%;
    }
    .main-content-area h1 { /* Specific to converter h1 */
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    textarea {
        min-height: 200px;
        font-size: 1em;
        width: calc(100% - 30px);
        padding: 15px;
    }
    .button-group {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }
    button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .count-item {
        padding: 10px 15px;
        font-size: 1em;
    }
    .action-buttons button {
        max-width: none;
    }

    .contact-form {
        margin: 20px auto;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    main h1 { /* General main h1 adjustment */
        font-size: 1.8em;
    }

    section {
        padding: 15px;
    }

    .main-content-area h1 { /* Specific to converter h1 */
        font-size: 1.5em;
    }
    .button-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    footer .footer-links a {
        margin: 0 5px;
        font-size: 0.9em;
    }
}