/* Common styles for Online Tools website */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    visibility: hidden; /* Hide content until fully loaded */
}

body.loaded {
    visibility: visible; /* Show content when loaded */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #3498db;
}

ul {
    list-style: none;
}

/* Loader styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Navbar styles */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #3498db;
}

/* Hero section */
.hero {
    background-color: #3498db;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Section styles */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

/* Category styles */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.category-name {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Calculator card styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.calculator-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    color: #333;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2rem;
    padding: 20px;
    background-color: #f8f9fa;
    color: #3498db;
    text-align: center;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-content p {
    margin-bottom: 20px;
    color: #666;
    flex-grow: 1;
}

.card-button {
    background-color: #3498db;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-top: auto;
}

.card-button:hover {
    background-color: #2980b9;
}

/* Category hero section */
.category-hero {
    padding: 40px 0;
    text-align: center;
    color: white;
}

.category-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.category-hero p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Content section */
.content {
    padding: 40px 0;
}

/* Footer styles */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ccc;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Policy pages styles */
.page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.policy-content, .terms-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.policy-content h2, .terms-content h2 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.policy-content p, .terms-content p {
    margin-bottom: 15px;
}

.policy-content ul, .terms-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.policy-content li, .terms-content li {
    margin-bottom: 8px;
    list-style-type: disc;
}

.last-updated {
    font-style: italic;
    color: #666;
    text-align: right;
    margin-top: 30px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
} 