/* style.css for Xyphos Pty Ltd */

:root {
    --bg-light: #f7f9fc;
    --bg-dark: #121212;
    --text-light: #333;
    --text-dark: #eee;
    --primary: #005fa3;
    --nav-bg: #001f3f;
}

* {
    padding: 0;
    margin: 0 0.5rem;
    line-height: 1.4;
    align-items: center;
}
*::before,
*::after {
    box-sizing: border-box;
}

a:hover {
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    text-decoration: underline;
}

html {
    scroll-behavior: smooth;
}
h1, h2, h3, p {
    margin: 0;
    padding: 0 0 0.5rem;
}

header {
    background: var(--nav-bg);
    color: white;
    padding: 0;
    margin: 0;
    text-align: center;
}

header p {
    margin: 0.7rem 2rem; 
}


body {
    font-family: Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-light);
    transition: background 0.3s, color 0.3s;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    min-height: 70px;
    padding: 0;
    margin: 0;
}

.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 1000;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    left: auto;
    background: var(--primary);
    color: #fff;
}

header, nav, footer {
    background: var(--bg-light);
    color: var(--text-light);
}

footer {
    font-size: 0.9rem;
    font-weight: 600;
}

nav {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    background: var(--nav-bg);
    color: white;
    z-index: 999;
    margin: 0;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 1rem;
}

.dark-toggle {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: white;
}

section {
    padding: 2rem 0;
}

section h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    align-items: stretch; /* Ensures equal height */    
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Stretches card to fill grid cell */
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;    
  }
  
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  
  .card-img {
    width: 100%;
    height: auto;
    display: block;
  }

  .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
  }
  
  .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
  }
  
  .card-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0.9rem 0;
    border-bottom: 1px solid var(--primary);
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
  }
  
  .card-summary {
    font-size: 1rem;
    color: #555;
  }
  
  .card-spacer {
    flex-grow: 1;
  }
  
  .card-button {
    align-self: flex-start;
    margin-top: 1rem;
    background: #005fa3;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease;
    min-width: 90%;
    text-align: center;
    text-transform: uppercase;
  }
  
  .card-button:hover {
    background: #00447a;
    text-decoration: underline;
  }
  

.dark-mode .card {
    background: #1e1e1e;
    color: var(--text-dark);
}

.card h3 {
    color: var(--primary);
}

  
.card-content {
    padding: 1.25rem;
}

footer {
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    padding: 1rem 0;
}

form {
    display: grid;
    flex-direction: column;
    width: 80%;
    margin: 2rem auto;
}

form input,
form textarea,
form button {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

form button {
    background: var(--primary);
    color: white;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.icon-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
  }
  
  .icon-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: #333;
  }
  
  .icon-list i {
    color: #28a745; /* green check */
    font-size: 1.2rem;
  }
  

/* Accessible modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }
  
  .modal[hidden] {
    display: none !important;
  }
  
  .modal-content {
    background: white;
    color: var(--text-light);
    width: 90%;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    height: 100%;   
    overflow: scroll; 
  }

  .contact-popup-button {
    color: #fff;
    background-color: transparent;
    padding: 1rem 2rem;
    border: none;
  }

  .contact-popup-button:hover {
    text-decoration: underline;
    cursor: pointer;
  }
  

.modal-content h2 {
    margin-top: 2rem;
    color: var(--primary);
}

.modal-content button[aria-label="Close"] {
    background: none;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    color: var(--primary);
    float: right;    
}

.dark-mode .modal-content {
    background: #1e1e1e;
    color: var(--text-dark);
    border: 1px solid #555;
}

.dark-mode .modal-content button[aria-label="Close"] {
    color: var(--text-dark);
}
.modal-content p {
    margin: 1rem 0;
}
.modal-content a {
    color: var(--primary);
    text-decoration: none;
}
.modal-content a:hover {
    text-decoration: underline;
}
.modal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
}
.modal-content li {
    margin-bottom: 0.5rem;
}
.modal-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}
.modal-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
}
.modal-content pre code {
    background: transparent;
    padding: 0;
    font-size: 1rem;
}
.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Styled legal buttons */
.legal-button {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
  }
  
  .legal-button:hover {
    background-color: var(--button-hover);
  }
  
  .legal-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }


/* Cookie Banner Styles */
  .cookie-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    max-width: 350px;
    background-color: var(--bg-light);
    color: var(--text-light);
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 3000;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .cookie-banner button {
    align-self: flex-end;
    background-color: var(--primary);
    color: var(--button-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: #fff;
  }
  
  .cookie-banner a {
    color: var(--primary);
    text-decoration: underline;
  }
  
  .dark-mode .cookie-banner {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    border: 1px solid #555;
  }
  