/* css/modern-design.css */
/* CalculationsPro.com Modern Design CSS */
/* New modern design styles that override the original layout */

/* Navigation Styles */
.main-navigation {
    background: #1A237E;
    border-bottom: 3px solid #00ACC1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 65px;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.nav-brand .brand-link:hover {
    color: #00ACC1;
}

.brand-text {
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-left: 8px;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background-color: #00ACC1;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.user-login {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border: 2px solid #00ACC1;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: transparent;
}

.user-login:hover {
    background: #00ACC1;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-user-mobile {
    display: none;
}

.nav-user-desktop {
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #F9F9F9 0%, #ffffff 100%);
    padding: 40px 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #1A237E;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Calculator Panel */
.calculator-panel {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.calc-display-area {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    color: #000;
    text-align: right;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calc-input {
    font-size: 12px;
    color: #666;
    min-height: 16px;
}

.calc-output {
    font-size: 24px;
    font-weight: normal;
    margin-top: 4px;
    min-height: 30px;
    color: #000;
    font-family: monospace;
}

/* Calculator Functions */
.calc-functions {
    margin-bottom: 15px;
}

.func-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.func-btn {
    flex: 1;
    padding: 8px 4px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 11px;
    font-weight: normal;
    color: #333;
    cursor: pointer;
    transition: all 0.1s;
    min-height: 28px;
}

.func-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.func-btn:active {
    background: #d0d0d0;
}

.deg-rad-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 4px;
    flex: 1;
    justify-content: center;
    min-height: 28px;
}

.deg-rad-toggle label {
    font-size: 9px;
    color: #333;
    cursor: pointer;
    margin: 0;
}

/* Calculator Numbers */
.calc-numbers {
    display: grid;
    gap: 6px;
}

.num-row {
    display: flex;
    gap: 6px;
}

.num-btn, .op-btn, .clear-btn, .equals-btn {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.1s;
    min-height: 32px;
}

.num-btn {
    background: #f9f9f9;
    color: #333;
}

.num-btn:hover {
    background: #e9e9e9;
    border-color: #999;
}

.num-btn:active {
    background: #d9d9d9;
}

.op-btn {
    background: #f0f0f0;
    color: #333;
}

.op-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.op-btn:active {
    background: #d0d0d0;
}

.clear-btn {
    background: #f0f0f0;
    color: #333;
}

.clear-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.clear-btn:active {
    background: #d0d0d0;
}

.equals-btn {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}

.equals-btn:hover {
    background: #45a049;
}

.equals-btn:active {
    background: #3d8b40;
}

/* Calculator History */
.calc-history {
    margin-top: 15px;
    max-height: 100px;
    overflow-y: auto;
}

.history-item {
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
}

.history-item:hover {
    background: #f8f9fa;
}

/* Search Panel */
.search-panel {
    margin-top: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #00ACC1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.search-btn {
    padding: 12px 24px;
    background: #1A237E;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: #00ACC1;
}

/* Search Results */
.search-results {
    position: relative;
}

.search-results-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    border-bottom: 1px solid #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #1A237E;
    transition: background-color 0.2s;
}

.search-result-item a:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.search-result-item strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.search-result-item span {
    font-size: 14px;
    color: #666;
}

.no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Calculator Categories */
.calculator-categories {
    padding: 60px 0;
    background: white;
}

.categories-header {
    text-align: center;
    margin-bottom: 40px;
}

.categories-header h2 {
    font-size: 36px;
    color: #1A237E;
    margin-bottom: 16px;
}

.categories-header p {
    font-size: 18px;
    color: #666;
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.category-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(26, 35, 126, 0.1);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.category-icon {
    margin-bottom: 20px;
}

.category-title {
    margin-bottom: 20px;
}

.category-title a {
    color: #1A237E;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
}

.category-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.category-title a:hover {
    color: #00ACC1;
    text-decoration: none;
}

.category-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.category-links li {
    margin-bottom: 8px;
}

.category-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.category-links a:hover {
    color: #00ACC1;
    text-decoration: none;
}

.all-calculators-link {
    text-align: center;
}

.btn-all-calculators {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #1A237E 0%, #00ACC1 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-all-calculators:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.3);
    text-decoration: none;
    color: white;
}

/* About Section */
.about-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.about-content h2 {
    font-size: 36px;
    color: #1A237E;
    margin-bottom: 30px;
}

.about-content p {
    font-size: 16px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Why Choose Section */
.why-choose-section {
    padding: 60px 0;
    background: white;
}

.why-choose-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.why-choose-container h2 {
    text-align: center;
    font-size: 36px;
    color: #1A237E;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    font-size: 20px;
    color: #1A237E;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* Modern Footer */
.modern-footer {
    background: #1A237E;
    color: white;
    padding: 40px 0 20px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand h3 {
    color: #00ACC1;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.footer-links-section h4,
.footer-categories h4,
.footer-legal h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 2px 0;
}

.footer-links a:hover {
    color: #00ACC1;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: #00ACC1;
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Hide original elements */
#headerout, #homecaldiv, #homelistdiv, #footer, .topNavAbs {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop user section, show mobile user section */
    .nav-user-desktop {
        display: none;
    }
    
    .nav-user-mobile {
        display: block;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 15px;
    }
    
    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: #1A237E;
        flex-direction: column;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        height: calc(100vh - 65px);
        overflow-y: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        z-index: 999;
        border-top: 3px solid #00ACC1;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-item {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 18px;
        font-weight: 500;
        text-align: left;
        display: block;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 10px;
        transition: all 0.3s ease;
    }
    
    /* Hero Section Mobile */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    /* Category Grid Mobile */
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer Mobile */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    /* Typography Mobile */
    .categories-header h2,
    .about-content h2,
    .why-choose-container h2 {
        font-size: 28px;
    }
    
    /* User dropdown mobile adjustments */
    .nav-user-mobile .user-dropdown {
        position: relative;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 10px;
        box-shadow: none;
        z-index: 1001;
    }
    
    .nav-user-mobile .dropdown-item {
        color: white;
    }
    
    .nav-user-mobile .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    /* Ensure desktop dropdown has high z-index */
    .nav-user-desktop .user-dropdown {
        z-index: 1002;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .calc-output {
        font-size: 24px;
    }
    
    .func-btn, .num-btn, .op-btn, .clear-btn, .equals-btn {
        padding: 12px 6px;
        font-size: 14px;
    }
}