/* ============================================
   Base Styles & Reset
   ============================================ */
* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a[href="#calculator"] {
    color: #667eea;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    text-align: center;
    padding: 5rem 0;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-secondary {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid white !important;
}

.cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    background: white;
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

/* ============================================
   Calculator Section
   ============================================ */
.calculator-section {
    background: white;
    padding: 4rem 0;
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.calculator-header p {
    color: #666;
    font-size: 1.1rem;
}

.calculator-wrapper {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.slider-container input[type="number"] {
    width: 100px;
    min-width: 100px;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
}

.slider-container input[type="number"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.slider-container input[type="number"]::-webkit-inner-spin-button,
.slider-container input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
}

/* Advanced Section */
.section-title-small {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.advanced-toggle {
    margin: 2rem 0 1rem 0;
    text-align: center;
}

.toggle-btn {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.toggle-icon {
    transition: transform 0.3s;
    display: inline-block;
}

.toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.advanced-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.advanced-section.show {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.4s ease-in;
    margin-bottom: 1rem;
}

.input-group input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results-section {
    margin-top: 2.5rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h3 {
    color: #667eea;
    font-size: 1.8rem;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.result-card h4 {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-card .amount {
    font-size: 2rem;
    font-weight: bold;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-item label {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-bottom: 0.25rem;
}

.result-item .value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.calculation-breakdown {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.calculation-breakdown h4 {
    color: #667eea;
    margin-bottom: 1rem;
}

.breakdown-step {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.breakdown-step strong {
    color: #667eea;
}

/* ============================================
   Knowledge Section
   ============================================ */
.knowledge-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.knowledge-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.knowledge-header {
    text-align: center;
    margin-bottom: 3rem;
}

.knowledge-header h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.knowledge-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.knowledge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.knowledge-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.knowledge-card ul {
    list-style: none;
    padding-left: 0;
}

.knowledge-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.knowledge-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
}

.info-box strong {
    color: #1976d2;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    background: white;
    padding: 4rem 0;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.contact-header p {
    color: #666;
    font-size: 1.1rem;
}

.contact-wrapper {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.contact-message.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.contact-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-info {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-detail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-detail-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.contact-detail-item strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-detail-item p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.contact-detail-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-detail-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-subtitle {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .calculator-wrapper {
        padding: 2rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .calculator-wrapper {
        padding: 1.5rem;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .calculator-header h2,
    .knowledge-header h2 {
        font-size: 2rem;
    }

    .result-card .amount {
        font-size: 1.5rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .calculator-wrapper {
        padding: 1rem;
        border-radius: 10px;
    }

    .calculator-header h2,
    .knowledge-header h2 {
        font-size: 1.75rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }

    .slider-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .slider-container input[type="number"] {
        width: 100%;
    }

    .calculate-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .result-card {
        padding: 1.25rem;
    }

    .result-card .amount {
        font-size: 1.25rem;
    }

    .result-item .value {
        font-size: 1rem;
    }

    .knowledge-card {
        padding: 1.5rem;
    }

    .features,
    .calculator-section,
    .knowledge-section,
    .contact-section {
        padding: 3rem 0;
    }

    .contact-wrapper {
        padding: 1.5rem;
    }

    .contact-header h2 {
        font-size: 1.75rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        padding: 2rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-top: 0.5rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .calculator-header h2,
    .knowledge-header h2,
    .contact-header h2 {
        font-size: 1.5rem;
    }

    .contact-wrapper {
        padding: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    .contact-detail-item {
        padding: 1rem;
    }
}

/* Landscape Orientation for Tablets */
@media (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 3rem 0;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
    }

    .hero {
        background: white;
        color: #333;
    }

    .calculate-btn {
        display: none;
    }
}

