/* 
   Australia PR Points Calculator Styles
   Author: VisaSpot
   Version: 1.1
*/

/* Base Styles and Reset */
:root {
    --primary-color: #005b96;
    --secondary-color: #6497b1;
    --accent-color: #f9a826;
    --background-color: #f5f7fa;
    --text-color: #333;
    --light-text: #646464;
    --border-color: #dcdfe6;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.logo img {
    height: 45px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Floating Visa Selector */
.floating-visa-selector {
    background-color: #004080;
    color: white;
    padding: 8px 0;
    position: sticky;
    top: 50px;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    transform: translateY(-100%);
    opacity: 0;
}

.floating-visa-selector.visible {
    transform: translateY(0);
    opacity: 1;
}

.floating-visa-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.current-visa {
    font-weight: 500;
}

#floating-visa-name {
    font-weight: 700;
    color: var(--accent-color);
}

.visa-quick-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visa-quick-select select {
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
    background-color: white;
    color: var(--primary-color);
    font-weight: 500;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 70px 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.visa-types {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.visa-tag {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Calculator Intro Section */
.calculator-intro {
    padding: 60px 0;
    background-color: white;
}

.calculator-intro h2 {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-intro ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.calculator-intro ul li {
    margin-bottom: 10px;
}

/* Calculator Section */
.calculator-section {
    padding: 60px 0;
    background-color: var(--background-color);
}

.calculator-wrapper {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.calculator-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.calculator-header h3 {
    color: white;
    margin-bottom: 0;
}

.selected-visa {
    color: white;
    font-size: 1rem;
    margin-top: 5px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 0;
}

.visa-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visa-selector label {
    font-weight: 600;
}

.visa-selector select {
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    font-size: 0.95rem;
}

/* Form Styling */
#points-calculator-form {
    padding: 30px;
}

.form-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.form-section {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.form-section h4 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.required {
    color: var(--error-color);
    margin-left: 3px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    transition: var(--transition);
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
}

.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 91, 150, 0.2);
}

.form-group select:disabled {
    background-color: #f1f1f1;
    cursor: not-allowed;
}

.form-group select:required:invalid {
    border-color: var(--border-color);
}

.form-group select:focus:required:invalid {
    border-color: var(--error-color);
}

.form-group.has-error select {
    border-color: var(--error-color);
    background-color: rgba(229, 28, 35, 0.05);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.points-indicator {
    position: absolute;
    right: 15px;
    top: 12px;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Point change animation */
.point-changed {
    animation: pulse 0.5s ease;
    font-weight: bold;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--accent-color); }
    100% { transform: scale(1); }
}

/* Notes */
.note {
    background-color: rgba(255, 193, 7, 0.2);
    padding: 10px;
    border-left: 3px solid var(--warning-color);
    font-size: 0.85rem;
    margin-top: 10px;
    border-radius: 0 4px 4px 0;
}

.note i {
    color: var(--warning-color);
    margin-right: 5px;
}

/* Calculator Results */
.calculator-results {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.total-points {
    margin-bottom: 20px;
}

.total-points h3 {
    font-size: 2rem;
    color: var(--primary-color);
}

#total-points {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.pass-mark {
    margin-top: 10px;
    font-size: 1.1rem;
}

.result-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: none;
}

.result-message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    display: block;
}

.result-message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    display: block;
}

/* Points Breakdown */
.points-breakdown {
    margin-top: 25px;
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.points-breakdown h4 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #e6e6e6;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-category {
    font-weight: 500;
}

.breakdown-points {
    font-weight: 700;
    color: var(--primary-color);
}

.breakdown-total {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 2px solid var(--border-color);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.breakdown-total .breakdown-points {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Buttons */
.calculate-btn, .reset-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 10px;
}

.calculate-btn {
    background-color: var(--primary-color);
    color: white;
}

.calculate-btn:hover {
    background-color: #004b7d;
}

.reset-btn {
    background-color: #e0e0e0;
    color: var(--text-color);
}

.reset-btn:hover {
    background-color: #d0d0d0;
}

/* Results Action Buttons */
#results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn {
    background-color: #3b5998;
    color: white;
}

.share-btn:hover {
    background-color: #2d4373;
}

.print-btn {
    background-color: #607d8b;
    color: white;
}

.print-btn:hover {
    background-color: #455a64;
}

/* Info Section Styles */
.info-section {
    padding: 60px 0;
    background-color: white;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.info-tabs {
    margin-top: 30px;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--light-text);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-bottom: 15px;
}

.tab-content ul {
    list-style-type: disc;
    margin-left: 20px;
}

.tab-content ul li {
    margin-bottom: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background-color: var(--background-color);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.accordion-header {
    padding: 18px 20px;
    background-color: white;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: var(--primary-color);
    transition: var(--transition);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
}

.accordion-item.active .accordion-header::after {
    content: '−';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-content {
    padding: 0 20px;
}

.accordion-item.active .accordion-content {
    padding: 0 20px 20px;
}

/* CTA Section */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.cta-btn.primary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.cta-btn.primary:hover {
    background-color: #e89a1c;
}

.cta-btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.cta-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Footer Styles */
footer {
    background-color: #1a1a1a;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-logo {
    margin-bottom: 20px;
    height: 50px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #bbb;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-col address p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bbb;
}

.footer-col address p i {
    color: var(--accent-color);
}

.footer-col address p a {
    color: #bbb;
}

.footer-col address p a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.footer-bottom p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #999;
}

.footer-bottom a {
    color: #bbb;
}

.footer-bottom a:hover {
    color: white;
}

.disclaimer {
    font-size: 0.8rem;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* Visitor Counter */
.visitor-counter {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #999;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.visitor-counter p {
    margin-bottom: 0;
}

#visit-count {
    font-weight: 700;
    color: var(--accent-color);
}

/* Floating Score for Mobile */
.floating-score {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.floating-score:hover {
    background-color: #004b7d;
}

.floating-score::after {
    content: '↑';
    position: absolute;
    right: 15px;
    font-size: 1.2rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.floating-score-title {
    font-weight: 600;
}

.floating-score-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-right: 30px;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .form-sections {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .floating-score {
        display: none;
    }
}

@media (min-width: 992px) {
    .form-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    /* Improved header for mobile */
    .header-content {
        padding: 5px 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    nav ul {
        margin-top: 0;
        justify-content: flex-end;
    }
    
    nav ul li {
        margin-left: 10px;
    }
    
    nav ul li a {
        font-size: 0.8rem;
        padding: 3px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .calculator-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px;
    }
    
    .calculate-btn, .reset-btn {
        width: 100%;
        margin: 10px 0;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid var(--border-color);
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-btn {
        width: 100%;
    }
    
    /* Floating visa selector for mobile */
    .floating-visa-selector {
        padding: 6px 0;
    }
    
    .floating-visa-content {
        flex-direction: row;
        align-items: center;
        padding: 5px 0;
    }
    
    .current-visa {
        font-size: 0.8rem;
    }
    
    #floating-visa-name {
        font-size: 0.85rem;
    }
    
    .visa-quick-select {
        gap: 5px;
    }
    
    .visa-quick-select label {
        font-size: 0.8rem;
    }
    
    .visa-quick-select select {
        padding: 4px 8px;
        font-size: 0.8rem;
        max-width: 180px;
    }
}

@media (max-width: 576px) {
    /* Even smaller screens */
    .header-content {
        padding: 4px 0;
    }
    
    .logo img {
        height: 30px;
    }
    
    nav ul li {
        margin-left: 8px;
    }
    
    nav ul li a {
        font-size: 0.75rem;
    }
    
    .floating-visa-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .visa-quick-select {
        width: 100%;
        margin-top: 3px;
    }
    
    .visa-quick-select select {
        flex-grow: 1;
    }
    
    /* Show abbreviated text in floating selector on very small screens */
    .current-visa span.long-text {
        display: none;
    }
    
    .current-visa span.short-text {
        display: inline;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .points-indicator {
        position: static;
        display: block;
        margin-top: 8px;
        text-align: center;
    }
    
    .total-points h3 {
        font-size: 1.5rem;
    }
    
    #total-points {
        font-size: 2rem;
    }
    
    .calculate-btn, .reset-btn, .action-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #results-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .calculator-header h3 {
        font-size: 1.2rem;
    }
}

/* Print Styles for the calculator results */
@media print {
    body {
        background-color: white;
    }
    
    header, nav, .hero, .calculator-intro, footer, .cta-section, .info-section, .faq-section, .floating-visa-selector, .floating-score {
        display: none;
    }
    
    .calculator-section {
        padding: 0;
    }
    
    .calculator-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .form-sections {
        grid-template-columns: 1fr;
    }
    
    .calculate-btn, .reset-btn, #results-actions {
        display: none;
    }
    
    .result-message {
        border: 1px solid #ddd;
    }
}

/* Hide schema data */
.schema-data {
    display: none;
}
